diff --git a/README.md b/README.md index ad4c4bd..87d824a 100644 --- a/README.md +++ b/README.md @@ -211,6 +211,7 @@ Class | Method | HTTP request | Description *Forms1099Api* | [**get1099FormPdf**](docs/A1099/V2/Forms1099Api.md#get1099formpdf) | **GET** /1099/forms/{id}/pdf | Retrieve the PDF file for a 1099/1095/W2/1042S form *Forms1099Api* | [**list1099Forms**](docs/A1099/V2/Forms1099Api.md#list1099forms) | **GET** /1099/forms | List 1099/1095/W2/1042S forms *Forms1099Api* | [**update1099Form**](docs/A1099/V2/Forms1099Api.md#update1099form) | **PUT** /1099/forms/{id} | Update a 1099/1095/W2/1042S form +*FormsW9Api* | [**createAndSendW9FormEmail**](docs/A1099/V2/FormsW9Api.md#createandsendw9formemail) | **POST** /w9/forms/$create-and-send-email | Create a minimal W9/W4/W8 form and sends the e-mail request *FormsW9Api* | [**createW9Form**](docs/A1099/V2/FormsW9Api.md#createw9form) | **POST** /w9/forms | Create a W9/W4/W8 form *FormsW9Api* | [**deleteW9Form**](docs/A1099/V2/FormsW9Api.md#deletew9form) | **DELETE** /w9/forms/{id} | Delete a W9/W4/W8 form *FormsW9Api* | [**getW9Form**](docs/A1099/V2/FormsW9Api.md#getw9form) | **GET** /w9/forms/{id} | Retrieve a W9/W4/W8 form @@ -223,7 +224,7 @@ Class | Method | HTTP request | Description *Issuers1099Api* | [**getIssuer**](docs/A1099/V2/Issuers1099Api.md#getissuer) | **GET** /1099/issuers/{id} | Retrieve an issuer *Issuers1099Api* | [**getIssuers**](docs/A1099/V2/Issuers1099Api.md#getissuers) | **GET** /1099/issuers | List issuers *Issuers1099Api* | [**updateIssuer**](docs/A1099/V2/Issuers1099Api.md#updateissuer) | **PUT** /1099/issuers/{id} | Update an issuer -*Jobs1099Api* | [**getJob**](docs/A1099/V2/Jobs1099Api.md#getjob) | **GET** /1099/jobs/{id} | Retrieves information about the job +*JobsApi* | [**getJob**](docs/A1099/V2/JobsApi.md#getjob) | **GET** /jobs/{id} | Retrieves information about the job ## Documentation for Models @@ -231,213 +232,151 @@ Class | Method | HTTP request | Description ### EInvoicing V1 Model Documentation - - [AvalaraSDK\ModelEInvoicingV1\Address](docs/EInvoicing/V1/Address.md) - - [AvalaraSDK\ModelEInvoicingV1\BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) - - [AvalaraSDK\ModelEInvoicingV1\BadRequest](docs/EInvoicing/V1/BadRequest.md) - - [AvalaraSDK\ModelEInvoicingV1\BatchErrorDetail](docs/EInvoicing/V1/BatchErrorDetail.md) - - [AvalaraSDK\ModelEInvoicingV1\BatchSearch](docs/EInvoicing/V1/BatchSearch.md) - - [AvalaraSDK\ModelEInvoicingV1\BatchSearchListResponse](docs/EInvoicing/V1/BatchSearchListResponse.md) - - [AvalaraSDK\ModelEInvoicingV1\BatchSearchParticipants202Response](docs/EInvoicing/V1/BatchSearchParticipants202Response.md) - - [AvalaraSDK\ModelEInvoicingV1\ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) - - [AvalaraSDK\ModelEInvoicingV1\Consents](docs/EInvoicing/V1/Consents.md) - - [AvalaraSDK\ModelEInvoicingV1\CreateTradingPartner201Response](docs/EInvoicing/V1/CreateTradingPartner201Response.md) - - [AvalaraSDK\ModelEInvoicingV1\CreateTradingPartnersBatch200Response](docs/EInvoicing/V1/CreateTradingPartnersBatch200Response.md) - - [AvalaraSDK\ModelEInvoicingV1\CreateTradingPartnersBatch200ResponseValueInner](docs/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.md) - - [AvalaraSDK\ModelEInvoicingV1\CreateTradingPartnersBatchRequest](docs/EInvoicing/V1/CreateTradingPartnersBatchRequest.md) - - [AvalaraSDK\ModelEInvoicingV1\DataInputField](docs/EInvoicing/V1/DataInputField.md) - - [AvalaraSDK\ModelEInvoicingV1\DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) - - [AvalaraSDK\ModelEInvoicingV1\DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) - - [AvalaraSDK\ModelEInvoicingV1\DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) - - [AvalaraSDK\ModelEInvoicingV1\DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) - - [AvalaraSDK\ModelEInvoicingV1\DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) - - [AvalaraSDK\ModelEInvoicingV1\DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) - - [AvalaraSDK\ModelEInvoicingV1\DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) - - [AvalaraSDK\ModelEInvoicingV1\DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) - - [AvalaraSDK\ModelEInvoicingV1\DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) - - [AvalaraSDK\ModelEInvoicingV1\DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) - - [AvalaraSDK\ModelEInvoicingV1\ErrorResponse](docs/EInvoicing/V1/ErrorResponse.md) - - [AvalaraSDK\ModelEInvoicingV1\EventId](docs/EInvoicing/V1/EventId.md) - - [AvalaraSDK\ModelEInvoicingV1\EventMessage](docs/EInvoicing/V1/EventMessage.md) - - [AvalaraSDK\ModelEInvoicingV1\EventPayload](docs/EInvoicing/V1/EventPayload.md) - - [AvalaraSDK\ModelEInvoicingV1\EventSubscription](docs/EInvoicing/V1/EventSubscription.md) - - [AvalaraSDK\ModelEInvoicingV1\Extension](docs/EInvoicing/V1/Extension.md) - - [AvalaraSDK\ModelEInvoicingV1\FetchDocumentsRequest](docs/EInvoicing/V1/FetchDocumentsRequest.md) - - [AvalaraSDK\ModelEInvoicingV1\FetchDocumentsRequestDataInner](docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md) - - [AvalaraSDK\ModelEInvoicingV1\FetchDocumentsRequestMetadata](docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md) - - [AvalaraSDK\ModelEInvoicingV1\ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) - - [AvalaraSDK\ModelEInvoicingV1\HmacSignature](docs/EInvoicing/V1/HmacSignature.md) - - [AvalaraSDK\ModelEInvoicingV1\HmacSignatureValue](docs/EInvoicing/V1/HmacSignatureValue.md) - - [AvalaraSDK\ModelEInvoicingV1\Id](docs/EInvoicing/V1/Id.md) - - [AvalaraSDK\ModelEInvoicingV1\Identifier](docs/EInvoicing/V1/Identifier.md) - - [AvalaraSDK\ModelEInvoicingV1\InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) - - [AvalaraSDK\ModelEInvoicingV1\InternalServerError](docs/EInvoicing/V1/InternalServerError.md) - - [AvalaraSDK\ModelEInvoicingV1\Mandate](docs/EInvoicing/V1/Mandate.md) - - [AvalaraSDK\ModelEInvoicingV1\MandateDataInputField](docs/EInvoicing/V1/MandateDataInputField.md) - - [AvalaraSDK\ModelEInvoicingV1\MandateDataInputFieldNamespace](docs/EInvoicing/V1/MandateDataInputFieldNamespace.md) - - [AvalaraSDK\ModelEInvoicingV1\MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) - - [AvalaraSDK\ModelEInvoicingV1\NotFoundError](docs/EInvoicing/V1/NotFoundError.md) - - [AvalaraSDK\ModelEInvoicingV1\NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) - - [AvalaraSDK\ModelEInvoicingV1\OutputDataFormats](docs/EInvoicing/V1/OutputDataFormats.md) - - [AvalaraSDK\ModelEInvoicingV1\Pagination](docs/EInvoicing/V1/Pagination.md) - - [AvalaraSDK\ModelEInvoicingV1\RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) - - [AvalaraSDK\ModelEInvoicingV1\SearchParticipants200Response](docs/EInvoicing/V1/SearchParticipants200Response.md) - - [AvalaraSDK\ModelEInvoicingV1\Signature](docs/EInvoicing/V1/Signature.md) - - [AvalaraSDK\ModelEInvoicingV1\SignatureSignature](docs/EInvoicing/V1/SignatureSignature.md) - - [AvalaraSDK\ModelEInvoicingV1\SignatureValue](docs/EInvoicing/V1/SignatureValue.md) - - [AvalaraSDK\ModelEInvoicingV1\SignatureValueSignature](docs/EInvoicing/V1/SignatureValueSignature.md) - - [AvalaraSDK\ModelEInvoicingV1\StatusEvent](docs/EInvoicing/V1/StatusEvent.md) - - [AvalaraSDK\ModelEInvoicingV1\SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) - - [AvalaraSDK\ModelEInvoicingV1\SubmitInteropDocument202Response](docs/EInvoicing/V1/SubmitInteropDocument202Response.md) - - [AvalaraSDK\ModelEInvoicingV1\SubscriptionCommon](docs/EInvoicing/V1/SubscriptionCommon.md) - - [AvalaraSDK\ModelEInvoicingV1\SubscriptionDetail](docs/EInvoicing/V1/SubscriptionDetail.md) - - [AvalaraSDK\ModelEInvoicingV1\SubscriptionListResponse](docs/EInvoicing/V1/SubscriptionListResponse.md) - - [AvalaraSDK\ModelEInvoicingV1\SubscriptionRegistration](docs/EInvoicing/V1/SubscriptionRegistration.md) - - [AvalaraSDK\ModelEInvoicingV1\SuccessResponse](docs/EInvoicing/V1/SuccessResponse.md) - - [AvalaraSDK\ModelEInvoicingV1\SupportedDocumentTypes](docs/EInvoicing/V1/SupportedDocumentTypes.md) - - [AvalaraSDK\ModelEInvoicingV1\TaxIdentifierRequest](docs/EInvoicing/V1/TaxIdentifierRequest.md) - - [AvalaraSDK\ModelEInvoicingV1\TaxIdentifierResponse](docs/EInvoicing/V1/TaxIdentifierResponse.md) - - [AvalaraSDK\ModelEInvoicingV1\TaxIdentifierResponseValue](docs/EInvoicing/V1/TaxIdentifierResponseValue.md) - - [AvalaraSDK\ModelEInvoicingV1\TaxIdentifierSchemaByCountry200Response](docs/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.md) - - [AvalaraSDK\ModelEInvoicingV1\TradingPartner](docs/EInvoicing/V1/TradingPartner.md) - - [AvalaraSDK\ModelEInvoicingV1\UpdateTradingPartner200Response](docs/EInvoicing/V1/UpdateTradingPartner200Response.md) - - [AvalaraSDK\ModelEInvoicingV1\ValidationError](docs/EInvoicing/V1/ValidationError.md) - - [AvalaraSDK\ModelEInvoicingV1\WebhookInvocation](docs/EInvoicing/V1/WebhookInvocation.md) - - [AvalaraSDK\ModelEInvoicingV1\WebhooksErrorInfo](docs/EInvoicing/V1/WebhooksErrorInfo.md) - - [AvalaraSDK\ModelEInvoicingV1\WebhooksErrorResponse](docs/EInvoicing/V1/WebhooksErrorResponse.md) - - [AvalaraSDK\ModelEInvoicingV1\WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) + - [Avalara\SDK\Model\EInvoicing\V1\Address](docs/EInvoicing/V1/Address.md) + - [Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) + - [Avalara\SDK\Model\EInvoicing\V1\BadRequest](docs/EInvoicing/V1/BadRequest.md) + - [Avalara\SDK\Model\EInvoicing\V1\BatchErrorDetail](docs/EInvoicing/V1/BatchErrorDetail.md) + - [Avalara\SDK\Model\EInvoicing\V1\BatchSearch](docs/EInvoicing/V1/BatchSearch.md) + - [Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse](docs/EInvoicing/V1/BatchSearchListResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response](docs/EInvoicing/V1/BatchSearchParticipants202Response.md) + - [Avalara\SDK\Model\EInvoicing\V1\ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) + - [Avalara\SDK\Model\EInvoicing\V1\Consents](docs/EInvoicing/V1/Consents.md) + - [Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response](docs/EInvoicing/V1/CreateTradingPartner201Response.md) + - [Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response](docs/EInvoicing/V1/CreateTradingPartnersBatch200Response.md) + - [Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200ResponseValueInner](docs/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.md) + - [Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatchRequest](docs/EInvoicing/V1/CreateTradingPartnersBatchRequest.md) + - [Avalara\SDK\Model\EInvoicing\V1\DataInputField](docs/EInvoicing/V1/DataInputField.md) + - [Avalara\SDK\Model\EInvoicing\V1\DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) + - [Avalara\SDK\Model\EInvoicing\V1\DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) + - [Avalara\SDK\Model\EInvoicing\V1\DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) + - [Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError](docs/EInvoicing/V1/DocumentSubmissionError.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse](docs/EInvoicing/V1/DocumentSubmitResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\DocumentSummary](docs/EInvoicing/V1/DocumentSummary.md) + - [Avalara\SDK\Model\EInvoicing\V1\ErrorResponse](docs/EInvoicing/V1/ErrorResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\EventId](docs/EInvoicing/V1/EventId.md) + - [Avalara\SDK\Model\EInvoicing\V1\EventMessage](docs/EInvoicing/V1/EventMessage.md) + - [Avalara\SDK\Model\EInvoicing\V1\EventPayload](docs/EInvoicing/V1/EventPayload.md) + - [Avalara\SDK\Model\EInvoicing\V1\EventSubscription](docs/EInvoicing/V1/EventSubscription.md) + - [Avalara\SDK\Model\EInvoicing\V1\Extension](docs/EInvoicing/V1/Extension.md) + - [Avalara\SDK\Model\EInvoicing\V1\FetchDocumentsRequest](docs/EInvoicing/V1/FetchDocumentsRequest.md) + - [Avalara\SDK\Model\EInvoicing\V1\FetchDocumentsRequestDataInner](docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md) + - [Avalara\SDK\Model\EInvoicing\V1\FetchDocumentsRequestMetadata](docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md) + - [Avalara\SDK\Model\EInvoicing\V1\ForbiddenError](docs/EInvoicing/V1/ForbiddenError.md) + - [Avalara\SDK\Model\EInvoicing\V1\HmacSignature](docs/EInvoicing/V1/HmacSignature.md) + - [Avalara\SDK\Model\EInvoicing\V1\HmacSignatureValue](docs/EInvoicing/V1/HmacSignatureValue.md) + - [Avalara\SDK\Model\EInvoicing\V1\Id](docs/EInvoicing/V1/Id.md) + - [Avalara\SDK\Model\EInvoicing\V1\Identifier](docs/EInvoicing/V1/Identifier.md) + - [Avalara\SDK\Model\EInvoicing\V1\InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) + - [Avalara\SDK\Model\EInvoicing\V1\InternalServerError](docs/EInvoicing/V1/InternalServerError.md) + - [Avalara\SDK\Model\EInvoicing\V1\Mandate](docs/EInvoicing/V1/Mandate.md) + - [Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField](docs/EInvoicing/V1/MandateDataInputField.md) + - [Avalara\SDK\Model\EInvoicing\V1\MandateDataInputFieldNamespace](docs/EInvoicing/V1/MandateDataInputFieldNamespace.md) + - [Avalara\SDK\Model\EInvoicing\V1\MandatesResponse](docs/EInvoicing/V1/MandatesResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\NotFoundError](docs/EInvoicing/V1/NotFoundError.md) + - [Avalara\SDK\Model\EInvoicing\V1\NotUsedForField](docs/EInvoicing/V1/NotUsedForField.md) + - [Avalara\SDK\Model\EInvoicing\V1\OutputDataFormats](docs/EInvoicing/V1/OutputDataFormats.md) + - [Avalara\SDK\Model\EInvoicing\V1\Pagination](docs/EInvoicing/V1/Pagination.md) + - [Avalara\SDK\Model\EInvoicing\V1\RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) + - [Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response](docs/EInvoicing/V1/SearchParticipants200Response.md) + - [Avalara\SDK\Model\EInvoicing\V1\Signature](docs/EInvoicing/V1/Signature.md) + - [Avalara\SDK\Model\EInvoicing\V1\SignatureSignature](docs/EInvoicing/V1/SignatureSignature.md) + - [Avalara\SDK\Model\EInvoicing\V1\SignatureValue](docs/EInvoicing/V1/SignatureValue.md) + - [Avalara\SDK\Model\EInvoicing\V1\SignatureValueSignature](docs/EInvoicing/V1/SignatureValueSignature.md) + - [Avalara\SDK\Model\EInvoicing\V1\StatusEvent](docs/EInvoicing/V1/StatusEvent.md) + - [Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata](docs/EInvoicing/V1/SubmitDocumentMetadata.md) + - [Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response](docs/EInvoicing/V1/SubmitInteropDocument202Response.md) + - [Avalara\SDK\Model\EInvoicing\V1\SubscriptionCommon](docs/EInvoicing/V1/SubscriptionCommon.md) + - [Avalara\SDK\Model\EInvoicing\V1\SubscriptionDetail](docs/EInvoicing/V1/SubscriptionDetail.md) + - [Avalara\SDK\Model\EInvoicing\V1\SubscriptionListResponse](docs/EInvoicing/V1/SubscriptionListResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\SubscriptionRegistration](docs/EInvoicing/V1/SubscriptionRegistration.md) + - [Avalara\SDK\Model\EInvoicing\V1\SuccessResponse](docs/EInvoicing/V1/SuccessResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\SupportedDocumentTypes](docs/EInvoicing/V1/SupportedDocumentTypes.md) + - [Avalara\SDK\Model\EInvoicing\V1\TaxIdentifierRequest](docs/EInvoicing/V1/TaxIdentifierRequest.md) + - [Avalara\SDK\Model\EInvoicing\V1\TaxIdentifierResponse](docs/EInvoicing/V1/TaxIdentifierResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\TaxIdentifierResponseValue](docs/EInvoicing/V1/TaxIdentifierResponseValue.md) + - [Avalara\SDK\Model\EInvoicing\V1\TaxIdentifierSchemaByCountry200Response](docs/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.md) + - [Avalara\SDK\Model\EInvoicing\V1\TradingPartner](docs/EInvoicing/V1/TradingPartner.md) + - [Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response](docs/EInvoicing/V1/UpdateTradingPartner200Response.md) + - [Avalara\SDK\Model\EInvoicing\V1\ValidationError](docs/EInvoicing/V1/ValidationError.md) + - [Avalara\SDK\Model\EInvoicing\V1\WebhookInvocation](docs/EInvoicing/V1/WebhookInvocation.md) + - [Avalara\SDK\Model\EInvoicing\V1\WebhooksErrorInfo](docs/EInvoicing/V1/WebhooksErrorInfo.md) + - [Avalara\SDK\Model\EInvoicing\V1\WebhooksErrorResponse](docs/EInvoicing/V1/WebhooksErrorResponse.md) + - [Avalara\SDK\Model\EInvoicing\V1\WorkflowIds](docs/EInvoicing/V1/WorkflowIds.md) ### A1099 V2 Model Documentation - - [AvalaraSDK\ModelA1099V2\Attribute](docs/A1099/V2/Attribute.md) - - [AvalaraSDK\ModelA1099V2\AuthorizedApiRequestModel](docs/A1099/V2/AuthorizedApiRequestModel.md) - - [AvalaraSDK\ModelA1099V2\AuthorizedApiRequestV2DataModel](docs/A1099/V2/AuthorizedApiRequestV2DataModel.md) - - [AvalaraSDK\ModelA1099V2\BaseCompanyModel](docs/A1099/V2/BaseCompanyModel.md) - - [AvalaraSDK\ModelA1099V2\BaseFormListRequest](docs/A1099/V2/BaseFormListRequest.md) - - [AvalaraSDK\ModelA1099V2\BulkUpsert1099FormsRequest](docs/A1099/V2/BulkUpsert1099FormsRequest.md) - - [AvalaraSDK\ModelA1099V2\CompanyCreateUpdateRequestModel](docs/A1099/V2/CompanyCreateUpdateRequestModel.md) - - [AvalaraSDK\ModelA1099V2\CompanyModel](docs/A1099/V2/CompanyModel.md) - - [AvalaraSDK\ModelA1099V2\CompanyResponse](docs/A1099/V2/CompanyResponse.md) - - [AvalaraSDK\ModelA1099V2\CompanyResponseModel](docs/A1099/V2/CompanyResponseModel.md) - - [AvalaraSDK\ModelA1099V2\CoveredIndividualReference](docs/A1099/V2/CoveredIndividualReference.md) - - [AvalaraSDK\ModelA1099V2\CoveredIndividualReferenceResponse](docs/A1099/V2/CoveredIndividualReferenceResponse.md) - - [AvalaraSDK\ModelA1099V2\CoveredIndividualRequest](docs/A1099/V2/CoveredIndividualRequest.md) - - [AvalaraSDK\ModelA1099V2\Create1099Form201Response](docs/A1099/V2/Create1099Form201Response.md) - - [AvalaraSDK\ModelA1099V2\CreateW9Form201Response](docs/A1099/V2/CreateW9Form201Response.md) - - [AvalaraSDK\ModelA1099V2\CreateW9FormRequest](docs/A1099/V2/CreateW9FormRequest.md) - - [AvalaraSDK\ModelA1099V2\Data](docs/A1099/V2/Data.md) - - [AvalaraSDK\ModelA1099V2\ErrorModel](docs/A1099/V2/ErrorModel.md) - - [AvalaraSDK\ModelA1099V2\ErrorResponse](docs/A1099/V2/ErrorResponse.md) - - [AvalaraSDK\ModelA1099V2\ErrorResponseItem](docs/A1099/V2/ErrorResponseItem.md) - - [AvalaraSDK\ModelA1099V2\Form1042S](docs/A1099/V2/Form1042S.md) - - [AvalaraSDK\ModelA1099V2\Form1042SList](docs/A1099/V2/Form1042SList.md) - - [AvalaraSDK\ModelA1099V2\Form1042SListItem](docs/A1099/V2/Form1042SListItem.md) - - [AvalaraSDK\ModelA1099V2\Form1042SListItemResponse](docs/A1099/V2/Form1042SListItemResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1042SRequest](docs/A1099/V2/Form1042SRequest.md) - - [AvalaraSDK\ModelA1099V2\Form1042SResponse](docs/A1099/V2/Form1042SResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1095B](docs/A1099/V2/Form1095B.md) - - [AvalaraSDK\ModelA1099V2\Form1095BList](docs/A1099/V2/Form1095BList.md) - - [AvalaraSDK\ModelA1099V2\Form1095BListItem](docs/A1099/V2/Form1095BListItem.md) - - [AvalaraSDK\ModelA1099V2\Form1095BListItemResponse](docs/A1099/V2/Form1095BListItemResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1095BRequest](docs/A1099/V2/Form1095BRequest.md) - - [AvalaraSDK\ModelA1099V2\Form1095BResponse](docs/A1099/V2/Form1095BResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1095CList](docs/A1099/V2/Form1095CList.md) - - [AvalaraSDK\ModelA1099V2\Form1095CListItem](docs/A1099/V2/Form1095CListItem.md) - - [AvalaraSDK\ModelA1099V2\Form1099Base](docs/A1099/V2/Form1099Base.md) - - [AvalaraSDK\ModelA1099V2\Form1099BaseResponse](docs/A1099/V2/Form1099BaseResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099Div](docs/A1099/V2/Form1099Div.md) - - [AvalaraSDK\ModelA1099V2\Form1099DivList](docs/A1099/V2/Form1099DivList.md) - - [AvalaraSDK\ModelA1099V2\Form1099DivListItem](docs/A1099/V2/Form1099DivListItem.md) - - [AvalaraSDK\ModelA1099V2\Form1099DivListItemResponse](docs/A1099/V2/Form1099DivListItemResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099DivRequest](docs/A1099/V2/Form1099DivRequest.md) - - [AvalaraSDK\ModelA1099V2\Form1099DivResponse](docs/A1099/V2/Form1099DivResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099Int](docs/A1099/V2/Form1099Int.md) - - [AvalaraSDK\ModelA1099V2\Form1099IntList](docs/A1099/V2/Form1099IntList.md) - - [AvalaraSDK\ModelA1099V2\Form1099IntListItem](docs/A1099/V2/Form1099IntListItem.md) - - [AvalaraSDK\ModelA1099V2\Form1099IntListItemResponse](docs/A1099/V2/Form1099IntListItemResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099IntRequest](docs/A1099/V2/Form1099IntRequest.md) - - [AvalaraSDK\ModelA1099V2\Form1099IntResponse](docs/A1099/V2/Form1099IntResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099K](docs/A1099/V2/Form1099K.md) - - [AvalaraSDK\ModelA1099V2\Form1099KList](docs/A1099/V2/Form1099KList.md) - - [AvalaraSDK\ModelA1099V2\Form1099KListItem](docs/A1099/V2/Form1099KListItem.md) - - [AvalaraSDK\ModelA1099V2\Form1099KListItemResponse](docs/A1099/V2/Form1099KListItemResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099KRequest](docs/A1099/V2/Form1099KRequest.md) - - [AvalaraSDK\ModelA1099V2\Form1099KResponse](docs/A1099/V2/Form1099KResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099ListResponse](docs/A1099/V2/Form1099ListResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099ListResponseValueInner](docs/A1099/V2/Form1099ListResponseValueInner.md) - - [AvalaraSDK\ModelA1099V2\Form1099Misc](docs/A1099/V2/Form1099Misc.md) - - [AvalaraSDK\ModelA1099V2\Form1099MiscList](docs/A1099/V2/Form1099MiscList.md) - - [AvalaraSDK\ModelA1099V2\Form1099MiscListItem](docs/A1099/V2/Form1099MiscListItem.md) - - [AvalaraSDK\ModelA1099V2\Form1099MiscListItemResponse](docs/A1099/V2/Form1099MiscListItemResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099MiscRequest](docs/A1099/V2/Form1099MiscRequest.md) - - [AvalaraSDK\ModelA1099V2\Form1099MiscResponse](docs/A1099/V2/Form1099MiscResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099Nec](docs/A1099/V2/Form1099Nec.md) - - [AvalaraSDK\ModelA1099V2\Form1099NecList](docs/A1099/V2/Form1099NecList.md) - - [AvalaraSDK\ModelA1099V2\Form1099NecListItem](docs/A1099/V2/Form1099NecListItem.md) - - [AvalaraSDK\ModelA1099V2\Form1099NecListItemResponse](docs/A1099/V2/Form1099NecListItemResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099NecRequest](docs/A1099/V2/Form1099NecRequest.md) - - [AvalaraSDK\ModelA1099V2\Form1099NecResponse](docs/A1099/V2/Form1099NecResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099ProccessResult](docs/A1099/V2/Form1099ProccessResult.md) - - [AvalaraSDK\ModelA1099V2\Form1099ProccessResultProcessedFormsInner](docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md) - - [AvalaraSDK\ModelA1099V2\Form1099R](docs/A1099/V2/Form1099R.md) - - [AvalaraSDK\ModelA1099V2\Form1099RList](docs/A1099/V2/Form1099RList.md) - - [AvalaraSDK\ModelA1099V2\Form1099RListItem](docs/A1099/V2/Form1099RListItem.md) - - [AvalaraSDK\ModelA1099V2\Form1099RListItemResponse](docs/A1099/V2/Form1099RListItemResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099RRequest](docs/A1099/V2/Form1099RRequest.md) - - [AvalaraSDK\ModelA1099V2\Form1099RResponse](docs/A1099/V2/Form1099RResponse.md) - - [AvalaraSDK\ModelA1099V2\Form1099StatusDetail](docs/A1099/V2/Form1099StatusDetail.md) - - [AvalaraSDK\ModelA1099V2\FormRequestBase](docs/A1099/V2/FormRequestBase.md) - - [AvalaraSDK\ModelA1099V2\FormRequestListItemBase](docs/A1099/V2/FormRequestListItemBase.md) - - [AvalaraSDK\ModelA1099V2\FormResponseBase](docs/A1099/V2/FormResponseBase.md) - - [AvalaraSDK\ModelA1099V2\FormSingleRequestBase](docs/A1099/V2/FormSingleRequestBase.md) - - [AvalaraSDK\ModelA1099V2\Get1099Form200Response](docs/A1099/V2/Get1099Form200Response.md) - - [AvalaraSDK\ModelA1099V2\ICreateForm1099Request](docs/A1099/V2/ICreateForm1099Request.md) - - [AvalaraSDK\ModelA1099V2\IUpdateForm1099Request](docs/A1099/V2/IUpdateForm1099Request.md) - - [AvalaraSDK\ModelA1099V2\IW9FormDataModelsOneOf](docs/A1099/V2/IW9FormDataModelsOneOf.md) - - [AvalaraSDK\ModelA1099V2\IncludedBase](docs/A1099/V2/IncludedBase.md) - - [AvalaraSDK\ModelA1099V2\IntermediaryOrFlowThrough](docs/A1099/V2/IntermediaryOrFlowThrough.md) - - [AvalaraSDK\ModelA1099V2\IntermediaryOrFlowThroughRequest](docs/A1099/V2/IntermediaryOrFlowThroughRequest.md) - - [AvalaraSDK\ModelA1099V2\IntermediaryOrFlowThroughResponse](docs/A1099/V2/IntermediaryOrFlowThroughResponse.md) - - [AvalaraSDK\ModelA1099V2\IrsResponse](docs/A1099/V2/IrsResponse.md) - - [AvalaraSDK\ModelA1099V2\IssuerCommand](docs/A1099/V2/IssuerCommand.md) - - [AvalaraSDK\ModelA1099V2\IssuerResponse](docs/A1099/V2/IssuerResponse.md) - - [AvalaraSDK\ModelA1099V2\JobResult](docs/A1099/V2/JobResult.md) - - [AvalaraSDK\ModelA1099V2\Link](docs/A1099/V2/Link.md) - - [AvalaraSDK\ModelA1099V2\OfferAndCoverageRequest](docs/A1099/V2/OfferAndCoverageRequest.md) - - [AvalaraSDK\ModelA1099V2\PaginatedQueryResultModelCompanyResponse](docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md) - - [AvalaraSDK\ModelA1099V2\PaginatedQueryResultModelIssuerResponse](docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md) - - [AvalaraSDK\ModelA1099V2\PaginatedQueryResultModelW9FormBaseResponse](docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md) - - [AvalaraSDK\ModelA1099V2\PrimaryWithholdingAgent](docs/A1099/V2/PrimaryWithholdingAgent.md) - - [AvalaraSDK\ModelA1099V2\PrimaryWithholdingAgentRequest](docs/A1099/V2/PrimaryWithholdingAgentRequest.md) - - [AvalaraSDK\ModelA1099V2\PrimaryWithholdingAgentResponse](docs/A1099/V2/PrimaryWithholdingAgentResponse.md) - - [AvalaraSDK\ModelA1099V2\StateAndLocalWithholding](docs/A1099/V2/StateAndLocalWithholding.md) - - [AvalaraSDK\ModelA1099V2\StateAndLocalWithholdingRequest](docs/A1099/V2/StateAndLocalWithholdingRequest.md) - - [AvalaraSDK\ModelA1099V2\StateAndLocalWithholdingResponse](docs/A1099/V2/StateAndLocalWithholdingResponse.md) - - [AvalaraSDK\ModelA1099V2\StateEfileStatusDetail](docs/A1099/V2/StateEfileStatusDetail.md) - - [AvalaraSDK\ModelA1099V2\StateEfileStatusDetailResponse](docs/A1099/V2/StateEfileStatusDetailResponse.md) - - [AvalaraSDK\ModelA1099V2\StatusDetail](docs/A1099/V2/StatusDetail.md) - - [AvalaraSDK\ModelA1099V2\SubstantialUsOwnerRequest](docs/A1099/V2/SubstantialUsOwnerRequest.md) - - [AvalaraSDK\ModelA1099V2\SubstantialUsOwnerResponse](docs/A1099/V2/SubstantialUsOwnerResponse.md) - - [AvalaraSDK\ModelA1099V2\TinMatchStatusResponse](docs/A1099/V2/TinMatchStatusResponse.md) - - [AvalaraSDK\ModelA1099V2\Update1099Form200Response](docs/A1099/V2/Update1099Form200Response.md) - - [AvalaraSDK\ModelA1099V2\ValidationError](docs/A1099/V2/ValidationError.md) - - [AvalaraSDK\ModelA1099V2\ValidationErrorResponse](docs/A1099/V2/ValidationErrorResponse.md) - - [AvalaraSDK\ModelA1099V2\W4FormDataModel](docs/A1099/V2/W4FormDataModel.md) - - [AvalaraSDK\ModelA1099V2\W4FormRequest](docs/A1099/V2/W4FormRequest.md) - - [AvalaraSDK\ModelA1099V2\W4FormResponse](docs/A1099/V2/W4FormResponse.md) - - [AvalaraSDK\ModelA1099V2\W8BenEFormRequest](docs/A1099/V2/W8BenEFormRequest.md) - - [AvalaraSDK\ModelA1099V2\W8BenEFormResponse](docs/A1099/V2/W8BenEFormResponse.md) - - [AvalaraSDK\ModelA1099V2\W8BenESubstantialUsOwnerDataModel](docs/A1099/V2/W8BenESubstantialUsOwnerDataModel.md) - - [AvalaraSDK\ModelA1099V2\W8BenFormDataModel](docs/A1099/V2/W8BenFormDataModel.md) - - [AvalaraSDK\ModelA1099V2\W8BenFormRequest](docs/A1099/V2/W8BenFormRequest.md) - - [AvalaraSDK\ModelA1099V2\W8BenFormResponse](docs/A1099/V2/W8BenFormResponse.md) - - [AvalaraSDK\ModelA1099V2\W8BeneFormDataModel](docs/A1099/V2/W8BeneFormDataModel.md) - - [AvalaraSDK\ModelA1099V2\W8ImyFormDataModel](docs/A1099/V2/W8ImyFormDataModel.md) - - [AvalaraSDK\ModelA1099V2\W8ImyFormRequest](docs/A1099/V2/W8ImyFormRequest.md) - - [AvalaraSDK\ModelA1099V2\W8ImyFormResponse](docs/A1099/V2/W8ImyFormResponse.md) - - [AvalaraSDK\ModelA1099V2\W9FormBaseRequest](docs/A1099/V2/W9FormBaseRequest.md) - - [AvalaraSDK\ModelA1099V2\W9FormBaseResponse](docs/A1099/V2/W9FormBaseResponse.md) - - [AvalaraSDK\ModelA1099V2\W9FormDataModel](docs/A1099/V2/W9FormDataModel.md) - - [AvalaraSDK\ModelA1099V2\W9FormRequest](docs/A1099/V2/W9FormRequest.md) - - [AvalaraSDK\ModelA1099V2\W9FormResponse](docs/A1099/V2/W9FormResponse.md) + - [Avalara\SDK\Model\A1099\V2\AuthorizedApiRequestModel](docs/A1099/V2/AuthorizedApiRequestModel.md) + - [Avalara\SDK\Model\A1099\V2\AuthorizedApiRequestV2DataModel](docs/A1099/V2/AuthorizedApiRequestV2DataModel.md) + - [Avalara\SDK\Model\A1099\V2\CompanyCreateUpdateRequestModel](docs/A1099/V2/CompanyCreateUpdateRequestModel.md) + - [Avalara\SDK\Model\A1099\V2\CompanyResponse](docs/A1099/V2/CompanyResponse.md) + - [Avalara\SDK\Model\A1099\V2\CoveredIndividual](docs/A1099/V2/CoveredIndividual.md) + - [Avalara\SDK\Model\A1099\V2\CreateAndSendW9FormEmailRequest](docs/A1099/V2/CreateAndSendW9FormEmailRequest.md) + - [Avalara\SDK\Model\A1099\V2\CreateCompanyRequest](docs/A1099/V2/CreateCompanyRequest.md) + - [Avalara\SDK\Model\A1099\V2\CreateIssuerRequest](docs/A1099/V2/CreateIssuerRequest.md) + - [Avalara\SDK\Model\A1099\V2\CreateW9Form201Response](docs/A1099/V2/CreateW9Form201Response.md) + - [Avalara\SDK\Model\A1099\V2\CreateW9FormRequest](docs/A1099/V2/CreateW9FormRequest.md) + - [Avalara\SDK\Model\A1099\V2\EntryStatusResponse](docs/A1099/V2/EntryStatusResponse.md) + - [Avalara\SDK\Model\A1099\V2\ErrorModel](docs/A1099/V2/ErrorModel.md) + - [Avalara\SDK\Model\A1099\V2\ErrorResponse](docs/A1099/V2/ErrorResponse.md) + - [Avalara\SDK\Model\A1099\V2\ErrorResponseItem](docs/A1099/V2/ErrorResponseItem.md) + - [Avalara\SDK\Model\A1099\V2\Form1042S](docs/A1099/V2/Form1042S.md) + - [Avalara\SDK\Model\A1099\V2\Form1095B](docs/A1099/V2/Form1095B.md) + - [Avalara\SDK\Model\A1099\V2\Form1095C](docs/A1099/V2/Form1095C.md) + - [Avalara\SDK\Model\A1099\V2\Form1099Base](docs/A1099/V2/Form1099Base.md) + - [Avalara\SDK\Model\A1099\V2\Form1099Div](docs/A1099/V2/Form1099Div.md) + - [Avalara\SDK\Model\A1099\V2\Form1099Int](docs/A1099/V2/Form1099Int.md) + - [Avalara\SDK\Model\A1099\V2\Form1099K](docs/A1099/V2/Form1099K.md) + - [Avalara\SDK\Model\A1099\V2\Form1099ListRequest](docs/A1099/V2/Form1099ListRequest.md) + - [Avalara\SDK\Model\A1099\V2\Form1099Misc](docs/A1099/V2/Form1099Misc.md) + - [Avalara\SDK\Model\A1099\V2\Form1099Nec](docs/A1099/V2/Form1099Nec.md) + - [Avalara\SDK\Model\A1099\V2\Form1099R](docs/A1099/V2/Form1099R.md) + - [Avalara\SDK\Model\A1099\V2\Form1099StatusDetail](docs/A1099/V2/Form1099StatusDetail.md) + - [Avalara\SDK\Model\A1099\V2\Get1099Form200Response](docs/A1099/V2/Get1099Form200Response.md) + - [Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf](docs/A1099/V2/IW9FormDataModelsOneOf.md) + - [Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThrough](docs/A1099/V2/IntermediaryOrFlowThrough.md) + - [Avalara\SDK\Model\A1099\V2\IrsResponse](docs/A1099/V2/IrsResponse.md) + - [Avalara\SDK\Model\A1099\V2\IssuerCommand](docs/A1099/V2/IssuerCommand.md) + - [Avalara\SDK\Model\A1099\V2\IssuerResponse](docs/A1099/V2/IssuerResponse.md) + - [Avalara\SDK\Model\A1099\V2\JobResponse](docs/A1099/V2/JobResponse.md) + - [Avalara\SDK\Model\A1099\V2\OfferAndCoverage](docs/A1099/V2/OfferAndCoverage.md) + - [Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelCompanyResponse](docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md) + - [Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelForm1099Base](docs/A1099/V2/PaginatedQueryResultModelForm1099Base.md) + - [Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelIssuerResponse](docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md) + - [Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelW9FormBaseResponse](docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md) + - [Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgent](docs/A1099/V2/PrimaryWithholdingAgent.md) + - [Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding](docs/A1099/V2/StateAndLocalWithholding.md) + - [Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail](docs/A1099/V2/StateEfileStatusDetail.md) + - [Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerRequest](docs/A1099/V2/SubstantialUsOwnerRequest.md) + - [Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerResponse](docs/A1099/V2/SubstantialUsOwnerResponse.md) + - [Avalara\SDK\Model\A1099\V2\TinMatchStatusResponse](docs/A1099/V2/TinMatchStatusResponse.md) + - [Avalara\SDK\Model\A1099\V2\ValidationError](docs/A1099/V2/ValidationError.md) + - [Avalara\SDK\Model\A1099\V2\W4FormDataModel](docs/A1099/V2/W4FormDataModel.md) + - [Avalara\SDK\Model\A1099\V2\W4FormMinimalRequest](docs/A1099/V2/W4FormMinimalRequest.md) + - [Avalara\SDK\Model\A1099\V2\W4FormRequest](docs/A1099/V2/W4FormRequest.md) + - [Avalara\SDK\Model\A1099\V2\W4FormResponse](docs/A1099/V2/W4FormResponse.md) + - [Avalara\SDK\Model\A1099\V2\W8BenEFormMinimalRequest](docs/A1099/V2/W8BenEFormMinimalRequest.md) + - [Avalara\SDK\Model\A1099\V2\W8BenEFormRequest](docs/A1099/V2/W8BenEFormRequest.md) + - [Avalara\SDK\Model\A1099\V2\W8BenEFormResponse](docs/A1099/V2/W8BenEFormResponse.md) + - [Avalara\SDK\Model\A1099\V2\W8BenESubstantialUsOwnerDataModel](docs/A1099/V2/W8BenESubstantialUsOwnerDataModel.md) + - [Avalara\SDK\Model\A1099\V2\W8BenFormDataModel](docs/A1099/V2/W8BenFormDataModel.md) + - [Avalara\SDK\Model\A1099\V2\W8BenFormMinimalRequest](docs/A1099/V2/W8BenFormMinimalRequest.md) + - [Avalara\SDK\Model\A1099\V2\W8BenFormRequest](docs/A1099/V2/W8BenFormRequest.md) + - [Avalara\SDK\Model\A1099\V2\W8BenFormResponse](docs/A1099/V2/W8BenFormResponse.md) + - [Avalara\SDK\Model\A1099\V2\W8BeneFormDataModel](docs/A1099/V2/W8BeneFormDataModel.md) + - [Avalara\SDK\Model\A1099\V2\W8ImyFormDataModel](docs/A1099/V2/W8ImyFormDataModel.md) + - [Avalara\SDK\Model\A1099\V2\W8ImyFormMinimalRequest](docs/A1099/V2/W8ImyFormMinimalRequest.md) + - [Avalara\SDK\Model\A1099\V2\W8ImyFormRequest](docs/A1099/V2/W8ImyFormRequest.md) + - [Avalara\SDK\Model\A1099\V2\W8ImyFormResponse](docs/A1099/V2/W8ImyFormResponse.md) + - [Avalara\SDK\Model\A1099\V2\W9FormBaseMinimalRequest](docs/A1099/V2/W9FormBaseMinimalRequest.md) + - [Avalara\SDK\Model\A1099\V2\W9FormBaseRequest](docs/A1099/V2/W9FormBaseRequest.md) + - [Avalara\SDK\Model\A1099\V2\W9FormBaseResponse](docs/A1099/V2/W9FormBaseResponse.md) + - [Avalara\SDK\Model\A1099\V2\W9FormDataModel](docs/A1099/V2/W9FormDataModel.md) + - [Avalara\SDK\Model\A1099\V2\W9FormMinimalRequest](docs/A1099/V2/W9FormMinimalRequest.md) + - [Avalara\SDK\Model\A1099\V2\W9FormRequest](docs/A1099/V2/W9FormRequest.md) + - [Avalara\SDK\Model\A1099\V2\W9FormResponse](docs/A1099/V2/W9FormResponse.md) diff --git a/docs/A1099/CompanyCreateUpdateRequestModel.md b/docs/A1099/CompanyCreateUpdateRequestModel.md index 7708cb8..3b7667b 100644 --- a/docs/A1099/CompanyCreateUpdateRequestModel.md +++ b/docs/A1099/CompanyCreateUpdateRequestModel.md @@ -4,22 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | | [optional] -**email** | **string** | | [optional] -**address** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**zip** | **string** | | [optional] -**telephone** | **string** | | [optional] -**tin** | **string** | | [optional] -**dba_name** | **string** | | [optional] -**reference_id** | **string** | | [optional] -**do_tin_match** | **bool** | | [optional] -**group_name** | **string** | | [optional] -**foreign_province** | **string** | | [optional] -**country_code** | **string** | | [optional] -**resend_requests** | **bool** | | [optional] -**resend_interval_days** | **int** | | [optional] -**max_reminder_attempts** | **int** | | [optional] +**name** | **string** | Legal name. Not the DBA name. | +**dba_name** | **string** | Doing Business As (DBA) name or continuation of a long legal name. | [optional] +**email** | **string** | Contact email address. For inquiries by vendors/employees. | +**address** | **string** | Address. | +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | +**telephone** | **string** | Contact phone number (must contain at least 10 digits, max 15 characters). | +**tin** | **string** | Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies). | +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**do_tin_match** | **bool** | Indicates whether the company authorizes IRS TIN matching. | [optional] +**group_name** | **string** | Group name for organizing companies (creates or finds group by name). | [optional] +**foreign_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**resend_requests** | **bool** | Boolean to enable automatic reminder emails (default: false). | [optional] +**resend_interval_days** | **int** | Days between reminder emails (7-365, required if resendRequests is true). | [optional] +**max_reminder_attempts** | **int** | Maximum number of reminder attempts (1-52, required if resendRequests is true). | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/CompanyResponse.md b/docs/A1099/CompanyResponse.md index cc6902e..df76002 100644 --- a/docs/A1099/CompanyResponse.md +++ b/docs/A1099/CompanyResponse.md @@ -4,25 +4,25 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] -**reference_id** | **string** | | [optional] -**group_name** | **string** | | [optional] -**name** | **string** | | [optional] -**dba_name** | **string** | | [optional] -**address** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**foreign_province** | **string** | | [optional] -**zip** | **string** | | [optional] -**country_code** | **string** | | [optional] -**email** | **string** | | [optional] -**telephone** | **string** | | [optional] -**tin** | **string** | | [optional] -**do_tin_match** | **bool** | | [optional] -**resend_requests** | **bool** | | [optional] -**resend_interval_days** | **int** | | [optional] -**max_reminder_attempts** | **int** | | [optional] -**created_at** | **\DateTime** | | [optional] -**updated_at** | **\DateTime** | | [optional] +**id** | **string** | Unique identifier set when the record is created. | [optional] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] +**name** | **string** | Legal name. Not the DBA name. | +**dba_name** | **string** | Doing Business As (DBA) name or continuation of a long legal name. | [optional] +**email** | **string** | Contact email address. For inquiries by vendors/employees. | +**address** | **string** | Address. | +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | +**telephone** | **string** | Contact phone number (must contain at least 10 digits, max 15 characters). | +**tin** | **string** | Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies). | +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**do_tin_match** | **bool** | Indicates whether the company authorizes IRS TIN matching. | [optional] +**group_name** | **string** | Group name for organizing companies (creates or finds group by name). | [optional] +**foreign_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**resend_requests** | **bool** | Boolean to enable automatic reminder emails (default: false). | [optional] +**resend_interval_days** | **int** | Days between reminder emails (7-365, required if resendRequests is true). | [optional] +**max_reminder_attempts** | **int** | Maximum number of reminder attempts (1-52, required if resendRequests is true). | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/CoveredIndividual.md b/docs/A1099/CoveredIndividual.md new file mode 100644 index 0000000..06456d2 --- /dev/null +++ b/docs/A1099/CoveredIndividual.md @@ -0,0 +1,28 @@ +# # CoveredIndividual + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Covered individual's ID | [optional] [readonly] +**first_name** | **string** | Covered individual's first name | +**middle_name** | **string** | Covered individual's middle name | [optional] +**last_name** | **string** | Covered individual's last name | +**name_suffix** | **string** | Covered individual's name suffix | [optional] +**tin** | **string** | Covered individual's Federal Tax Identification Number (TIN).. SSN or ITIN. Required unless unavailable. | [optional] +**birth_date** | **\DateTime** | Covered individual's date of birth - Required when SSN is missing. | [optional] +**covered_all_months** | **bool** | Coverage indicator for all 12 months | [optional] +**covered_january** | **bool** | Coverage indicator for January | [optional] +**covered_february** | **bool** | Coverage indicator for February | [optional] +**covered_march** | **bool** | Coverage indicator for March | [optional] +**covered_april** | **bool** | Coverage indicator for April | [optional] +**covered_may** | **bool** | Coverage indicator for May | [optional] +**covered_june** | **bool** | Coverage indicator for June | [optional] +**covered_july** | **bool** | Coverage indicator for July | [optional] +**covered_august** | **bool** | Coverage indicator for August | [optional] +**covered_september** | **bool** | Coverage indicator for September | [optional] +**covered_october** | **bool** | Coverage indicator for October | [optional] +**covered_november** | **bool** | Coverage indicator for November | [optional] +**covered_december** | **bool** | Coverage indicator for December | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/CreateAndSendW9FormEmailRequest.md b/docs/A1099/CreateAndSendW9FormEmailRequest.md new file mode 100644 index 0000000..340f097 --- /dev/null +++ b/docs/A1099/CreateAndSendW9FormEmailRequest.md @@ -0,0 +1,18 @@ +# # CreateAndSendW9FormEmailRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The form type. | [optional] [readonly] +**email** | **string** | The email address of the individual associated with the form. | +**employee_first_name** | **string** | The first name of the employee. | +**employee_last_name** | **string** | The last name of the employee. | +**office_code** | **string** | The office code associated with the form. | [optional] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] +**name** | **string** | The name of the individual or entity associated with the form. | +**reference_number** | **string** | A reference number for the form. | [optional] +**account_number** | **string** | The account number associated with the form. | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/CreateCompanyRequest.md b/docs/A1099/CreateCompanyRequest.md new file mode 100644 index 0000000..a485e2f --- /dev/null +++ b/docs/A1099/CreateCompanyRequest.md @@ -0,0 +1,28 @@ +# # CreateCompanyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Legal name. Not the DBA name. | +**dba_name** | **string** | Doing Business As (DBA) name or continuation of a long legal name. | [optional] +**email** | **string** | Contact email address. For inquiries by vendors/employees. | +**address** | **string** | Address. | +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | +**telephone** | **string** | Contact phone number (must contain at least 10 digits, max 15 characters). | +**tin** | **string** | Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies). | +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**do_tin_match** | **bool** | Indicates whether the company authorizes IRS TIN matching. | [optional] +**group_name** | **string** | Group name for organizing companies (creates or finds group by name). | [optional] +**foreign_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**resend_requests** | **bool** | Boolean to enable automatic reminder emails (default: false). | [optional] +**resend_interval_days** | **int** | Days between reminder emails (7-365, required if resendRequests is true). | [optional] +**max_reminder_attempts** | **int** | Maximum number of reminder attempts (1-52, required if resendRequests is true). | [optional] +**id** | **string** | Unique identifier set when the record is created. | [optional] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/CreateIssuerRequest.md b/docs/A1099/CreateIssuerRequest.md new file mode 100644 index 0000000..2748622 --- /dev/null +++ b/docs/A1099/CreateIssuerRequest.md @@ -0,0 +1,26 @@ +# # CreateIssuerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Legal name. Not the DBA name. | +**dba_name** | **string** | Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. | [optional] +**tin** | **string** | Federal Tax Identification Number (TIN). | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] +**telephone** | **string** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | +**tax_year** | **int** | Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. | +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. | [optional] +**email** | **string** | Contact email address. For recipient inquiries. | +**address** | **string** | Address. | +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | +**zip** | **string** | ZIP/postal code. | +**foreign_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**transfer_agent_name** | **string** | Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. | [optional] +**last_filing** | **bool** | Indicates if this is the issuer's final year filing. | +**id** | **string** | Unique identifier set when the record is created. | [optional] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/CreateW9Form201Response.md b/docs/A1099/CreateW9Form201Response.md index 1d70f39..b673c60 100644 --- a/docs/A1099/CreateW9Form201Response.md +++ b/docs/A1099/CreateW9Form201Response.md @@ -97,17 +97,17 @@ Name | Type | Description | Notes **excepted_inter_affiliate_ffi_certification** | **bool** | Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. | [optional] **sponsored_direct_reporting_nffe_certification** | **bool** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] **direct_reporting_nffe_sponsoring_entity** | **string** | The name of the entity that sponsors the direct reporting NFFE. | [optional] -**substantial_us_owners** | [**\AvalaraSDK\ModelA1099V2\SubstantialUsOwnerResponse[]**](SubstantialUsOwnerResponse.md) | The list of substantial U.S. owners of passive NFFE. | [optional] +**substantial_us_owners** | [**\Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerResponse[]**](SubstantialUsOwnerResponse.md) | The list of substantial U.S. owners of passive NFFE. | [optional] **signer_name** | **string** | The name of the signer. | [optional] **capacity_to_sign_certification** | **bool** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] **id** | **string** | The unique identifier for the form. | [optional] -**entry_status** | **string** | The form status. | [optional] -**entry_status_date** | **\DateTime** | The timestamp for the latest status update. | [optional] +**entry_status** | [**\Avalara\SDK\Model\A1099\V2\EntryStatusResponse**](EntryStatusResponse.md) | The entry status information for the form. | [optional] **reference_id** | **string** | A reference identifier for the form. | [optional] **company_id** | **string** | The ID of the associated company. | [optional] **display_name** | **string** | The display name associated with the form. | [optional] **email** | **string** | The email address of the individual associated with the form. | [optional] **archived** | **bool** | Indicates whether the form is archived. | [optional] +**ancestor_id** | **string** | Form ID of previous version. | [optional] **signature** | **string** | The signature of the form. | [optional] **signed_date** | **\DateTime** | The date the form was signed. | [optional] **e_delivery_consented_at** | **\DateTime** | The date when e-delivery was consented. | [optional] @@ -170,6 +170,6 @@ Name | Type | Description | Notes **account_number** | **string** | The account number associated with the form. | [optional] **backup_withholding** | **bool** | Indicates whether backup withholding applies. | [optional] **is1099able** | **bool** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] -**tin_match_status** | [**\AvalaraSDK\ModelA1099V2\TinMatchStatusResponse**](TinMatchStatusResponse.md) | The TIN Match status from IRS. | [optional] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\TinMatchStatusResponse**](TinMatchStatusResponse.md) | The TIN Match status from IRS. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/CreateW9FormRequest.md b/docs/A1099/CreateW9FormRequest.md index 0b8e3b5..f9bff1e 100644 --- a/docs/A1099/CreateW9FormRequest.md +++ b/docs/A1099/CreateW9FormRequest.md @@ -23,11 +23,11 @@ Name | Type | Description | Notes **tin** | **string** | The taxpayer identification number (TIN). | [optional] **backup_withholding** | **bool** | Indicates whether backup withholding applies. | [optional] **is1099able** | **bool** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] -**company_id** | **string** | The ID of the associated company. | [optional] -**reference_id** | **string** | A reference identifier for the form. | [optional] -**email** | **string** | The email address of the individual associated with the form. | [optional] **e_delivery_consented_at** | **\DateTime** | The date when e-delivery was consented. | [optional] **signature** | **string** | The signature of the form. | [optional] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] +**email** | **string** | The email address of the individual associated with the form. | [optional] **citizenship_country** | **string** | The country of citizenship. | [optional] **disregarded_entity** | **string** | The name of the disregarded entity receiving the payment (if applicable). | [optional] **entity_type** | **string** | The entity type. | [optional] @@ -158,7 +158,7 @@ Name | Type | Description | Notes **passive_nffe_no_substantial_us_owners_certification** | **bool** | Certifies that the passive NFFE has no substantial U.S. owners or controlling U.S. persons. | [optional] **passive_nffe_substantial_us_owners_provided_certification** | **bool** | Certifies that the passive NFFE has provided the name, address, and TIN of each substantial U.S. owner or controlling U.S. person. | [optional] **excepted_inter_affiliate_ffi_certification** | **bool** | Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. | [optional] -**substantial_us_owners** | [**\AvalaraSDK\ModelA1099V2\SubstantialUsOwnerRequest[]**](SubstantialUsOwnerRequest.md) | The list of substantial U.S. owners of passive NFFE. | [optional] +**substantial_us_owners** | [**\Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerRequest[]**](SubstantialUsOwnerRequest.md) | The list of substantial U.S. owners of passive NFFE. | [optional] **capacity_to_sign_certification** | **bool** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] **birthday** | **\DateTime** | The birthday of the individual associated with the form. | [optional] **employee_first_name** | **string** | The first name of the employee. | [optional] diff --git a/docs/A1099/EntryStatusResponse.md b/docs/A1099/EntryStatusResponse.md new file mode 100644 index 0000000..72187f3 --- /dev/null +++ b/docs/A1099/EntryStatusResponse.md @@ -0,0 +1,10 @@ +# # EntryStatusResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **string** | The form status. | [optional] +**time** | **\DateTime** | The timestamp for the latest status update. | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/ErrorResponse.md b/docs/A1099/ErrorResponse.md index 2dee3ca..20d4d39 100644 --- a/docs/A1099/ErrorResponse.md +++ b/docs/A1099/ErrorResponse.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **string** | | [optional] -**errors** | [**\AvalaraSDK\ModelA1099V2\ErrorResponseItem[]**](ErrorResponseItem.md) | | [optional] +**errors** | [**\Avalara\SDK\Model\A1099\V2\ErrorResponseItem[]**](ErrorResponseItem.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/Form1042S.md b/docs/A1099/Form1042S.md index 282a2c2..d85c9c5 100644 --- a/docs/A1099/Form1042S.md +++ b/docs/A1099/Form1042S.md @@ -4,67 +4,67 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**unique_form_id** | **string** | | [optional] -**recipient_date_of_birth** | **\DateTime** | | [optional] -**recipient_giin** | **string** | | [optional] -**recipient_foreign_tin** | **string** | | [optional] -**lob_code** | **string** | | [optional] -**income_code** | **string** | | [optional] -**gross_income** | **float** | | [optional] -**withholding_indicator** | **string** | | [optional] -**tax_country_code** | **string** | | [optional] -**exemption_code_chap3** | **string** | | [optional] -**exemption_code_chap4** | **string** | | [optional] -**tax_rate_chap3** | **string** | | [optional] -**withholding_allowance** | **float** | | [optional] -**federal_tax_withheld** | **float** | | [optional] -**tax_not_deposited_indicator** | **bool** | | [optional] -**academic_indicator** | **bool** | | [optional] -**tax_withheld_other_agents** | **float** | | [optional] -**amount_repaid** | **float** | | [optional] -**tax_paid_agent** | **float** | | [optional] -**chap3_status_code** | **string** | | [optional] -**chap4_status_code** | **string** | | [optional] -**primary_withholding_agent** | [**\AvalaraSDK\ModelA1099V2\PrimaryWithholdingAgent**](PrimaryWithholdingAgent.md) | | [optional] -**intermediary_or_flow_through** | [**\AvalaraSDK\ModelA1099V2\IntermediaryOrFlowThrough**](IntermediaryOrFlowThrough.md) | | [optional] -**id** | **string** | | [optional] -**type** | **string** | | [optional] -**issuer_id** | **int** | | [optional] -**issuer_reference_id** | **string** | | [optional] -**issuer_tin** | **string** | | [optional] -**tax_year** | **int** | | [optional] -**federal_efile** | **bool** | | [optional] -**federal_efile_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**state_efile** | **bool** | | [optional] -**state_efile_status** | [**\AvalaraSDK\ModelA1099V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | | [optional] -**postal_mail** | **bool** | | [optional] -**postal_mail_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**tin_match** | **bool** | | [optional] -**tin_match_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**address_verification** | **bool** | | [optional] -**address_verification_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**e_delivery_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**reference_id** | **string** | | [optional] -**email** | **string** | | [optional] -**tin_type** | **string** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**tin** | **string** | | [optional] -**no_tin** | **bool** | | [optional] -**second_tin_notice** | **bool** | | [optional] -**recipient_name** | **string** | | [optional] -**recipient_second_name** | **string** | | [optional] -**address** | **string** | | [optional] -**address2** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**zip** | **string** | | [optional] -**non_us_province** | **string** | | [optional] -**country_code** | **string** | | [optional] -**account_number** | **string** | | [optional] -**office_code** | **string** | | [optional] -**validation_errors** | [**\AvalaraSDK\ModelA1099V2\ValidationError[]**](ValidationError.md) | | [optional] -**created_at** | **\DateTime** | | [optional] -**updated_at** | **\DateTime** | | [optional] -**state_and_local_withholding** | [**\AvalaraSDK\ModelA1099V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] +**tin_type** | **string** | | [optional] [readonly] +**unique_form_id** | **string** | Unique form identifier | +**recipient_date_of_birth** | **\DateTime** | Recipient's date of birth | [optional] +**recipient_giin** | **string** | Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'. | [optional] +**recipient_foreign_tin** | **string** | Recipient's foreign TIN. Required if email is specified, must fill either this or Chap3StatusCode. | [optional] +**lob_code** | **string** | Limitation on Benefits (LOB) code for tax treaty purposes. Available values: - 01: Individual (Deprecated - valid only for tax years prior to 2019) - 02: Government - contracting state/political subdivision/local authority - 03: Tax exempt pension trust/Pension fund - 04: Tax exempt/Charitable organization - 05: Publicly-traded corporation - 06: Subsidiary of publicly-traded corporation - 07: Company that meets the ownership and base erosion test - 08: Company that meets the derivative benefits test - 09: Company with an item of income that meets the active trade or business test - 10: Discretionary determination - 11: Other - 12: No LOB article in treaty | [optional] +**income_code** | **string** | Income code. Available values: Interest: - 01: Interest paid by US obligors - general - 02: Interest paid on real property mortgages - 03: Interest paid to controlling foreign corporations - 04: Interest paid by foreign corporations - 05: Interest on tax-free covenant bonds - 22: Interest paid on deposit with a foreign branch of a domestic corporation or partnership - 29: Deposit interest - 30: Original issue discount (OID) - 31: Short-term OID - 33: Substitute payment - interest - 51: Interest paid on certain actively traded or publicly offered securities(1) - 54: Substitute payments - interest from certain actively traded or publicly offered securities(1) Dividend: - 06: Dividends paid by U.S. corporations - general - 07: Dividends qualifying for direct dividend rate - 08: Dividends paid by foreign corporations - 34: Substitute payment - dividends - 40: Other dividend equivalents under IRC section 871(m) (formerly 871(l)) - 52: Dividends paid on certain actively traded or publicly offered securities(1) - 53: Substitute payments - dividends from certain actively traded or publicly offered securities(1) - 56: Dividend equivalents under IRC section 871(m) as a result of applying the combined transaction rules Other: - 09: Capital gains - 10: Industrial royalties - 11: Motion picture or television copyright royalties - 12: Other royalties (for example, copyright, software, broadcasting, endorsement payments) - 13: Royalties paid on certain publicly offered securities(1) - 14: Real property income and natural resources royalties - 15: Pensions, annuities, alimony, and/or insurance premiums - 16: Scholarship or fellowship grants - 17: Compensation for independent personal services(2) - 18: Compensation for dependent personal services(2) - 19: Compensation for teaching(2) - 20: Compensation during studying and training(2) - 23: Other income - 24: Qualified investment entity (QIE) distributions of capital gains - 25: Trust distributions subject to IRC section 1445 - 26: Unsevered growing crops and timber distributions by a trust subject to IRC section 1445 - 27: Publicly traded partnership distributions subject to IRC section 1446 - 28: Gambling winnings(3) - 32: Notional principal contract income(4) - 35: Substitute payment - other - 36: Capital gains distributions - 37: Return of capital - 38: Eligible deferred compensation items subject to IRC section 877A(d)(1) - 39: Distributions from a nongrantor trust subject to IRC section 877A(f)(1) - 41: Guarantee of indebtedness - 42: Earnings as an artist or athlete - no central withholding agreement(5) - 43: Earnings as an artist or athlete - central withholding agreement(5) - 44: Specified Federal procurement payments - 50: Income previously reported under escrow procedure(6) - 55: Taxable death benefits on life insurance contracts - 57: Amount realized under IRC section 1446(f) - 58: Publicly traded partnership distributions-undetermined | +**gross_income** | **float** | Gross income | +**withholding_indicator** | **string** | Withholding indicator Available values: - 3: Chapter 3 - 4: Chapter 4 | +**tax_country_code** | **string** | Country code | +**exemption_code_chap3** | **string** | Exemption code (Chapter 3). Required if WithholdingIndicator is 3 (Chapter 3). Required when using TaxRateChap3. Available values: - Empty: Tax rate is due to backup withholding - 00: Not exempt - 01: Effectively connected income - 02: Exempt under IRC (other than portfolio interest) - 03: Income is not from US sources - 04: Exempt under tax treaty - 05: Portfolio interest exempt under IRC - 06: QI that assumes primary withholding responsibility - 07: WFP or WFT - 08: U.S. branch treated as U.S. Person - 09: Territory FI treated as U.S. Person - 10: QI represents that income is exempt - 11: QSL that assumes primary withholding responsibility - 12: Payee subjected to chapter 4 withholding - 22: QDD that assumes primary withholding responsibility - 23: Exempt under section 897(l) - 24: Exempt under section 892 | [optional] +**exemption_code_chap4** | **string** | Exemption code (Chapter 4). Required if WithholdingIndicator is 4 (Chapter 4). Available values: - 00: Not exempt - 13: Grandfathered payment - 14: Effectively connected income - 15: Payee not subject to chapter 4 withholding - 16: Excluded nonfinancial payment - 17: Foreign Entity that assumes primary withholding responsibility - 18: U.S. Payees - of participating FFI or registered deemed - compliant FFI - 19: Exempt from withholding under IGA(6) - 20: Dormant account(7) - 21: Other - payment not subject to chapter 4 withholding | [optional] +**tax_rate_chap3** | **string** | Tax rate (Chapter 3) - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 00.00: 0.00% - 02.00: 2.00% - 04.00: 4.00% - 04.90: 4.90% - 04.95: 4.95% - 05.00: 5.00% - 07.00: 7.00% - 08.00: 8.00% - 10.00: 10.00% - 12.00: 12.00% - 12.50: 12.50% - 14.00: 14.00% - 15.00: 15.00% - 17.50: 17.50% - 20.00: 20.00% - 21.00: 21.00% - 24.00: 24.00% - 25.00: 25.00% - 27.50: 27.50% - 28.00: 28.00% - 30.00: 30.00% - 37.00: 37.00% | [optional] +**withholding_allowance** | **float** | Withholding allowance | [optional] +**federal_tax_withheld** | **float** | Federal tax withheld | [optional] +**tax_not_deposited_indicator** | **bool** | Tax not deposited indicator | [optional] +**academic_indicator** | **bool** | Academic indicator | [optional] +**tax_withheld_other_agents** | **float** | Tax withheld by other agents | [optional] +**amount_repaid** | **float** | Amount repaid to recipient | [optional] +**tax_paid_agent** | **float** | Tax paid by withholding agent | [optional] +**chap3_status_code** | **string** | Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3) Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary | [optional] +**chap4_status_code** | **string** | Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI | [optional] +**primary_withholding_agent** | [**\Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgent**](PrimaryWithholdingAgent.md) | Primary withholding agent information | [optional] +**intermediary_or_flow_through** | [**\Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThrough**](IntermediaryOrFlowThrough.md) | Intermediary or flow-through entity information | [optional] +**type** | **string** | Form type | +**id** | **string** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] +**issuer_id** | **string** | Issuer ID - only required when creating forms | [optional] +**issuer_reference_id** | **string** | Issuer Reference ID - only required when creating forms | [optional] +**issuer_tin** | **string** | Issuer TIN - readonly | [optional] +**tax_year** | **int** | Tax Year - only required when creating forms | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**tin** | **string** | Recipient's Federal Tax Identification Number (TIN). | [optional] +**recipient_name** | **string** | Recipient name | +**recipient_second_name** | **string** | Recipient second name | [optional] +**address** | **string** | Address. | +**address2** | **string** | Address line 2. | [optional] +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | [optional] +**email** | **string** | Recipient's Contact email address. | [optional] +**account_number** | **string** | Account number | [optional] +**office_code** | **string** | Office code | [optional] +**non_us_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**federal_efile_date** | **\DateTime** | Date when federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_efile_date** | **\DateTime** | Date when state e-filing should be scheduled for this form | [optional] +**recipient_edelivery_date** | **\DateTime** | Date when recipient e-delivery should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**federal_efile_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] +**state_efile_status** | [**\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] +**postal_mail_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] +**address_verification_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] +**e_delivery_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] +**validation_errors** | [**\Avalara\SDK\Model\A1099\V2\ValidationError[]**](ValidationError.md) | Validation errors | [optional] [readonly] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] [readonly] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] [readonly] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/Form1095B.md b/docs/A1099/Form1095B.md index f487f16..2ecdd66 100644 --- a/docs/A1099/Form1095B.md +++ b/docs/A1099/Form1095B.md @@ -4,46 +4,51 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**origin_of_health_coverage_code** | **string** | | [optional] -**covered_individuals** | [**\AvalaraSDK\ModelA1099V2\CoveredIndividualReference[]**](CoveredIndividualReference.md) | | [optional] -**id** | **string** | | [optional] -**type** | **string** | | [optional] -**issuer_id** | **int** | | [optional] -**issuer_reference_id** | **string** | | [optional] -**issuer_tin** | **string** | | [optional] -**tax_year** | **int** | | [optional] -**federal_efile** | **bool** | | [optional] -**federal_efile_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**state_efile** | **bool** | | [optional] -**state_efile_status** | [**\AvalaraSDK\ModelA1099V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | | [optional] -**postal_mail** | **bool** | | [optional] -**postal_mail_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**tin_match** | **bool** | | [optional] -**tin_match_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**address_verification** | **bool** | | [optional] -**address_verification_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**e_delivery_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**reference_id** | **string** | | [optional] -**email** | **string** | | [optional] -**tin_type** | **string** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**tin** | **string** | | [optional] -**no_tin** | **bool** | | [optional] -**second_tin_notice** | **bool** | | [optional] -**recipient_name** | **string** | | [optional] -**recipient_second_name** | **string** | | [optional] -**address** | **string** | | [optional] -**address2** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**zip** | **string** | | [optional] -**non_us_province** | **string** | | [optional] -**country_code** | **string** | | [optional] -**account_number** | **string** | | [optional] -**office_code** | **string** | | [optional] -**validation_errors** | [**\AvalaraSDK\ModelA1099V2\ValidationError[]**](ValidationError.md) | | [optional] -**created_at** | **\DateTime** | | [optional] -**updated_at** | **\DateTime** | | [optional] -**state_and_local_withholding** | [**\AvalaraSDK\ModelA1099V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] +**employee_first_name** | **string** | Employee's first name | +**employee_middle_name** | **string** | Employee's middle name | [optional] +**employee_last_name** | **string** | Employee's last name | +**employee_name_suffix** | **string** | Employee's name suffix | [optional] +**employee_date_of_birth** | **\DateTime** | Employee's date of birth | [optional] +**origin_of_health_coverage_code** | **string** | Origin of health coverage code Available values: - A: Small Business Health Options Program (SHOP) - B: Employer-sponsored coverage - C: Government-sponsored program - D: Individual market insurance - E: Multiemployer plan - F: Other designated minimum essential coverage - G: Employer-sponsored coverage that is an individual coverage HRA (valid for tax years 2020 and later) | +**covered_individuals** | [**\Avalara\SDK\Model\A1099\V2\CoveredIndividual[]**](CoveredIndividual.md) | Covered individuals information - At least one month of coverage must be entered if it's not a correction. | [optional] +**type** | **string** | Form type | +**id** | **string** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] +**issuer_id** | **string** | Issuer ID - only required when creating forms | [optional] +**issuer_reference_id** | **string** | Issuer Reference ID - only required when creating forms | [optional] +**issuer_tin** | **string** | Issuer TIN - readonly | [optional] +**tax_year** | **int** | Tax Year - only required when creating forms | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**tin** | **string** | Recipient's Federal Tax Identification Number (TIN). | [optional] +**recipient_name** | **string** | Recipient name | +**tin_type** | **string** | Type of TIN (Tax ID Number) | [optional] +**recipient_second_name** | **string** | Recipient second name | [optional] +**address** | **string** | Address. | +**address2** | **string** | Address line 2. | [optional] +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | [optional] +**email** | **string** | Recipient's Contact email address. | [optional] +**account_number** | **string** | Account number | [optional] +**office_code** | **string** | Office code | [optional] +**non_us_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**federal_efile_date** | **\DateTime** | Date when federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_efile_date** | **\DateTime** | Date when state e-filing should be scheduled for this form | [optional] +**recipient_edelivery_date** | **\DateTime** | Date when recipient e-delivery should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**federal_efile_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] +**state_efile_status** | [**\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] +**postal_mail_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] +**address_verification_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] +**e_delivery_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] +**validation_errors** | [**\Avalara\SDK\Model\A1099\V2\ValidationError[]**](ValidationError.md) | Validation errors | [optional] [readonly] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] [readonly] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] [readonly] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/Form1095C.md b/docs/A1099/Form1095C.md new file mode 100644 index 0000000..86050c0 --- /dev/null +++ b/docs/A1099/Form1095C.md @@ -0,0 +1,56 @@ +# # Form1095C + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**employee_first_name** | **string** | Employee's first name | +**employee_middle_name** | **string** | Employee's middle name | [optional] +**employee_last_name** | **string** | Employee's last name | +**employee_name_suffix** | **string** | Employee's name suffix | [optional] +**recipient_date_of_birth** | **\DateTime** | Recipient's date of birth | [optional] +**plan_start_month** | **string** | Plan start month. The calendar month during which the plan year begins of the health plan in which the employee is offered coverage (or would be offered coverage if the employee were eligible to participate in the plan). Available values: - 00: None - 01: January - 02: February - 03: March - 04: April - 05: May - 06: June - 07: July - 08: August - 09: September - 10: October - 11: November - 12: December | +**employer_provided_si_coverage** | **bool** | Employer provided self-insured coverage | [optional] +**offer_and_coverages** | [**\Avalara\SDK\Model\A1099\V2\OfferAndCoverage[]**](OfferAndCoverage.md) | Offer and coverage information | +**covered_individuals** | [**\Avalara\SDK\Model\A1099\V2\CoveredIndividual[]**](CoveredIndividual.md) | Covered individuals information | [optional] +**type** | **string** | Form type | +**id** | **string** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] +**issuer_id** | **string** | Issuer ID - only required when creating forms | [optional] +**issuer_reference_id** | **string** | Issuer Reference ID - only required when creating forms | [optional] +**issuer_tin** | **string** | Issuer TIN - readonly | [optional] +**tax_year** | **int** | Tax Year - only required when creating forms | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**tin** | **string** | Recipient's Federal Tax Identification Number (TIN). | [optional] +**recipient_name** | **string** | Recipient name | +**tin_type** | **string** | Type of TIN (Tax ID Number) | [optional] +**recipient_second_name** | **string** | Recipient second name | [optional] +**address** | **string** | Address. | +**address2** | **string** | Address line 2. | [optional] +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | [optional] +**email** | **string** | Recipient's Contact email address. | [optional] +**account_number** | **string** | Account number | [optional] +**office_code** | **string** | Office code | [optional] +**non_us_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**federal_efile_date** | **\DateTime** | Date when federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_efile_date** | **\DateTime** | Date when state e-filing should be scheduled for this form | [optional] +**recipient_edelivery_date** | **\DateTime** | Date when recipient e-delivery should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**federal_efile_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] +**state_efile_status** | [**\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] +**postal_mail_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] +**address_verification_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] +**e_delivery_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] +**validation_errors** | [**\Avalara\SDK\Model\A1099\V2\ValidationError[]**](ValidationError.md) | Validation errors | [optional] [readonly] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] [readonly] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] [readonly] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/Form1099Base.md b/docs/A1099/Form1099Base.md index 567dde4..6ecab6d 100644 --- a/docs/A1099/Form1099Base.md +++ b/docs/A1099/Form1099Base.md @@ -4,44 +4,44 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | | [optional] -**type** | **string** | | [optional] -**issuer_id** | **int** | | [optional] -**issuer_reference_id** | **string** | | [optional] -**issuer_tin** | **string** | | [optional] -**tax_year** | **int** | | [optional] -**federal_efile** | **bool** | | [optional] -**federal_efile_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**state_efile** | **bool** | | [optional] -**state_efile_status** | [**\AvalaraSDK\ModelA1099V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | | [optional] -**postal_mail** | **bool** | | [optional] -**postal_mail_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**tin_match** | **bool** | | [optional] -**tin_match_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**address_verification** | **bool** | | [optional] -**address_verification_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**e_delivery_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**reference_id** | **string** | | [optional] -**email** | **string** | | [optional] -**tin_type** | **string** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**tin** | **string** | | [optional] -**no_tin** | **bool** | | [optional] -**second_tin_notice** | **bool** | | [optional] -**recipient_name** | **string** | | [optional] -**recipient_second_name** | **string** | | [optional] -**address** | **string** | | [optional] -**address2** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**zip** | **string** | | [optional] -**non_us_province** | **string** | | [optional] -**country_code** | **string** | | [optional] -**account_number** | **string** | | [optional] -**office_code** | **string** | | [optional] -**validation_errors** | [**\AvalaraSDK\ModelA1099V2\ValidationError[]**](ValidationError.md) | | [optional] -**created_at** | **\DateTime** | | [optional] -**updated_at** | **\DateTime** | | [optional] -**state_and_local_withholding** | [**\AvalaraSDK\ModelA1099V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] +**type** | **string** | Form type | +**id** | **string** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] +**issuer_id** | **string** | Issuer ID - only required when creating forms | [optional] +**issuer_reference_id** | **string** | Issuer Reference ID - only required when creating forms | [optional] +**issuer_tin** | **string** | Issuer TIN - readonly | [optional] +**tax_year** | **int** | Tax Year - only required when creating forms | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**tin** | **string** | Recipient's Federal Tax Identification Number (TIN). | [optional] +**recipient_name** | **string** | Recipient name | +**tin_type** | **string** | Type of TIN (Tax ID Number) | [optional] +**recipient_second_name** | **string** | Recipient second name | [optional] +**address** | **string** | Address. | +**address2** | **string** | Address line 2. | [optional] +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | [optional] +**email** | **string** | Recipient's Contact email address. | [optional] +**account_number** | **string** | Account number | [optional] +**office_code** | **string** | Office code | [optional] +**non_us_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**federal_efile_date** | **\DateTime** | Date when federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_efile_date** | **\DateTime** | Date when state e-filing should be scheduled for this form | [optional] +**recipient_edelivery_date** | **\DateTime** | Date when recipient e-delivery should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**federal_efile_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] +**state_efile_status** | [**\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] +**postal_mail_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] +**address_verification_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] +**e_delivery_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] +**validation_errors** | [**\Avalara\SDK\Model\A1099\V2\ValidationError[]**](ValidationError.md) | Validation errors | [optional] [readonly] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] [readonly] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] [readonly] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/Form1099Div.md b/docs/A1099/Form1099Div.md index bc22d75..8a192f8 100644 --- a/docs/A1099/Form1099Div.md +++ b/docs/A1099/Form1099Div.md @@ -4,62 +4,63 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**total_ordinary_dividends** | **float** | | [optional] -**qualified_dividends** | **float** | | [optional] -**total_capital_gain_distributions** | **float** | | [optional] -**unrecaptured_section1250_gain** | **float** | | [optional] -**section1202_gain** | **float** | | [optional] -**collectibles_gain** | **float** | | [optional] -**section897_ordinary_dividends** | **float** | | [optional] -**section897_capital_gain** | **float** | | [optional] -**nondividend_distributions** | **float** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**section199_a_dividends** | **float** | | [optional] -**investment_expenses** | **float** | | [optional] -**foreign_tax_paid** | **float** | | [optional] -**foreign_country_or_us_possession** | **string** | | [optional] -**cash_liquidation_distributions** | **float** | | [optional] -**noncash_liquidation_distributions** | **float** | | [optional] -**exempt_interest_dividends** | **float** | | [optional] -**specified_private_activity_bond_interest_dividends** | **float** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**id** | **string** | | [optional] -**type** | **string** | | [optional] -**issuer_id** | **int** | | [optional] -**issuer_reference_id** | **string** | | [optional] -**issuer_tin** | **string** | | [optional] -**tax_year** | **int** | | [optional] -**federal_efile** | **bool** | | [optional] -**federal_efile_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**state_efile** | **bool** | | [optional] -**state_efile_status** | [**\AvalaraSDK\ModelA1099V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | | [optional] -**postal_mail** | **bool** | | [optional] -**postal_mail_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**tin_match** | **bool** | | [optional] -**tin_match_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**address_verification** | **bool** | | [optional] -**address_verification_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**e_delivery_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**reference_id** | **string** | | [optional] -**email** | **string** | | [optional] -**tin_type** | **string** | | [optional] -**tin** | **string** | | [optional] -**no_tin** | **bool** | | [optional] -**second_tin_notice** | **bool** | | [optional] -**recipient_name** | **string** | | [optional] -**recipient_second_name** | **string** | | [optional] -**address** | **string** | | [optional] -**address2** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**zip** | **string** | | [optional] -**non_us_province** | **string** | | [optional] -**country_code** | **string** | | [optional] -**account_number** | **string** | | [optional] -**office_code** | **string** | | [optional] -**validation_errors** | [**\AvalaraSDK\ModelA1099V2\ValidationError[]**](ValidationError.md) | | [optional] -**created_at** | **\DateTime** | | [optional] -**updated_at** | **\DateTime** | | [optional] -**state_and_local_withholding** | [**\AvalaraSDK\ModelA1099V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] +**total_ordinary_dividends** | **float** | Total ordinary dividends | [optional] +**qualified_dividends** | **float** | Qualified dividends | [optional] +**total_capital_gain_distributions** | **float** | Total capital gain distributions | [optional] +**unrecaptured_section1250_gain** | **float** | Unrecaptured Section 1250 gain | [optional] +**section1202_gain** | **float** | Section 1202 gain | [optional] +**collectibles_gain** | **float** | Collectibles (28%) gain | [optional] +**section897_ordinary_dividends** | **float** | Section 897 ordinary dividends | [optional] +**section897_capital_gain** | **float** | Section 897 capital gain | [optional] +**nondividend_distributions** | **float** | Nondividend distributions | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**section199_a_dividends** | **float** | Section 199A dividends | [optional] +**investment_expenses** | **float** | Investment expenses | [optional] +**foreign_tax_paid** | **float** | Foreign tax paid | [optional] +**foreign_country_or_us_possession** | **string** | Foreign country or U.S. possession | [optional] +**cash_liquidation_distributions** | **float** | Cash liquidation distributions | [optional] +**noncash_liquidation_distributions** | **float** | Noncash liquidation distributions | [optional] +**exempt_interest_dividends** | **float** | Exempt-interest dividends | [optional] +**specified_private_activity_bond_interest_dividends** | **float** | Specified private activity bond interest dividends | [optional] +**fatca_filing_requirement** | **bool** | FATCA filing requirement | [optional] +**type** | **string** | Form type | +**id** | **string** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] +**issuer_id** | **string** | Issuer ID - only required when creating forms | [optional] +**issuer_reference_id** | **string** | Issuer Reference ID - only required when creating forms | [optional] +**issuer_tin** | **string** | Issuer TIN - readonly | [optional] +**tax_year** | **int** | Tax Year - only required when creating forms | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**tin** | **string** | Recipient's Federal Tax Identification Number (TIN). | [optional] +**recipient_name** | **string** | Recipient name | +**tin_type** | **string** | Type of TIN (Tax ID Number) | [optional] +**recipient_second_name** | **string** | Recipient second name | [optional] +**address** | **string** | Address. | +**address2** | **string** | Address line 2. | [optional] +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | [optional] +**email** | **string** | Recipient's Contact email address. | [optional] +**account_number** | **string** | Account number | [optional] +**office_code** | **string** | Office code | [optional] +**non_us_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**federal_efile_date** | **\DateTime** | Date when federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_efile_date** | **\DateTime** | Date when state e-filing should be scheduled for this form | [optional] +**recipient_edelivery_date** | **\DateTime** | Date when recipient e-delivery should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**federal_efile_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] +**state_efile_status** | [**\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] +**postal_mail_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] +**address_verification_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] +**e_delivery_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] +**validation_errors** | [**\Avalara\SDK\Model\A1099\V2\ValidationError[]**](ValidationError.md) | Validation errors | [optional] [readonly] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] [readonly] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] [readonly] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/Form1099Int.md b/docs/A1099/Form1099Int.md index 430f4c8..7c64eda 100644 --- a/docs/A1099/Form1099Int.md +++ b/docs/A1099/Form1099Int.md @@ -4,58 +4,59 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**interest_income** | **float** | | [optional] -**early_withdrawal_penalty** | **float** | | [optional] -**us_savings_bonds_interest** | **float** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**investment_expenses** | **float** | | [optional] -**foreign_tax_paid** | **float** | | [optional] -**foreign_country** | **string** | | [optional] -**tax_exempt_interest** | **float** | | [optional] -**specified_private_activity_bond_interest** | **float** | | [optional] -**market_discount** | **float** | | [optional] -**bond_premium** | **float** | | [optional] -**bond_premium_on_treasury_obligations** | **float** | | [optional] -**bond_premium_on_tax_exempt_bond** | **float** | | [optional] -**tax_exempt_bond_cusip_number** | **string** | | [optional] -**id** | **string** | | [optional] -**type** | **string** | | [optional] -**issuer_id** | **int** | | [optional] -**issuer_reference_id** | **string** | | [optional] -**issuer_tin** | **string** | | [optional] -**tax_year** | **int** | | [optional] -**federal_efile** | **bool** | | [optional] -**federal_efile_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**state_efile** | **bool** | | [optional] -**state_efile_status** | [**\AvalaraSDK\ModelA1099V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | | [optional] -**postal_mail** | **bool** | | [optional] -**postal_mail_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**tin_match** | **bool** | | [optional] -**tin_match_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**address_verification** | **bool** | | [optional] -**address_verification_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**e_delivery_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**reference_id** | **string** | | [optional] -**email** | **string** | | [optional] -**tin_type** | **string** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**tin** | **string** | | [optional] -**no_tin** | **bool** | | [optional] -**second_tin_notice** | **bool** | | [optional] -**recipient_name** | **string** | | [optional] -**recipient_second_name** | **string** | | [optional] -**address** | **string** | | [optional] -**address2** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**zip** | **string** | | [optional] -**non_us_province** | **string** | | [optional] -**country_code** | **string** | | [optional] -**account_number** | **string** | | [optional] -**office_code** | **string** | | [optional] -**validation_errors** | [**\AvalaraSDK\ModelA1099V2\ValidationError[]**](ValidationError.md) | | [optional] -**created_at** | **\DateTime** | | [optional] -**updated_at** | **\DateTime** | | [optional] -**state_and_local_withholding** | [**\AvalaraSDK\ModelA1099V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] +**interest_income** | **float** | Interest Income | [optional] +**early_withdrawal_penalty** | **float** | Early Withdrawal Penalty | [optional] +**us_savings_bonds_interest** | **float** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**investment_expenses** | **float** | Investment Expenses | [optional] +**foreign_tax_paid** | **float** | Foreign tax paid | [optional] +**foreign_country** | **string** | Foreign country or U.S. possession | [optional] +**tax_exempt_interest** | **float** | Tax-Exempt Interest | [optional] +**specified_private_activity_bond_interest** | **float** | Specified Private activity | [optional] +**market_discount** | **float** | Market Discount | [optional] +**bond_premium** | **float** | Bond Premium | [optional] +**bond_premium_on_treasury_obligations** | **float** | Bond Premium on Treasury obligations | [optional] +**bond_premium_on_tax_exempt_bond** | **float** | Bond Premium on tax exempt bond | [optional] +**tax_exempt_bond_cusip_number** | **string** | Tax exempt bond CUSIP no. | [optional] +**fatca_filing_requirement** | **bool** | FATCA filing requirement | [optional] +**type** | **string** | Form type | +**id** | **string** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] +**issuer_id** | **string** | Issuer ID - only required when creating forms | [optional] +**issuer_reference_id** | **string** | Issuer Reference ID - only required when creating forms | [optional] +**issuer_tin** | **string** | Issuer TIN - readonly | [optional] +**tax_year** | **int** | Tax Year - only required when creating forms | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**tin** | **string** | Recipient's Federal Tax Identification Number (TIN). | [optional] +**recipient_name** | **string** | Recipient name | +**tin_type** | **string** | Type of TIN (Tax ID Number) | [optional] +**recipient_second_name** | **string** | Recipient second name | [optional] +**address** | **string** | Address. | +**address2** | **string** | Address line 2. | [optional] +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | [optional] +**email** | **string** | Recipient's Contact email address. | [optional] +**account_number** | **string** | Account number | [optional] +**office_code** | **string** | Office code | [optional] +**non_us_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**federal_efile_date** | **\DateTime** | Date when federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_efile_date** | **\DateTime** | Date when state e-filing should be scheduled for this form | [optional] +**recipient_edelivery_date** | **\DateTime** | Date when recipient e-delivery should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**federal_efile_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] +**state_efile_status** | [**\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] +**postal_mail_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] +**address_verification_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] +**e_delivery_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] +**validation_errors** | [**\Avalara\SDK\Model\A1099\V2\ValidationError[]**](ValidationError.md) | Validation errors | [optional] [readonly] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] [readonly] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] [readonly] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/Form1099K.md b/docs/A1099/Form1099K.md index 2ca40d9..333fdc0 100644 --- a/docs/A1099/Form1099K.md +++ b/docs/A1099/Form1099K.md @@ -4,64 +4,64 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**filer_type** | **string** | | [optional] -**payment_type** | **string** | | [optional] -**payment_settlement_entity_name_phone_number** | **string** | | [optional] -**gross_amount_payment_card** | **float** | | [optional] -**card_not_present_transactions** | **float** | | [optional] -**merchant_category_code** | **string** | | [optional] -**payment_transaction_number** | **float** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**january** | **float** | | [optional] -**february** | **float** | | [optional] -**march** | **float** | | [optional] -**april** | **float** | | [optional] -**may** | **float** | | [optional] -**june** | **float** | | [optional] -**july** | **float** | | [optional] -**august** | **float** | | [optional] -**sept** | **float** | | [optional] -**october** | **float** | | [optional] -**november** | **float** | | [optional] -**december** | **float** | | [optional] -**id** | **string** | | [optional] -**type** | **string** | | [optional] -**issuer_id** | **int** | | [optional] -**issuer_reference_id** | **string** | | [optional] -**issuer_tin** | **string** | | [optional] -**tax_year** | **int** | | [optional] -**federal_efile** | **bool** | | [optional] -**federal_efile_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**state_efile** | **bool** | | [optional] -**state_efile_status** | [**\AvalaraSDK\ModelA1099V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | | [optional] -**postal_mail** | **bool** | | [optional] -**postal_mail_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**tin_match** | **bool** | | [optional] -**tin_match_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**address_verification** | **bool** | | [optional] -**address_verification_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**e_delivery_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**reference_id** | **string** | | [optional] -**email** | **string** | | [optional] -**tin_type** | **string** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**tin** | **string** | | [optional] -**no_tin** | **bool** | | [optional] -**second_tin_notice** | **bool** | | [optional] -**recipient_name** | **string** | | [optional] -**recipient_second_name** | **string** | | [optional] -**address** | **string** | | [optional] -**address2** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**zip** | **string** | | [optional] -**non_us_province** | **string** | | [optional] -**country_code** | **string** | | [optional] -**account_number** | **string** | | [optional] -**office_code** | **string** | | [optional] -**validation_errors** | [**\AvalaraSDK\ModelA1099V2\ValidationError[]**](ValidationError.md) | | [optional] -**created_at** | **\DateTime** | | [optional] -**updated_at** | **\DateTime** | | [optional] -**state_and_local_withholding** | [**\AvalaraSDK\ModelA1099V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] +**filer_type** | **string** | Filer type (PSE or EPF) | [optional] +**payment_type** | **string** | Payment type (payment card or third party network) | [optional] +**payment_settlement_entity_name_phone_number** | **string** | Payment settlement entity name and phone number | [optional] +**gross_amount_payment_card** | **float** | Gross amount of payment card/third party network transactions | [optional] +**card_not_present_transactions** | **float** | Card not present transactions | [optional] +**merchant_category_code** | **string** | Merchant category code | [optional] +**payment_transaction_number** | **float** | Number of payment transactions | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**january** | **float** | January gross payments | [optional] +**february** | **float** | February gross payments | [optional] +**march** | **float** | March gross payments | [optional] +**april** | **float** | April gross payments | [optional] +**may** | **float** | May gross payments | [optional] +**june** | **float** | June gross payments | [optional] +**july** | **float** | July gross payments | [optional] +**august** | **float** | August gross payments | [optional] +**september** | **float** | September gross payments | [optional] +**october** | **float** | October gross payments | [optional] +**november** | **float** | November gross payments | [optional] +**december** | **float** | December gross payments | [optional] +**type** | **string** | Form type | +**id** | **string** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] +**issuer_id** | **string** | Issuer ID - only required when creating forms | [optional] +**issuer_reference_id** | **string** | Issuer Reference ID - only required when creating forms | [optional] +**issuer_tin** | **string** | Issuer TIN - readonly | [optional] +**tax_year** | **int** | Tax Year - only required when creating forms | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**tin** | **string** | Recipient's Federal Tax Identification Number (TIN). | [optional] +**recipient_name** | **string** | Recipient name | +**tin_type** | **string** | Type of TIN (Tax ID Number) | [optional] +**recipient_second_name** | **string** | Recipient second name | [optional] +**address** | **string** | Address. | +**address2** | **string** | Address line 2. | [optional] +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | [optional] +**email** | **string** | Recipient's Contact email address. | [optional] +**account_number** | **string** | Account number | [optional] +**office_code** | **string** | Office code | [optional] +**non_us_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**federal_efile_date** | **\DateTime** | Date when federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_efile_date** | **\DateTime** | Date when state e-filing should be scheduled for this form | [optional] +**recipient_edelivery_date** | **\DateTime** | Date when recipient e-delivery should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**federal_efile_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] +**state_efile_status** | [**\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] +**postal_mail_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] +**address_verification_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] +**e_delivery_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] +**validation_errors** | [**\Avalara\SDK\Model\A1099\V2\ValidationError[]**](ValidationError.md) | Validation errors | [optional] [readonly] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] [readonly] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] [readonly] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/Form1099ListRequest.md b/docs/A1099/Form1099ListRequest.md new file mode 100644 index 0000000..97f6233 --- /dev/null +++ b/docs/A1099/Form1099ListRequest.md @@ -0,0 +1,10 @@ +# # Form1099ListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] +**forms** | [**\Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]**](Get1099Form200Response.md) | | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/Form1099Misc.md b/docs/A1099/Form1099Misc.md index 5c8335c..4e82f95 100644 --- a/docs/A1099/Form1099Misc.md +++ b/docs/A1099/Form1099Misc.md @@ -4,58 +4,59 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**rents** | **float** | | [optional] -**royalties** | **float** | | [optional] -**other_income** | **float** | | [optional] -**fed_income_tax_withheld** | **float** | | [optional] -**fishing_boat_proceeds** | **float** | | [optional] -**medical_and_health_care_payments** | **float** | | [optional] -**substitute_payments** | **float** | | [optional] -**direct_sales_indicator** | **bool** | | [optional] -**crop_insurance_proceeds** | **float** | | [optional] -**excess_golden_parachute_payments** | **float** | | [optional] -**gross_proceeds_paid_to_attorney** | **float** | | [optional] -**fish_purchased_for_resale** | **float** | | [optional] -**section409_a_deferrals** | **float** | | [optional] -**nonqualified_deferred_compensation** | **float** | | [optional] -**id** | **string** | | [optional] -**type** | **string** | | [optional] -**issuer_id** | **int** | | [optional] -**issuer_reference_id** | **string** | | [optional] -**issuer_tin** | **string** | | [optional] -**tax_year** | **int** | | [optional] -**federal_efile** | **bool** | | [optional] -**federal_efile_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**state_efile** | **bool** | | [optional] -**state_efile_status** | [**\AvalaraSDK\ModelA1099V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | | [optional] -**postal_mail** | **bool** | | [optional] -**postal_mail_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**tin_match** | **bool** | | [optional] -**tin_match_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**address_verification** | **bool** | | [optional] -**address_verification_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**e_delivery_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**reference_id** | **string** | | [optional] -**email** | **string** | | [optional] -**tin_type** | **string** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**tin** | **string** | | [optional] -**no_tin** | **bool** | | [optional] -**second_tin_notice** | **bool** | | [optional] -**recipient_name** | **string** | | [optional] -**recipient_second_name** | **string** | | [optional] -**address** | **string** | | [optional] -**address2** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**zip** | **string** | | [optional] -**non_us_province** | **string** | | [optional] -**country_code** | **string** | | [optional] -**account_number** | **string** | | [optional] -**office_code** | **string** | | [optional] -**validation_errors** | [**\AvalaraSDK\ModelA1099V2\ValidationError[]**](ValidationError.md) | | [optional] -**created_at** | **\DateTime** | | [optional] -**updated_at** | **\DateTime** | | [optional] -**state_and_local_withholding** | [**\AvalaraSDK\ModelA1099V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] +**rents** | **float** | Rents | [optional] +**royalties** | **float** | Royalties | [optional] +**other_income** | **float** | Other income | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**fishing_boat_proceeds** | **float** | Fishing boat proceeds | [optional] +**medical_and_health_care_payments** | **float** | Medical and health care payments | [optional] +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**substitute_payments** | **float** | Substitute payments in lieu of dividends or interest | [optional] +**crop_insurance_proceeds** | **float** | Crop insurance proceeds | [optional] +**gross_proceeds_paid_to_attorney** | **float** | Gross proceeds paid to an attorney | [optional] +**fish_purchased_for_resale** | **float** | Fish purchased for resale | [optional] +**section409_a_deferrals** | **float** | Section 409A deferrals | [optional] +**excess_golden_parachute_payments** | **float** | (Legacy field) Excess golden parachute payments | [optional] +**nonqualified_deferred_compensation** | **float** | Nonqualified deferred compensation | [optional] +**fatca_filing_requirement** | **bool** | FATCA filing requirement | [optional] +**type** | **string** | Form type | +**id** | **string** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] +**issuer_id** | **string** | Issuer ID - only required when creating forms | [optional] +**issuer_reference_id** | **string** | Issuer Reference ID - only required when creating forms | [optional] +**issuer_tin** | **string** | Issuer TIN - readonly | [optional] +**tax_year** | **int** | Tax Year - only required when creating forms | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**tin** | **string** | Recipient's Federal Tax Identification Number (TIN). | [optional] +**recipient_name** | **string** | Recipient name | +**tin_type** | **string** | Type of TIN (Tax ID Number) | [optional] +**recipient_second_name** | **string** | Recipient second name | [optional] +**address** | **string** | Address. | +**address2** | **string** | Address line 2. | [optional] +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | [optional] +**email** | **string** | Recipient's Contact email address. | [optional] +**account_number** | **string** | Account number | [optional] +**office_code** | **string** | Office code | [optional] +**non_us_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**federal_efile_date** | **\DateTime** | Date when federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_efile_date** | **\DateTime** | Date when state e-filing should be scheduled for this form | [optional] +**recipient_edelivery_date** | **\DateTime** | Date when recipient e-delivery should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**federal_efile_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] +**state_efile_status** | [**\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] +**postal_mail_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] +**address_verification_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] +**e_delivery_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] +**validation_errors** | [**\Avalara\SDK\Model\A1099\V2\ValidationError[]**](ValidationError.md) | Validation errors | [optional] [readonly] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] [readonly] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] [readonly] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/Form1099Nec.md b/docs/A1099/Form1099Nec.md index 7ac5c23..63d4411 100644 --- a/docs/A1099/Form1099Nec.md +++ b/docs/A1099/Form1099Nec.md @@ -4,47 +4,47 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nonemployee_compensation** | **float** | | [optional] -**federal_income_tax_withheld** | **float** | | [optional] -**direct_sales_indicator** | **bool** | | [optional] -**id** | **string** | | [optional] -**type** | **string** | | [optional] -**issuer_id** | **int** | | [optional] -**issuer_reference_id** | **string** | | [optional] -**issuer_tin** | **string** | | [optional] -**tax_year** | **int** | | [optional] -**federal_efile** | **bool** | | [optional] -**federal_efile_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**state_efile** | **bool** | | [optional] -**state_efile_status** | [**\AvalaraSDK\ModelA1099V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | | [optional] -**postal_mail** | **bool** | | [optional] -**postal_mail_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**tin_match** | **bool** | | [optional] -**tin_match_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**address_verification** | **bool** | | [optional] -**address_verification_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**e_delivery_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**reference_id** | **string** | | [optional] -**email** | **string** | | [optional] -**tin_type** | **string** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**tin** | **string** | | [optional] -**no_tin** | **bool** | | [optional] -**second_tin_notice** | **bool** | | [optional] -**recipient_name** | **string** | | [optional] -**recipient_second_name** | **string** | | [optional] -**address** | **string** | | [optional] -**address2** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**zip** | **string** | | [optional] -**non_us_province** | **string** | | [optional] -**country_code** | **string** | | [optional] -**account_number** | **string** | | [optional] -**office_code** | **string** | | [optional] -**validation_errors** | [**\AvalaraSDK\ModelA1099V2\ValidationError[]**](ValidationError.md) | | [optional] -**created_at** | **\DateTime** | | [optional] -**updated_at** | **\DateTime** | | [optional] -**state_and_local_withholding** | [**\AvalaraSDK\ModelA1099V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] +**nonemployee_compensation** | **float** | Nonemployee compensation | +**direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**type** | **string** | Form type | +**id** | **string** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] +**issuer_id** | **string** | Issuer ID - only required when creating forms | [optional] +**issuer_reference_id** | **string** | Issuer Reference ID - only required when creating forms | [optional] +**issuer_tin** | **string** | Issuer TIN - readonly | [optional] +**tax_year** | **int** | Tax Year - only required when creating forms | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**tin** | **string** | Recipient's Federal Tax Identification Number (TIN). | [optional] +**recipient_name** | **string** | Recipient name | +**tin_type** | **string** | Type of TIN (Tax ID Number) | [optional] +**recipient_second_name** | **string** | Recipient second name | [optional] +**address** | **string** | Address. | +**address2** | **string** | Address line 2. | [optional] +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | [optional] +**email** | **string** | Recipient's Contact email address. | [optional] +**account_number** | **string** | Account number | [optional] +**office_code** | **string** | Office code | [optional] +**non_us_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**federal_efile_date** | **\DateTime** | Date when federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_efile_date** | **\DateTime** | Date when state e-filing should be scheduled for this form | [optional] +**recipient_edelivery_date** | **\DateTime** | Date when recipient e-delivery should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**federal_efile_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] +**state_efile_status** | [**\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] +**postal_mail_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] +**address_verification_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] +**e_delivery_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] +**validation_errors** | [**\Avalara\SDK\Model\A1099\V2\ValidationError[]**](ValidationError.md) | Validation errors | [optional] [readonly] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] [readonly] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] [readonly] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/Form1099R.md b/docs/A1099/Form1099R.md index a84f2c5..0ceabfe 100644 --- a/docs/A1099/Form1099R.md +++ b/docs/A1099/Form1099R.md @@ -4,63 +4,64 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**gross_distributions** | **float** | | [optional] -**taxable_amount** | **float** | | [optional] -**taxable_amount_not_determined** | **bool** | | [optional] -**total_distribution_indicator** | **bool** | | [optional] -**capital_gain** | **float** | | [optional] -**fed_income_tax_withheld** | **float** | | [optional] -**employee_contributions** | **float** | | [optional] -**net_unrealized_appreciation** | **float** | | [optional] -**distribution_code_required** | **string** | | [optional] -**distribution_code_optional** | **string** | | [optional] -**ira_sep_simple_indicator** | **bool** | | [optional] -**total_ira_sep_simple_distribution** | **float** | | [optional] -**other** | **float** | | [optional] -**other_percent** | **string** | | [optional] -**percentage_total_distribution** | **string** | | [optional] -**total_employee_contributions** | **float** | | [optional] -**amount_allocable_to_irr** | **float** | | [optional] -**first_year_designated_roth_contrib** | **string** | | [optional] -**date_of_payment** | **string** | | [optional] -**id** | **string** | | [optional] -**type** | **string** | | [optional] -**issuer_id** | **int** | | [optional] -**issuer_reference_id** | **string** | | [optional] -**issuer_tin** | **string** | | [optional] -**tax_year** | **int** | | [optional] -**federal_efile** | **bool** | | [optional] -**federal_efile_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**state_efile** | **bool** | | [optional] -**state_efile_status** | [**\AvalaraSDK\ModelA1099V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | | [optional] -**postal_mail** | **bool** | | [optional] -**postal_mail_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**tin_match** | **bool** | | [optional] -**tin_match_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**address_verification** | **bool** | | [optional] -**address_verification_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**e_delivery_status** | [**\AvalaraSDK\ModelA1099V2\Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] -**reference_id** | **string** | | [optional] -**email** | **string** | | [optional] -**tin_type** | **string** | | [optional] -**fatca_filing_requirement** | **bool** | | [optional] -**tin** | **string** | | [optional] -**no_tin** | **bool** | | [optional] -**second_tin_notice** | **bool** | | [optional] -**recipient_name** | **string** | | [optional] -**recipient_second_name** | **string** | | [optional] -**address** | **string** | | [optional] -**address2** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**zip** | **string** | | [optional] -**non_us_province** | **string** | | [optional] -**country_code** | **string** | | [optional] -**account_number** | **string** | | [optional] -**office_code** | **string** | | [optional] -**validation_errors** | [**\AvalaraSDK\ModelA1099V2\ValidationError[]**](ValidationError.md) | | [optional] -**created_at** | **\DateTime** | | [optional] -**updated_at** | **\DateTime** | | [optional] -**state_and_local_withholding** | [**\AvalaraSDK\ModelA1099V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] +**gross_distribution** | **float** | Gross distribution | [optional] +**taxable_amount** | **float** | Taxable amount | [optional] +**taxable_amount_not_determined** | **bool** | Taxable amount not determined | [optional] +**total_distribution_determined** | **bool** | Total distribution | [optional] +**capital_gain** | **float** | Capital gain (included in Box 2a) | [optional] +**federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] +**employee_contributions_or_designated_roth_or_insurance_premiums** | **float** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] +**net_unrealized_appreciation_in_employer_securities** | **float** | Net unrealized appreciation in employer's securities | [optional] +**distribution_code** | **string** | Distribution code | [optional] +**second_distribution_code** | **string** | Second distribution code | [optional] +**ira_sep_simple** | **bool** | IRA/SEP/SIMPLE | [optional] +**traditional_ira_sep_simple_or_roth_conversion_amount** | **float** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] +**other_amount** | **float** | Other amount | [optional] +**other_percentage** | **string** | Other percentage | [optional] +**total_distribution_percentage** | **string** | Total distribution percentage | [optional] +**total_employee_contributions** | **float** | Total employee contributions | [optional] +**amount_allocable_to_irr_within5_years** | **float** | Amount allocable to IRR within 5 years | [optional] +**first_year_of_designated_roth_contribution** | **string** | First year of designated Roth contribution | [optional] +**date_of_payment** | **\DateTime** | Date of payment | [optional] +**fatca_filing_requirement** | **bool** | FATCA filing requirement | [optional] +**type** | **string** | Form type | +**id** | **string** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] +**issuer_id** | **string** | Issuer ID - only required when creating forms | [optional] +**issuer_reference_id** | **string** | Issuer Reference ID - only required when creating forms | [optional] +**issuer_tin** | **string** | Issuer TIN - readonly | [optional] +**tax_year** | **int** | Tax Year - only required when creating forms | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**tin** | **string** | Recipient's Federal Tax Identification Number (TIN). | [optional] +**recipient_name** | **string** | Recipient name | +**tin_type** | **string** | Type of TIN (Tax ID Number) | [optional] +**recipient_second_name** | **string** | Recipient second name | [optional] +**address** | **string** | Address. | +**address2** | **string** | Address line 2. | [optional] +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | [optional] +**email** | **string** | Recipient's Contact email address. | [optional] +**account_number** | **string** | Account number | [optional] +**office_code** | **string** | Office code | [optional] +**non_us_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**federal_efile_date** | **\DateTime** | Date when federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_efile_date** | **\DateTime** | Date when state e-filing should be scheduled for this form | [optional] +**recipient_edelivery_date** | **\DateTime** | Date when recipient e-delivery should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**federal_efile_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] +**state_efile_status** | [**\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] +**postal_mail_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] +**address_verification_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] +**e_delivery_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] +**validation_errors** | [**\Avalara\SDK\Model\A1099\V2\ValidationError[]**](ValidationError.md) | Validation errors | [optional] [readonly] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] [readonly] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] [readonly] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/Get1099Form200Response.md b/docs/A1099/Get1099Form200Response.md index 20e53c7..da86ceb 100644 --- a/docs/A1099/Get1099Form200Response.md +++ b/docs/A1099/Get1099Form200Response.md @@ -4,57 +4,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | ID of the form | [readonly] -**type** | **string** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | -**issuer_id** | **int** | Issuer ID | -**issuer_reference_id** | **string** | Issuer Reference ID | [optional] -**issuer_tin** | **string** | Issuer TIN | [optional] -**tax_year** | **int** | Tax year | [optional] -**federal_efile** | **bool** | Boolean indicating that federal e-filing has been scheduled for this form | -**federal_efile_status** | [**\AvalaraSDK\ModelA1099V2\StatusDetail**](StatusDetail.md) | Federal e-file status | [optional] [readonly] -**state_efile** | **bool** | Boolean indicating that state e-filing has been scheduled for this form | -**state_efile_status** | [**\AvalaraSDK\ModelA1099V2\StateEfileStatusDetailResponse[]**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] -**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | -**postal_mail_status** | [**\AvalaraSDK\ModelA1099V2\StatusDetail**](StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] -**tin_match** | **bool** | Boolean indicating that TIN Matching has been scheduled for this form | -**tin_match_status** | [**\AvalaraSDK\ModelA1099V2\StatusDetail**](StatusDetail.md) | TIN Match status | [optional] [readonly] -**address_verification** | **bool** | Boolean indicating that address verification has been scheduled for this form | -**address_verification_status** | [**\AvalaraSDK\ModelA1099V2\StatusDetail**](StatusDetail.md) | Address verification status | [optional] [readonly] -**e_delivery_status** | [**\AvalaraSDK\ModelA1099V2\StatusDetail**](StatusDetail.md) | EDelivery status | [optional] [readonly] -**reference_id** | **string** | Reference ID | [optional] -**email** | **string** | Recipient email address | [optional] -**tin_type** | **string** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] -**tin** | **string** | Recipient Tax ID Number | [optional] -**no_tin** | **bool** | Indicates whether the recipient has no TIN | [optional] -**second_tin_notice** | **bool** | Second Tin Notice | [optional] -**recipient_name** | **string** | Recipient name | [optional] -**recipient_second_name** | **string** | Recipient second name | [optional] -**address** | **string** | Address | [optional] -**address2** | **string** | Address line 2 | [optional] -**city** | **string** | City | [optional] -**state** | **string** | US state | [optional] -**zip** | **string** | Zip/postal code | [optional] -**non_us_province** | **string** | Foreign province | [optional] -**country_code** | **string** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] -**account_number** | **string** | Account Number | [optional] -**office_code** | **string** | Office Code | [optional] -**fatca_filing_requirement** | **bool** | FATCA filing requirement | [optional] -**validation_errors** | [**\AvalaraSDK\ModelA1099V2\ValidationErrorResponse[]**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] -**created_at** | **\DateTime** | Creation time | [optional] [readonly] -**updated_at** | **\DateTime** | Update time | [optional] [readonly] -**state_and_local_withholding** | [**\AvalaraSDK\ModelA1099V2\StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] -**unique_form_id** | **string** | Unique form identifier | [optional] +**tin_type** | **string** | Type of TIN (Tax ID Number) | [optional] +**unique_form_id** | **string** | Unique form identifier | **recipient_date_of_birth** | **\DateTime** | Recipient's date of birth | [optional] -**recipient_giin** | **string** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] -**recipient_foreign_tin** | **string** | Recipient's foreign TIN | [optional] -**lob_code** | **string** | Limitation on benefits code | [optional] -**income_code** | **string** | Income code | [optional] -**gross_income** | **float** | Gross income | [optional] -**withholding_indicator** | **string** | Withholding indicator | [optional] -**tax_country_code** | **string** | Country code | [optional] -**exemption_code_chap3** | **string** | Exemption code (Chapter 3) | [optional] -**exemption_code_chap4** | **string** | Exemption code (Chapter 4) | [optional] -**tax_rate_chap3** | **string** | Tax rate (Chapter 3) | [optional] +**recipient_giin** | **string** | Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'. | [optional] +**recipient_foreign_tin** | **string** | Recipient's foreign TIN. Required if email is specified, must fill either this or Chap3StatusCode. | [optional] +**lob_code** | **string** | Limitation on Benefits (LOB) code for tax treaty purposes. Available values: - 01: Individual (Deprecated - valid only for tax years prior to 2019) - 02: Government - contracting state/political subdivision/local authority - 03: Tax exempt pension trust/Pension fund - 04: Tax exempt/Charitable organization - 05: Publicly-traded corporation - 06: Subsidiary of publicly-traded corporation - 07: Company that meets the ownership and base erosion test - 08: Company that meets the derivative benefits test - 09: Company with an item of income that meets the active trade or business test - 10: Discretionary determination - 11: Other - 12: No LOB article in treaty | [optional] +**income_code** | **string** | Income code. Available values: Interest: - 01: Interest paid by US obligors - general - 02: Interest paid on real property mortgages - 03: Interest paid to controlling foreign corporations - 04: Interest paid by foreign corporations - 05: Interest on tax-free covenant bonds - 22: Interest paid on deposit with a foreign branch of a domestic corporation or partnership - 29: Deposit interest - 30: Original issue discount (OID) - 31: Short-term OID - 33: Substitute payment - interest - 51: Interest paid on certain actively traded or publicly offered securities(1) - 54: Substitute payments - interest from certain actively traded or publicly offered securities(1) Dividend: - 06: Dividends paid by U.S. corporations - general - 07: Dividends qualifying for direct dividend rate - 08: Dividends paid by foreign corporations - 34: Substitute payment - dividends - 40: Other dividend equivalents under IRC section 871(m) (formerly 871(l)) - 52: Dividends paid on certain actively traded or publicly offered securities(1) - 53: Substitute payments - dividends from certain actively traded or publicly offered securities(1) - 56: Dividend equivalents under IRC section 871(m) as a result of applying the combined transaction rules Other: - 09: Capital gains - 10: Industrial royalties - 11: Motion picture or television copyright royalties - 12: Other royalties (for example, copyright, software, broadcasting, endorsement payments) - 13: Royalties paid on certain publicly offered securities(1) - 14: Real property income and natural resources royalties - 15: Pensions, annuities, alimony, and/or insurance premiums - 16: Scholarship or fellowship grants - 17: Compensation for independent personal services(2) - 18: Compensation for dependent personal services(2) - 19: Compensation for teaching(2) - 20: Compensation during studying and training(2) - 23: Other income - 24: Qualified investment entity (QIE) distributions of capital gains - 25: Trust distributions subject to IRC section 1445 - 26: Unsevered growing crops and timber distributions by a trust subject to IRC section 1445 - 27: Publicly traded partnership distributions subject to IRC section 1446 - 28: Gambling winnings(3) - 32: Notional principal contract income(4) - 35: Substitute payment - other - 36: Capital gains distributions - 37: Return of capital - 38: Eligible deferred compensation items subject to IRC section 877A(d)(1) - 39: Distributions from a nongrantor trust subject to IRC section 877A(f)(1) - 41: Guarantee of indebtedness - 42: Earnings as an artist or athlete - no central withholding agreement(5) - 43: Earnings as an artist or athlete - central withholding agreement(5) - 44: Specified Federal procurement payments - 50: Income previously reported under escrow procedure(6) - 55: Taxable death benefits on life insurance contracts - 57: Amount realized under IRC section 1446(f) - 58: Publicly traded partnership distributions-undetermined | +**gross_income** | **float** | Gross income | +**withholding_indicator** | **string** | Withholding indicator Available values: - 3: Chapter 3 - 4: Chapter 4 | +**tax_country_code** | **string** | Country code | +**exemption_code_chap3** | **string** | Exemption code (Chapter 3). Required if WithholdingIndicator is 3 (Chapter 3). Required when using TaxRateChap3. Available values: - Empty: Tax rate is due to backup withholding - 00: Not exempt - 01: Effectively connected income - 02: Exempt under IRC (other than portfolio interest) - 03: Income is not from US sources - 04: Exempt under tax treaty - 05: Portfolio interest exempt under IRC - 06: QI that assumes primary withholding responsibility - 07: WFP or WFT - 08: U.S. branch treated as U.S. Person - 09: Territory FI treated as U.S. Person - 10: QI represents that income is exempt - 11: QSL that assumes primary withholding responsibility - 12: Payee subjected to chapter 4 withholding - 22: QDD that assumes primary withholding responsibility - 23: Exempt under section 897(l) - 24: Exempt under section 892 | [optional] +**exemption_code_chap4** | **string** | Exemption code (Chapter 4). Required if WithholdingIndicator is 4 (Chapter 4). Available values: - 00: Not exempt - 13: Grandfathered payment - 14: Effectively connected income - 15: Payee not subject to chapter 4 withholding - 16: Excluded nonfinancial payment - 17: Foreign Entity that assumes primary withholding responsibility - 18: U.S. Payees - of participating FFI or registered deemed - compliant FFI - 19: Exempt from withholding under IGA(6) - 20: Dormant account(7) - 21: Other - payment not subject to chapter 4 withholding | [optional] +**tax_rate_chap3** | **string** | Tax rate (Chapter 3) - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 00.00: 0.00% - 02.00: 2.00% - 04.00: 4.00% - 04.90: 4.90% - 04.95: 4.95% - 05.00: 5.00% - 07.00: 7.00% - 08.00: 8.00% - 10.00: 10.00% - 12.00: 12.00% - 12.50: 12.50% - 14.00: 14.00% - 15.00: 15.00% - 17.50: 17.50% - 20.00: 20.00% - 21.00: 21.00% - 24.00: 24.00% - 25.00: 25.00% - 27.50: 27.50% - 28.00: 28.00% - 30.00: 30.00% - 37.00: 37.00% | [optional] **withholding_allowance** | **float** | Withholding allowance | [optional] **federal_tax_withheld** | **float** | Federal tax withheld | [optional] **tax_not_deposited_indicator** | **bool** | Tax not deposited indicator | [optional] @@ -62,12 +24,58 @@ Name | Type | Description | Notes **tax_withheld_other_agents** | **float** | Tax withheld by other agents | [optional] **amount_repaid** | **float** | Amount repaid to recipient | [optional] **tax_paid_agent** | **float** | Tax paid by withholding agent | [optional] -**chap3_status_code** | **string** | Chapter 3 status code | [optional] -**chap4_status_code** | **string** | Chapter 4 status code | [optional] -**primary_withholding_agent** | [**\AvalaraSDK\ModelA1099V2\PrimaryWithholdingAgentResponse**](PrimaryWithholdingAgentResponse.md) | Primary withholding agent information | [optional] -**intermediary_or_flow_through** | [**\AvalaraSDK\ModelA1099V2\IntermediaryOrFlowThroughResponse**](IntermediaryOrFlowThroughResponse.md) | Intermediary or flow-through entity information | [optional] -**origin_of_health_coverage_code** | **string** | Origin of health coverage code | [optional] -**covered_individuals** | [**\AvalaraSDK\ModelA1099V2\CoveredIndividualReferenceResponse[]**](CoveredIndividualReferenceResponse.md) | Covered individuals information | [optional] +**chap3_status_code** | **string** | Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3) Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary | [optional] +**chap4_status_code** | **string** | Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI | [optional] +**primary_withholding_agent** | [**\Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgent**](PrimaryWithholdingAgent.md) | Primary withholding agent information | [optional] +**intermediary_or_flow_through** | [**\Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThrough**](IntermediaryOrFlowThrough.md) | Intermediary or flow-through entity information | [optional] +**type** | **string** | Form type | +**id** | **string** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] +**issuer_id** | **string** | Issuer ID - only required when creating forms | [optional] +**issuer_reference_id** | **string** | Issuer Reference ID - only required when creating forms | [optional] +**issuer_tin** | **string** | Issuer TIN - readonly | [optional] +**tax_year** | **int** | Tax Year - only required when creating forms | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. | [optional] +**tin** | **string** | Recipient's Federal Tax Identification Number (TIN). | [optional] +**recipient_name** | **string** | Recipient name | +**recipient_second_name** | **string** | Recipient second name | [optional] +**address** | **string** | Address. | +**address2** | **string** | Address line 2. | [optional] +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] +**zip** | **string** | ZIP/postal code. | [optional] +**email** | **string** | Recipient's Contact email address. | [optional] +**account_number** | **string** | Account number | [optional] +**office_code** | **string** | Office code | [optional] +**non_us_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | +**federal_efile_date** | **\DateTime** | Date when federal e-filing should be scheduled for this form | [optional] +**postal_mail** | **bool** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] +**state_efile_date** | **\DateTime** | Date when state e-filing should be scheduled for this form | [optional] +**recipient_edelivery_date** | **\DateTime** | Date when recipient e-delivery should be scheduled for this form | [optional] +**tin_match** | **bool** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] +**no_tin** | **bool** | No TIN indicator | [optional] +**address_verification** | **bool** | Boolean indicating that address verification should be scheduled for this form | [optional] +**state_and_local_withholding** | [**\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] +**second_tin_notice** | **bool** | Second TIN notice | [optional] +**federal_efile_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] +**state_efile_status** | [**\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] +**postal_mail_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] +**address_verification_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] +**e_delivery_status** | [**\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] +**validation_errors** | [**\Avalara\SDK\Model\A1099\V2\ValidationError[]**](ValidationError.md) | Validation errors | [optional] [readonly] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] [readonly] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] [readonly] +**employee_first_name** | **string** | Employee's first name | +**employee_middle_name** | **string** | Employee's middle name | [optional] +**employee_last_name** | **string** | Employee's last name | +**employee_name_suffix** | **string** | Employee's name suffix | [optional] +**employee_date_of_birth** | **\DateTime** | Employee's date of birth | [optional] +**origin_of_health_coverage_code** | **string** | Origin of health coverage code Available values: - A: Small Business Health Options Program (SHOP) - B: Employer-sponsored coverage - C: Government-sponsored program - D: Individual market insurance - E: Multiemployer plan - F: Other designated minimum essential coverage - G: Employer-sponsored coverage that is an individual coverage HRA (valid for tax years 2020 and later) | +**covered_individuals** | [**\Avalara\SDK\Model\A1099\V2\CoveredIndividual[]**](CoveredIndividual.md) | Covered individuals information | [optional] +**plan_start_month** | **string** | Plan start month. The calendar month during which the plan year begins of the health plan in which the employee is offered coverage (or would be offered coverage if the employee were eligible to participate in the plan). Available values: - 00: None - 01: January - 02: February - 03: March - 04: April - 05: May - 06: June - 07: July - 08: August - 09: September - 10: October - 11: November - 12: December | +**employer_provided_si_coverage** | **bool** | Employer provided self-insured coverage | [optional] +**offer_and_coverages** | [**\Avalara\SDK\Model\A1099\V2\OfferAndCoverage[]**](OfferAndCoverage.md) | Offer and coverage information | **total_ordinary_dividends** | **float** | Total ordinary dividends | [optional] **qualified_dividends** | **float** | Qualified dividends | [optional] **total_capital_gain_distributions** | **float** | Total capital gain distributions | [optional] @@ -79,24 +87,25 @@ Name | Type | Description | Notes **nondividend_distributions** | **float** | Nondividend distributions | [optional] **federal_income_tax_withheld** | **float** | Federal income tax withheld | [optional] **section199_a_dividends** | **float** | Section 199A dividends | [optional] -**investment_expenses** | **float** | Investment expenses | [optional] +**investment_expenses** | **float** | Investment Expenses | [optional] **foreign_tax_paid** | **float** | Foreign tax paid | [optional] **foreign_country_or_us_possession** | **string** | Foreign country or U.S. possession | [optional] **cash_liquidation_distributions** | **float** | Cash liquidation distributions | [optional] **noncash_liquidation_distributions** | **float** | Noncash liquidation distributions | [optional] **exempt_interest_dividends** | **float** | Exempt-interest dividends | [optional] **specified_private_activity_bond_interest_dividends** | **float** | Specified private activity bond interest dividends | [optional] +**fatca_filing_requirement** | **bool** | FATCA filing requirement | [optional] **interest_income** | **float** | Interest Income | [optional] -**early_withdrawal_penalty** | **float** | Early withdrawal penalty | [optional] +**early_withdrawal_penalty** | **float** | Early Withdrawal Penalty | [optional] **us_savings_bonds_interest** | **float** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] **foreign_country** | **string** | Foreign country or U.S. possession | [optional] -**tax_exempt_interest** | **float** | Tax-exempt interest | [optional] -**specified_private_activity_bond_interest** | **float** | Specified private activity bond interest | [optional] -**market_discount** | **float** | Market discount | [optional] -**bond_premium** | **float** | Bond premium | [optional] -**bond_premium_on_treasury_obligations** | **float** | Bond premium on Treasury obligations | [optional] -**bond_premium_on_tax_exempt_bond** | **float** | Bond premium on tax exempt bond | [optional] -**tax_exempt_bond_cusip_number** | **string** | Tax exempt bond CUSIP number | [optional] +**tax_exempt_interest** | **float** | Tax-Exempt Interest | [optional] +**specified_private_activity_bond_interest** | **float** | Specified Private activity | [optional] +**market_discount** | **float** | Market Discount | [optional] +**bond_premium** | **float** | Bond Premium | [optional] +**bond_premium_on_treasury_obligations** | **float** | Bond Premium on Treasury obligations | [optional] +**bond_premium_on_tax_exempt_bond** | **float** | Bond Premium on tax exempt bond | [optional] +**tax_exempt_bond_cusip_number** | **string** | Tax exempt bond CUSIP no. | [optional] **filer_type** | **string** | Filer type (PSE or EPF) | [optional] **payment_type** | **string** | Payment type (payment card or third party network) | [optional] **payment_settlement_entity_name_phone_number** | **string** | Payment settlement entity name and phone number | [optional] @@ -112,42 +121,41 @@ Name | Type | Description | Notes **june** | **float** | June gross payments | [optional] **july** | **float** | July gross payments | [optional] **august** | **float** | August gross payments | [optional] -**sept** | **float** | September gross payments | [optional] +**september** | **float** | September gross payments | [optional] **october** | **float** | October gross payments | [optional] **november** | **float** | November gross payments | [optional] **december** | **float** | December gross payments | [optional] **rents** | **float** | Rents | [optional] **royalties** | **float** | Royalties | [optional] **other_income** | **float** | Other income | [optional] -**fed_income_tax_withheld** | **float** | Federal income tax withheld | [optional] **fishing_boat_proceeds** | **float** | Fishing boat proceeds | [optional] **medical_and_health_care_payments** | **float** | Medical and health care payments | [optional] -**substitute_payments** | **float** | Substitute payments in lieu of dividends or interest | [optional] **direct_sales_indicator** | **bool** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] +**substitute_payments** | **float** | Substitute payments in lieu of dividends or interest | [optional] **crop_insurance_proceeds** | **float** | Crop insurance proceeds | [optional] -**excess_golden_parachute_payments** | **float** | (Legacy field) Excess golden parachute payments | [optional] **gross_proceeds_paid_to_attorney** | **float** | Gross proceeds paid to an attorney | [optional] **fish_purchased_for_resale** | **float** | Fish purchased for resale | [optional] **section409_a_deferrals** | **float** | Section 409A deferrals | [optional] +**excess_golden_parachute_payments** | **float** | (Legacy field) Excess golden parachute payments | [optional] **nonqualified_deferred_compensation** | **float** | Nonqualified deferred compensation | [optional] -**nonemployee_compensation** | **float** | Nonemployee compensation | [optional] -**gross_distributions** | **float** | Gross distribution | [optional] +**nonemployee_compensation** | **float** | Nonemployee compensation | +**gross_distribution** | **float** | Gross distribution | [optional] **taxable_amount** | **float** | Taxable amount | [optional] **taxable_amount_not_determined** | **bool** | Taxable amount not determined | [optional] -**total_distribution_indicator** | **bool** | Total distribution | [optional] +**total_distribution_determined** | **bool** | Total distribution | [optional] **capital_gain** | **float** | Capital gain (included in Box 2a) | [optional] -**employee_contributions** | **float** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] -**net_unrealized_appreciation** | **float** | Net unrealized appreciation in employer's securities | [optional] -**distribution_code_required** | **string** | Distribution code | [optional] -**distribution_code_optional** | **string** | Second distribution code | [optional] -**ira_sep_simple_indicator** | **bool** | IRA/SEP/SIMPLE | [optional] -**total_ira_sep_simple_distribution** | **float** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] -**other** | **float** | Other amount | [optional] -**other_percent** | **string** | Other percentage | [optional] -**percentage_total_distribution** | **string** | Total distribution percentage | [optional] +**employee_contributions_or_designated_roth_or_insurance_premiums** | **float** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] +**net_unrealized_appreciation_in_employer_securities** | **float** | Net unrealized appreciation in employer's securities | [optional] +**distribution_code** | **string** | Distribution code | [optional] +**second_distribution_code** | **string** | Second distribution code | [optional] +**ira_sep_simple** | **bool** | IRA/SEP/SIMPLE | [optional] +**traditional_ira_sep_simple_or_roth_conversion_amount** | **float** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] +**other_amount** | **float** | Other amount | [optional] +**other_percentage** | **string** | Other percentage | [optional] +**total_distribution_percentage** | **string** | Total distribution percentage | [optional] **total_employee_contributions** | **float** | Total employee contributions | [optional] -**amount_allocable_to_irr** | **float** | Amount allocable to IRR within 5 years | [optional] -**first_year_designated_roth_contrib** | **string** | First year of designated Roth contribution | [optional] -**date_of_payment** | **string** | Date of payment | [optional] +**amount_allocable_to_irr_within5_years** | **float** | Amount allocable to IRR within 5 years | [optional] +**first_year_of_designated_roth_contribution** | **string** | First year of designated Roth contribution | [optional] +**date_of_payment** | **\DateTime** | Date of payment | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/IW9FormDataModelsOneOf.md b/docs/A1099/IW9FormDataModelsOneOf.md index 2dcc10e..05a4e31 100644 --- a/docs/A1099/IW9FormDataModelsOneOf.md +++ b/docs/A1099/IW9FormDataModelsOneOf.md @@ -123,7 +123,7 @@ Name | Type | Description | Notes **part19_formation_or_resolution_date** | **\DateTime** | | [optional] **part20_filing_date** | **\DateTime** | | [optional] **part21_determination_date** | **\DateTime** | | [optional] -**substantial_us_owners** | [**\AvalaraSDK\ModelA1099V2\W8BenESubstantialUsOwnerDataModel[]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] +**substantial_us_owners** | [**\Avalara\SDK\Model\A1099\V2\W8BenESubstantialUsOwnerDataModel[]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] **birthday** | **string** | The birthday of the individual associated with the form. | [optional] **foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not required. | [optional] **archived** | **bool** | Indicates whether the form is archived. | [optional] diff --git a/docs/A1099/IntermediaryOrFlowThrough.md b/docs/A1099/IntermediaryOrFlowThrough.md index 3d0f153..7e9b847 100644 --- a/docs/A1099/IntermediaryOrFlowThrough.md +++ b/docs/A1099/IntermediaryOrFlowThrough.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ein** | **string** | | [optional] -**chap3_status_code** | **string** | | [optional] -**chap4_status_code** | **string** | | [optional] -**name** | **string** | | [optional] -**giin** | **string** | | [optional] -**country_code** | **string** | | [optional] -**foreign_tin** | **string** | | [optional] -**address** | **string** | | [optional] -**city** | **string** | | [optional] -**state** | **string** | | [optional] -**zip** | **string** | | [optional] +**ein** | **string** | EIN (Employer Identification Number) of the intermediary or flow-through entity | [optional] +**chap3_status_code** | **string** | Chapter 3 status code for the intermediary or flow-through entity | [optional] +**chap4_status_code** | **string** | Chapter 4 status code for the intermediary or flow-through entity | [optional] +**name** | **string** | Name of the intermediary or flow-through entity | [optional] +**giin** | **string** | GIIN (Global Intermediary Identification Number) of the intermediary or flow-through entity | [optional] +**country_code** | **string** | Country code for the intermediary or flow-through entity | [optional] +**foreign_tin** | **string** | Foreign TIN of the intermediary or flow-through entity | [optional] +**address** | **string** | Address of the intermediary or flow-through entity | [optional] +**city** | **string** | City of the intermediary or flow-through entity | [optional] +**state** | **string** | State of the intermediary or flow-through entity | [optional] +**zip** | **string** | Zip code of the intermediary or flow-through entity | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/IssuerCommand.md b/docs/A1099/IssuerCommand.md index 3d356c8..8abab5f 100644 --- a/docs/A1099/IssuerCommand.md +++ b/docs/A1099/IssuerCommand.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Legal name, not DBA | [optional] -**name_dba** | **string** | Optional DBA name or continuation of a long legal name | [optional] -**tin** | **string** | Tax identification number | [optional] -**reference_id** | **string** | Optional identifier for your reference, never shown to any agency or recipient. We will also prefix download filenames with this value, if present. Can only include letters, numbers, dashes, underscores and spaces. | [optional] -**telephone** | **string** | Telephone number | [optional] -**tax_year** | **int** | Tax year | [optional] -**country_code** | **string** | If there is a transfer agent, use the shipping address of the transfer agent. | [optional] -**email** | **string** | Email address | [optional] -**address** | **string** | Address | [optional] -**city** | **string** | City | [optional] -**state** | **string** | State | [optional] -**zip** | **string** | Zip code | [optional] -**foreign_province** | **string** | Foreign province | [optional] -**transfer_agent_name** | **string** | Transfer Agent's Name | [optional] -**last_filing** | **bool** | Last year of filing for this payer | [optional] +**name** | **string** | Legal name. Not the DBA name. | +**dba_name** | **string** | Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. | [optional] +**tin** | **string** | Federal Tax Identification Number (TIN). | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] +**telephone** | **string** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | +**tax_year** | **int** | Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. | +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. | [optional] +**email** | **string** | Contact email address. For recipient inquiries. | +**address** | **string** | Address. | +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | +**zip** | **string** | ZIP/postal code. | +**foreign_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**transfer_agent_name** | **string** | Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. | [optional] +**last_filing** | **bool** | Indicates if this is the issuer's final year filing. | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/IssuerResponse.md b/docs/A1099/IssuerResponse.md index d82b348..beb09af 100644 --- a/docs/A1099/IssuerResponse.md +++ b/docs/A1099/IssuerResponse.md @@ -4,23 +4,23 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Unique identifier set when the record is created | [optional] [readonly] -**name** | **string** | Legal name, not DBA | [optional] -**name_dba** | **string** | Optional DBA name or continuation of a long legal name | [optional] -**tin** | **string** | Tax identification number | [optional] -**reference_id** | **string** | Optional identifier for your reference, never shown to any agency or recipient. We will also prefix download filenames with this value, if present. Can only include letters, numbers, dashes, underscores and spaces. | [optional] -**telephone** | **string** | Telephone number | [optional] -**tax_year** | **int** | Tax year | [optional] -**country_code** | **string** | If there is a transfer agent, use the address of the transfer agent. | [optional] -**email** | **string** | Email address | [optional] -**address** | **string** | Address | [optional] -**city** | **string** | City | [optional] -**state** | **string** | State | [optional] -**zip** | **string** | Zip code | [optional] -**foreign_province** | **string** | Foreign province | [optional] -**transfer_agent_name** | **string** | Transfer Agent's Name | [optional] -**last_filing** | **bool** | Last year of filing for this payer | [optional] -**created_at** | **\DateTime** | Date time when the issuer was created | [optional] [readonly] -**updated_at** | **\DateTime** | Date time when the issuer was updated | [optional] [readonly] +**id** | **string** | Unique identifier set when the record is created. | [optional] +**created_at** | **\DateTime** | Date time when the record was created. | [optional] +**updated_at** | **\DateTime** | Date time when the record was last updated. | [optional] +**name** | **string** | Legal name. Not the DBA name. | +**dba_name** | **string** | Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. | [optional] +**tin** | **string** | Federal Tax Identification Number (TIN). | [optional] +**reference_id** | **string** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] +**telephone** | **string** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | +**tax_year** | **int** | Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. | +**country_code** | **string** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. | [optional] +**email** | **string** | Contact email address. For recipient inquiries. | +**address** | **string** | Address. | +**city** | **string** | City. | +**state** | **string** | Two-letter US state or Canadian province code (required for US/CA addresses). | +**zip** | **string** | ZIP/postal code. | +**foreign_province** | **string** | Province or region for non-US/CA addresses. | [optional] +**transfer_agent_name** | **string** | Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. | [optional] +**last_filing** | **bool** | Indicates if this is the issuer's final year filing. | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/JobResponse.md b/docs/A1099/JobResponse.md new file mode 100644 index 0000000..3ffbe9f --- /dev/null +++ b/docs/A1099/JobResponse.md @@ -0,0 +1,28 @@ +# # JobResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique identifier for the job | [optional] +**type** | **string** | Job type identifier. Will always be \"update_job\" for bulk upsert operations | [optional] +**status** | **string** | Current status of the job (e.g., Success, Failed, InProgress) | [optional] +**error_message** | **string** | Error message if the job failed, null otherwise | [optional] +**total_processed** | **int** | Total number of forms processed. Value can be 0 or another value based on what the job has available | [optional] +**total_rows** | **int** | Total number of forms in the request. Value can be 0 or another value based on what the job has available | [optional] +**updated_valid** | **int** | Number of forms updated and valid for e-filing and e-delivery. Value can be 0 or another value based on what the job has available | [optional] +**updated_no_email** | **int** | Number of forms updated and valid for e-filing but missing email or email is undeliverable. Value can be 0 or another value based on what the job has available | [optional] +**updated_invalid** | **int** | Number of forms updated but invalid for e-filing. Value can be 0 or another value based on what the job has available | [optional] +**skipped_duplicate** | **int** | Number of forms skipped because they would have updated a record already updated once in the request. Value can be 0 or another value based on what the job has available | [optional] +**skipped_invalid** | **int** | Number of forms skipped because they would have made a form invalid and the form is already e-filed or scheduled for e-filing. Value can be 0 or another value based on what the job has available | [optional] +**skipped_multiple_matches** | **int** | Number of forms skipped because they matched multiple forms. Value can be 0 or another value based on what the job has available | [optional] +**not_found** | **int** | Number of forms skipped because no matching form or issuer could be found. Value can be 0 or another value based on what the job has available | [optional] +**created_invalid** | **int** | Number of new forms created because no matching form could be found (and `upsert` was true) - with errors. Value can be 0 or another value based on what the job has available | [optional] +**created_no_email** | **int** | Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing but missing email or email is undeliverable. Value can be 0 or another value based on what the job has available | [optional] +**created_valid** | **int** | Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing and e-delivery. Value can be 0 or another value based on what the job has available | [optional] +**dry_run** | **bool** | Dry run. If `true`, this job only simulates the changes but doesn't actually persist them. | [optional] +**upsert** | **bool** | Upsert. If `true`, this job will first attempt to update existing records if matches can be found. Matches are done in the following order: Form ID, Form Reference ID and tax year, Form TIN and tax year. | [optional] +**link** | **string** | Link to access the job details | [optional] +**processed_forms** | [**\Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]**](Get1099Form200Response.md) | List of processed forms returned when bulk-upsert processes ≤1000 records. Same format as GET /1099/forms response. Only available in bulk-upsert endpoint responses. | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/OfferAndCoverage.md b/docs/A1099/OfferAndCoverage.md new file mode 100644 index 0000000..e7a2c56 --- /dev/null +++ b/docs/A1099/OfferAndCoverage.md @@ -0,0 +1,14 @@ +# # OfferAndCoverage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Id | [optional] [readonly] +**month** | **string** | Month of coverage. Available values: - All: All months - January: January - February: February - March: March - April: April - May: May - June: June - July: July - August: August - September: September - October: October - November: November - December: December | [optional] +**offer_code** | **string** | Offer of Coverage Code. Required if Share has a value, including zero. Available values: Pre-ICHRA Codes (available before 2020): - 1A: Qualifying offer: minimum essential coverage providing minimum value offered to full-time employee with employee required contribution ≤ 9.5% (as adjusted) of mainland single federal poverty line and at least minimum essential coverage offered to spouse and dependent(s) - 1B: Minimum essential coverage providing minimum value offered to employee only - 1C: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to dependent(s) (not spouse) - 1D: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to spouse (not dependent(s)) - 1E: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to dependent(s) and spouse - 1F: Minimum essential coverage NOT providing minimum value offered to employee; employee and spouse or dependent(s); or employee, spouse, and dependents - 1G: Offer of coverage to an individual who was not an employee or not a full-time employee and who enrolled in self-insured coverage - 1H: No offer of coverage (employee not offered any health coverage or employee offered coverage that is not minimum essential coverage) - 1J: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage conditionally offered to spouse; minimum essential coverage not offered to dependent(s) - 1K: Minimum essential coverage providing minimum value offered to employee; at least minimum essential coverage offered to dependents; and at least minimum essential coverage conditionally offered to spouse ICHRA Codes (introduced 2020, require ZIP code): - 1L: Individual coverage HRA offered to employee only - 1M: Individual coverage HRA offered to employee and dependent(s) (not spouse) - 1N: Individual coverage HRA offered to employee, spouse, and dependent(s) - 1O: Individual coverage HRA offered to employee only using employment site ZIP code affordability safe harbor - 1P: Individual coverage HRA offered to employee and dependent(s) (not spouse) using employment site ZIP code affordability safe harbor - 1Q: Individual coverage HRA offered to employee, spouse, and dependent(s) using employment site ZIP code affordability safe harbor - 1R: Individual coverage HRA that is NOT affordable - 1S: Individual coverage HRA offered to an individual who was not a full-time employee - 1T: Individual coverage HRA offered to employee and spouse (not dependents) - 1U: Individual coverage HRA offered to employee and spouse (not dependents) using employment site ZIP code affordability safe harbor Note: Codes 1B, 1C, 1D, 1E, 1J, 1K, 1L, 1M, 1N, 1O, 1P, 1Q, 1T, 1U require employee share amount (0.00 is a valid value). | [optional] +**share** | **float** | Employee required contribution share - Employee Share of Lowest Cost Monthly Premium, for Self-Only Minimum Value Coverage - May not exceed 3499.99 | [optional] +**safe_harbor_code** | **string** | Safe harbor code - Applicable Section 4980H Safe Harbor Code. Available values: - 2A: Form W-2 safe harbor - 2B: Federal poverty line safe harbor - 2C: Rate of pay safe harbor - 2D: Part-time employee safe harbor for employees who were not full-time for any month of the year - 2E: Multiemployer interim rule relief - 2F: Qualifying offer method - 2G: Qualifying offer transition relief - 2H: Other affordability safe harbor | [optional] +**zip_code** | **string** | ZIP/postal code. For coverage area (optional, unless codes 1L to 1U are used). | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/PaginatedQueryResultModelCompanyResponse.md b/docs/A1099/PaginatedQueryResultModelCompanyResponse.md index 0e8a24f..077bb96 100644 --- a/docs/A1099/PaginatedQueryResultModelCompanyResponse.md +++ b/docs/A1099/PaginatedQueryResultModelCompanyResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_recordset_count** | **int** | | [optional] -**value** | [**\AvalaraSDK\ModelA1099V2\CompanyResponse[]**](CompanyResponse.md) | | [optional] +**value** | [**\Avalara\SDK\Model\A1099\V2\CompanyResponse[]**](CompanyResponse.md) | | [optional] **at_next_link** | **string** | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/PaginatedQueryResultModelForm1099Base.md b/docs/A1099/PaginatedQueryResultModelForm1099Base.md new file mode 100644 index 0000000..fde6526 --- /dev/null +++ b/docs/A1099/PaginatedQueryResultModelForm1099Base.md @@ -0,0 +1,11 @@ +# # PaginatedQueryResultModelForm1099Base + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**at_recordset_count** | **int** | | [optional] +**value** | [**\Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]**](Get1099Form200Response.md) | | [optional] +**at_next_link** | **string** | | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/PaginatedQueryResultModelIssuerResponse.md b/docs/A1099/PaginatedQueryResultModelIssuerResponse.md index f9255dd..2710693 100644 --- a/docs/A1099/PaginatedQueryResultModelIssuerResponse.md +++ b/docs/A1099/PaginatedQueryResultModelIssuerResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_recordset_count** | **int** | | [optional] -**value** | [**\AvalaraSDK\ModelA1099V2\IssuerResponse[]**](IssuerResponse.md) | | [optional] +**value** | [**\Avalara\SDK\Model\A1099\V2\IssuerResponse[]**](IssuerResponse.md) | | [optional] **at_next_link** | **string** | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/PaginatedQueryResultModelW9FormBaseResponse.md b/docs/A1099/PaginatedQueryResultModelW9FormBaseResponse.md index ce29742..9cc6c51 100644 --- a/docs/A1099/PaginatedQueryResultModelW9FormBaseResponse.md +++ b/docs/A1099/PaginatedQueryResultModelW9FormBaseResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_recordset_count** | **int** | | [optional] -**value** | [**\AvalaraSDK\ModelA1099V2\CreateW9Form201Response[]**](CreateW9Form201Response.md) | | [optional] +**value** | [**\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response[]**](CreateW9Form201Response.md) | | [optional] **at_next_link** | **string** | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/PrimaryWithholdingAgent.md b/docs/A1099/PrimaryWithholdingAgent.md index 219a07e..d7644c1 100644 --- a/docs/A1099/PrimaryWithholdingAgent.md +++ b/docs/A1099/PrimaryWithholdingAgent.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**primary_withholding_agent_name** | **string** | | [optional] -**primary_withholding_agent_ein** | **string** | | [optional] +**name** | **string** | Name of the primary withholding agent | +**ein** | **string** | EIN (Employer Identification Number) of the primary withholding agent. | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/StateAndLocalWithholding.md b/docs/A1099/StateAndLocalWithholding.md index fc97324..d78e9d0 100644 --- a/docs/A1099/StateAndLocalWithholding.md +++ b/docs/A1099/StateAndLocalWithholding.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**state_tax_withheld** | **float** | | [optional] -**state** | **string** | | [optional] -**state_id_number** | **string** | | [optional] -**state_income** | **float** | | [optional] -**local_tax_withheld** | **float** | | [optional] -**locality** | **string** | | [optional] -**locality_id_number** | **string** | | [optional] -**local_income** | **float** | | [optional] +**state_tax_withheld** | **float** | Amount of state tax that was withheld | [optional] +**state** | **string** | US state | [optional] +**state_id_number** | **string** | State ID number of the entity issuing the form | [optional] +**state_income** | **float** | Amount of state income | [optional] +**local_tax_withheld** | **float** | Amount of local tax that was withheld | [optional] +**locality** | **string** | Locality name | [optional] +**locality_id_number** | **string** | Locality ID number of the entity issuing the form | [optional] +**local_income** | **float** | Amount of local income | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/TinMatchStatusResponse.md b/docs/A1099/TinMatchStatusResponse.md index 5f2a3e9..10237eb 100644 --- a/docs/A1099/TinMatchStatusResponse.md +++ b/docs/A1099/TinMatchStatusResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time** | **\DateTime** | The current timestamp for the TIN match request. | [optional] **status** | **string** | The current status for the TIN match request. | [optional] -**irs_response** | [**\AvalaraSDK\ModelA1099V2\IrsResponse**](IrsResponse.md) | The IRS response. | [optional] +**irs_response** | [**\Avalara\SDK\Model\A1099\V2\IrsResponse**](IrsResponse.md) | The IRS response. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index 8766329..1ad3021 100644 --- a/docs/A1099/V2/CompaniesW9Api.md +++ b/docs/A1099/V2/CompaniesW9Api.md @@ -1,6 +1,6 @@ -# AvalaraSDK\CompaniesW9Api +# Avalara\SDK\CompaniesW9Api -All URIs are relative to https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/avalara1099. +All URIs are relative to https://api.sbx.avalara.com/avalara1099. Method | HTTP request | Description ------------- | ------------- | ------------- @@ -14,7 +14,7 @@ Method | HTTP request | Description ## `createCompany()` ```php -createCompany($avalara_version, $x_correlation_id, $x_avalara_client, $company_create_update_request_model): \AvalaraSDK\ModelA1099V2\CompanyResponseModel +createCompany($avalara_version, $x_correlation_id, $x_avalara_client, $create_company_request): \Avalara\SDK\Model\A1099\V2\CompanyResponse ``` Create a company @@ -37,15 +37,15 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\CompaniesW9Api($client); +$apiInstance = new Avalara\SDK\Api\CompaniesW9Api($client); $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 5ba3a8b6-bf05-4aaa-b8cb-d06c7cfea0f7; // string | Unique correlation Id in a GUID format +$x_correlation_id = 1b926329-c509-4572-9e13-14675dd292dd; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . -$company_create_update_request_model = new \AvalaraSDK\ModelA1099V2\CompanyCreateUpdateRequestModel(); // \AvalaraSDK\ModelA1099V2\CompanyCreateUpdateRequestModel | The company to create +$create_company_request = {"name":"Acme Corporation","dbaName":"","email":"contact@acmecorp.com","address":"123 Business Ave","city":"Phoenix","state":"AZ","zip":"85001","telephone":"602-555-0123","tin":"12-3456789","referenceId":"","doTinMatch":null,"groupName":"","foreignProvince":"","countryCode":"US","resendRequests":null,"resendIntervalDays":null,"maxReminderAttempts":null}; // \Avalara\SDK\Model\A1099\V2\CreateCompanyRequest | The company to create try { - $result = $apiInstance->createCompany($avalara_version, $x_correlation_id, $x_avalara_client, $company_create_update_request_model); + $result = $apiInstance->createCompany($avalara_version, $x_correlation_id, $x_avalara_client, $create_company_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling CompaniesW9Api->createCompany: ', $e->getMessage(), PHP_EOL; @@ -59,11 +59,11 @@ Name | Type | Description | Notes **avalara_version** | **string**| API version | **x_correlation_id** | **string**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **string**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **company_create_update_request_model** | [**\AvalaraSDK\ModelA1099V2\CompanyCreateUpdateRequestModel**](../Model/CompanyCreateUpdateRequestModel.md)| The company to create | [optional] + **create_company_request** | [**\Avalara\SDK\Model\A1099\V2\CreateCompanyRequest**](../Model/CreateCompanyRequest.md)| The company to create | [optional] ### Return type -[**\AvalaraSDK\ModelA1099V2\CompanyResponseModel**](../Model/CompanyResponseModel.md) +[**\Avalara\SDK\Model\A1099\V2\CompanyResponse**](../Model/CompanyResponse.md) ### Authorization @@ -104,11 +104,11 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\CompaniesW9Api($client); +$apiInstance = new Avalara\SDK\Api\CompaniesW9Api($client); $id = 'id_example'; // string | The company to delete $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 07a8ecdb-0465-469d-8bff-49fce135d5e4; // string | Unique correlation Id in a GUID format +$x_correlation_id = fe41a755-2a8b-4108-b391-6875275251fc; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -147,7 +147,7 @@ void (empty response body) ## `getCompanies()` ```php -getCompanies($avalara_version, $filter, $top, $skip, $order_by, $count, $count_only, $x_correlation_id, $x_avalara_client): \AvalaraSDK\ModelA1099V2\PaginatedQueryResultModelCompanyResponse +getCompanies($avalara_version, $filter, $top, $skip, $order_by, $count, $count_only, $x_correlation_id, $x_avalara_client): \Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelCompanyResponse ``` List companies @@ -170,7 +170,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\CompaniesW9Api($client); +$apiInstance = new Avalara\SDK\Api\CompaniesW9Api($client); $avalara_version = 2.0.0; // string | API version $filter = name eq 'company name'; // string | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. @@ -179,7 +179,7 @@ $skip = 56; // int | If nonzero, skip this number of results before returning da $order_by = 'order_by_example'; // string | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. $count = True; // bool | If true, return the global count of elements in the collection. $count_only = True; // bool | If true, return ONLY the global count of elements in the collection. It only applies when count=true. -$x_correlation_id = f047fdc5-a6e4-4290-8c5c-d4da96ad0699; // string | Unique correlation Id in a GUID format +$x_correlation_id = 1d78b56b-626b-4ea9-ac91-219e9d26ecb2; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -206,7 +206,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelA1099V2\PaginatedQueryResultModelCompanyResponse**](../Model/PaginatedQueryResultModelCompanyResponse.md) +[**\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelCompanyResponse**](../Model/PaginatedQueryResultModelCompanyResponse.md) ### Authorization @@ -224,7 +224,7 @@ Name | Type | Description | Notes ## `getCompany()` ```php -getCompany($id, $avalara_version, $x_correlation_id, $x_avalara_client): \AvalaraSDK\ModelA1099V2\CompanyResponse +getCompany($id, $avalara_version, $x_correlation_id, $x_avalara_client): \Avalara\SDK\Model\A1099\V2\CompanyResponse ``` Retrieve a company @@ -247,11 +247,11 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\CompaniesW9Api($client); +$apiInstance = new Avalara\SDK\Api\CompaniesW9Api($client); $id = 'id_example'; // string | Id of the company $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 3f7b5971-06e7-4459-84af-61db7fdcb027; // string | Unique correlation Id in a GUID format +$x_correlation_id = 2a6b8fe4-7092-4641-95db-24a0a37a881b; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -273,7 +273,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelA1099V2\CompanyResponse**](../Model/CompanyResponse.md) +[**\Avalara\SDK\Model\A1099\V2\CompanyResponse**](../Model/CompanyResponse.md) ### Authorization @@ -291,7 +291,7 @@ Name | Type | Description | Notes ## `updateCompany()` ```php -updateCompany($id, $avalara_version, $x_correlation_id, $x_avalara_client, $company_create_update_request_model): \AvalaraSDK\ModelA1099V2\CompanyResponseModel +updateCompany($id, $avalara_version, $x_correlation_id, $x_avalara_client, $create_company_request): \Avalara\SDK\Model\A1099\V2\CompanyResponse ``` Update a company @@ -314,16 +314,16 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\CompaniesW9Api($client); +$apiInstance = new Avalara\SDK\Api\CompaniesW9Api($client); $id = 'id_example'; // string | The ID of the company to update $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 1cd32062-b0bc-46a0-8311-a973b8fb3d56; // string | Unique correlation Id in a GUID format +$x_correlation_id = d2497d39-235c-472f-b1b3-5fbeac3ffbdb; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . -$company_create_update_request_model = new \AvalaraSDK\ModelA1099V2\CompanyCreateUpdateRequestModel(); // \AvalaraSDK\ModelA1099V2\CompanyCreateUpdateRequestModel | The updated company data +$create_company_request = {"name":"Acme Corporation","dbaName":"","email":"contact@acmecorp.com","address":"123 Business Ave","city":"Phoenix","state":"AZ","zip":"85001","telephone":"602-555-0123","tin":"12-3456789","referenceId":"","doTinMatch":null,"groupName":"","foreignProvince":"","countryCode":"US","resendRequests":null,"resendIntervalDays":null,"maxReminderAttempts":null}; // \Avalara\SDK\Model\A1099\V2\CreateCompanyRequest | The updated company data try { - $result = $apiInstance->updateCompany($id, $avalara_version, $x_correlation_id, $x_avalara_client, $company_create_update_request_model); + $result = $apiInstance->updateCompany($id, $avalara_version, $x_correlation_id, $x_avalara_client, $create_company_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling CompaniesW9Api->updateCompany: ', $e->getMessage(), PHP_EOL; @@ -338,11 +338,11 @@ Name | Type | Description | Notes **avalara_version** | **string**| API version | **x_correlation_id** | **string**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **string**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **company_create_update_request_model** | [**\AvalaraSDK\ModelA1099V2\CompanyCreateUpdateRequestModel**](../Model/CompanyCreateUpdateRequestModel.md)| The updated company data | [optional] + **create_company_request** | [**\Avalara\SDK\Model\A1099\V2\CreateCompanyRequest**](../Model/CreateCompanyRequest.md)| The updated company data | [optional] ### Return type -[**\AvalaraSDK\ModelA1099V2\CompanyResponseModel**](../Model/CompanyResponseModel.md) +[**\Avalara\SDK\Model\A1099\V2\CompanyResponse**](../Model/CompanyResponse.md) ### Authorization diff --git a/docs/A1099/V2/Forms1099Api.md b/docs/A1099/V2/Forms1099Api.md index d4a87ab..7b5a93e 100644 --- a/docs/A1099/V2/Forms1099Api.md +++ b/docs/A1099/V2/Forms1099Api.md @@ -1,6 +1,6 @@ -# AvalaraSDK\Forms1099Api +# Avalara\SDK\Forms1099Api -All URIs are relative to https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/avalara1099. +All URIs are relative to https://api.sbx.avalara.com/avalara1099. Method | HTTP request | Description ------------- | ------------- | ------------- @@ -16,12 +16,12 @@ Method | HTTP request | Description ## `bulkUpsert1099Forms()` ```php -bulkUpsert1099Forms($avalara_version, $dry_run, $x_correlation_id, $x_avalara_client, $bulk_upsert1099_forms_request): \AvalaraSDK\ModelA1099V2\Form1099ProccessResult +bulkUpsert1099Forms($avalara_version, $dry_run, $x_correlation_id, $x_avalara_client, $form1099_list_request): \Avalara\SDK\Model\A1099\V2\JobResponse ``` Create or update multiple 1099/1095/W2/1042S forms -This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"587-65-4321\", \"TinType\": \"SSN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"Email\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"NonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalAndHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"DirectSalesIndicator\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"587-65-4321\", \"tinType\": \"SSN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"nonUsProvince\": \"\", \"email\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"directSalesIndicator\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\", \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34, \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. +This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. ### Example @@ -39,16 +39,16 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\Forms1099Api($client); +$apiInstance = new Avalara\SDK\Api\Forms1099Api($client); $avalara_version = 2.0.0; // string | API version -$dry_run = false; // bool | -$x_correlation_id = fc005c04-52f7-44d6-bf16-6551603a8324; // string | Unique correlation Id in a GUID format +$dry_run = false; // bool | defaults to false. If true, it will NOT change the DB. It will just return a report of what would've have been changed in the DB +$x_correlation_id = f50b386c-98d3-4d80-bf46-648bbc9bc974; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . -$bulk_upsert1099_forms_request = new \AvalaraSDK\ModelA1099V2\BulkUpsert1099FormsRequest(); // \AvalaraSDK\ModelA1099V2\BulkUpsert1099FormsRequest | +$form1099_list_request = {"type":"1099-NEC","forms":[{"type":"1099-NEC","issuerId":"12345","issuerReferenceId":"ISSUER-REF-2024","taxYear":2024,"referenceId":"NEC-REF-001","tin":"123456789","recipientName":"John Doe","tinType":"SSN","recipientSecondName":"Doe Enterprises","address":"123 Main Street","address2":"Suite 100","city":"New York","state":"NY","zip":"10001","email":"john.doe@example.com","accountNumber":"ACC123456","officeCode":"NYC01","countryCode":"US","nonemployeeCompensation":15000.0,"directSalesIndicator":true,"federalIncomeTaxWithheld":3000.0,"secondTinNotice":false,"federalEfileDate":"2024-03-15","stateEfileDate":"2024-03-20","recipientEdeliveryDate":"2024-03-25","postalMail":false,"tinMatch":true,"addressVerification":true,"stateAndLocalWithholding":{"stateTaxWithheld":500.0,"state":"NY","stateIdNumber":"NY123456","stateIncome":15000.0,"localTaxWithheld":250.0,"locality":"New York City","localityIdNumber":"NYC789","localIncome":15000.0}}]}; // \Avalara\SDK\Model\A1099\V2\Form1099ListRequest | try { - $result = $apiInstance->bulkUpsert1099Forms($avalara_version, $dry_run, $x_correlation_id, $x_avalara_client, $bulk_upsert1099_forms_request); + $result = $apiInstance->bulkUpsert1099Forms($avalara_version, $dry_run, $x_correlation_id, $x_avalara_client, $form1099_list_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling Forms1099Api->bulkUpsert1099Forms: ', $e->getMessage(), PHP_EOL; @@ -60,14 +60,14 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| API version | - **dry_run** | **bool**| | [optional] [default to false] + **dry_run** | **bool**| defaults to false. If true, it will NOT change the DB. It will just return a report of what would've have been changed in the DB | [optional] [default to false] **x_correlation_id** | **string**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **string**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **bulk_upsert1099_forms_request** | [**\AvalaraSDK\ModelA1099V2\BulkUpsert1099FormsRequest**](../Model/BulkUpsert1099FormsRequest.md)| | [optional] + **form1099_list_request** | [**\Avalara\SDK\Model\A1099\V2\Form1099ListRequest**](../Model/Form1099ListRequest.md)| | [optional] ### Return type -[**\AvalaraSDK\ModelA1099V2\Form1099ProccessResult**](../Model/Form1099ProccessResult.md) +[**\Avalara\SDK\Model\A1099\V2\JobResponse**](../Model/JobResponse.md) ### Authorization @@ -85,7 +85,7 @@ Name | Type | Description | Notes ## `create1099Form()` ```php -create1099Form($avalara_version, $x_correlation_id, $x_avalara_client, $i_create_form1099_request): \AvalaraSDK\ModelA1099V2\Create1099Form201Response +create1099Form($avalara_version, $x_correlation_id, $x_avalara_client, $get1099_form200_response): \Avalara\SDK\Model\A1099\V2\Get1099Form200Response ``` Create a 1099/1095/W2/1042S form @@ -108,15 +108,15 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\Forms1099Api($client); +$apiInstance = new Avalara\SDK\Api\Forms1099Api($client); $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 13eb4eb0-0e7d-41e3-adf3-61b131c1a92c; // string | Unique correlation Id in a GUID format +$x_correlation_id = de4dccc9-cc2b-4d16-9254-ff1ca8a8a90b; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . -$i_create_form1099_request = new \AvalaraSDK\ModelA1099V2\ICreateForm1099Request(); // \AvalaraSDK\ModelA1099V2\ICreateForm1099Request +$get1099_form200_response = {"type":"1099-NEC","issuerId":"12345","issuerReferenceId":"ISSUER-REF-2024","taxYear":2024,"referenceId":"NEC-REF-001","tin":"123456789","recipientName":"John Doe","tinType":"SSN","recipientSecondName":"Doe Enterprises","address":"123 Main Street","address2":"Suite 100","city":"New York","state":"NY","zip":"10001","email":"john.doe@example.com","accountNumber":"ACC123456","officeCode":"NYC01","countryCode":"US","nonemployeeCompensation":15000.0,"directSalesIndicator":true,"federalIncomeTaxWithheld":3000.0,"secondTinNotice":false,"federalEfileDate":"2024-03-15","stateEfileDate":"2024-03-20","recipientEdeliveryDate":"2024-03-25","postalMail":false,"tinMatch":true,"addressVerification":true,"stateAndLocalWithholding":{"stateTaxWithheld":500.0,"state":"NY","stateIdNumber":"NY123456","stateIncome":15000.0,"localTaxWithheld":250.0,"locality":"New York City","localityIdNumber":"NYC789","localIncome":15000.0}}; // \Avalara\SDK\Model\A1099\V2\Get1099Form200Response try { - $result = $apiInstance->create1099Form($avalara_version, $x_correlation_id, $x_avalara_client, $i_create_form1099_request); + $result = $apiInstance->create1099Form($avalara_version, $x_correlation_id, $x_avalara_client, $get1099_form200_response); print_r($result); } catch (Exception $e) { echo 'Exception when calling Forms1099Api->create1099Form: ', $e->getMessage(), PHP_EOL; @@ -130,11 +130,11 @@ Name | Type | Description | Notes **avalara_version** | **string**| API version | **x_correlation_id** | **string**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **string**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **i_create_form1099_request** | [**\AvalaraSDK\ModelA1099V2\ICreateForm1099Request**](../Model/ICreateForm1099Request.md)| | [optional] + **get1099_form200_response** | [**\Avalara\SDK\Model\A1099\V2\Get1099Form200Response**](../Model/Get1099Form200Response.md)| | [optional] ### Return type -[**\AvalaraSDK\ModelA1099V2\Create1099Form201Response**](../Model/Create1099Form201Response.md) +[**\Avalara\SDK\Model\A1099\V2\Get1099Form200Response**](../Model/Get1099Form200Response.md) ### Authorization @@ -175,11 +175,11 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\Forms1099Api($client); +$apiInstance = new Avalara\SDK\Api\Forms1099Api($client); $id = 'id_example'; // string | The unique identifier of the desired form to delete. $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 2bcc9cf0-9638-46d5-a792-be61566e0651; // string | Unique correlation Id in a GUID format +$x_correlation_id = f9800afa-ef3a-4db7-856e-c48ee3f0c58f; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -218,7 +218,7 @@ void (empty response body) ## `get1099Form()` ```php -get1099Form($id, $avalara_version, $x_correlation_id, $x_avalara_client): \AvalaraSDK\ModelA1099V2\Get1099Form200Response +get1099Form($id, $avalara_version, $x_correlation_id, $x_avalara_client): \Avalara\SDK\Model\A1099\V2\Get1099Form200Response ``` Retrieve a 1099/1095/W2/1042S form @@ -241,11 +241,11 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\Forms1099Api($client); +$apiInstance = new Avalara\SDK\Api\Forms1099Api($client); $id = 'id_example'; // string $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 6e842a03-8b64-4b02-8c5e-7073bf4e8a8c; // string | Unique correlation Id in a GUID format +$x_correlation_id = e8b98a82-a252-4cbb-81c4-bc4c4e435398; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -267,7 +267,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelA1099V2\Get1099Form200Response**](../Model/Get1099Form200Response.md) +[**\Avalara\SDK\Model\A1099\V2\Get1099Form200Response**](../Model/Get1099Form200Response.md) ### Authorization @@ -308,12 +308,12 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\Forms1099Api($client); +$apiInstance = new Avalara\SDK\Api\Forms1099Api($client); $id = 'id_example'; // string | The ID of the form $avalara_version = 2.0.0; // string | API version $mark_edelivered = True; // bool | Optional boolean that if set indicates that the form should be marked as having been successfully edelivered -$x_correlation_id = 7b4aa70b-3a10-4fa0-bf19-7592170409b7; // string | Unique correlation Id in a GUID format +$x_correlation_id = d9d0d6ae-f4f4-4400-87e0-bbded84b3d8a; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -354,12 +354,12 @@ Name | Type | Description | Notes ## `list1099Forms()` ```php -list1099Forms($avalara_version, $filter, $top, $skip, $order_by, $x_correlation_id, $x_avalara_client): \AvalaraSDK\ModelA1099V2\Form1099ListResponse +list1099Forms($avalara_version, $filter, $top, $skip, $order_by, $count, $count_only, $x_correlation_id, $x_avalara_client): \Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelForm1099Base ``` List 1099/1095/W2/1042S forms -List 1099/1095/W2/1042S forms. Filterable fields are name, referenceId and taxYear. +List 1099/1095/W2/1042S forms. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: - issuerId - issuerReferenceId - taxYear - addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified - createdAt - edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted - email - federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held - recipientName - mailStatus - possible values are: sent, unscheduled, pending, delivered - referenceId - tinMatchStatus - possible values are: none, pending, matched, failed - type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC - updatedAt - validity - possible values are: true, false For more information on filtering, see Filtering in REST. ### Example @@ -377,18 +377,20 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\Forms1099Api($client); +$apiInstance = new Avalara\SDK\Api\Forms1099Api($client); $avalara_version = 2.0.0; // string | API version -$filter = issuerId eq 884781823; // string | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: issuerId issuerReferenceId taxYear addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified createdAt edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted email federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held recipientName mailStatus - possible values are: sent, unscheduled, pending, delivered referenceId tinMatchStatus - possible values are: none, pending, matched, failed type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC updatedAt validity - possible values are: true, false -$top = 10; // int | If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. -$skip = 0; // int | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. -$order_by = 'order_by_example'; // string | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example issuerReferenceId ASC. Supported sorting fields are: issuerReferenceId taxYear createdAt recipientName updatedAt -$x_correlation_id = 7766bce5-4834-4907-81e9-dd0fd6c13079; // string | Unique correlation Id in a GUID format +$filter = issuerId eq 884781823; // string | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. +$top = 56; // int | If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. +$skip = 56; // int | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. +$order_by = 'order_by_example'; // string | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. +$count = True; // bool | If true, return the global count of elements in the collection. +$count_only = True; // bool | If true, return ONLY the global count of elements in the collection. It only applies when count=true. +$x_correlation_id = 25895c3d-a7a0-4ca5-bc48-79970495b379; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { - $result = $apiInstance->list1099Forms($avalara_version, $filter, $top, $skip, $order_by, $x_correlation_id, $x_avalara_client); + $result = $apiInstance->list1099Forms($avalara_version, $filter, $top, $skip, $order_by, $count, $count_only, $x_correlation_id, $x_avalara_client); print_r($result); } catch (Exception $e) { echo 'Exception when calling Forms1099Api->list1099Forms: ', $e->getMessage(), PHP_EOL; @@ -400,16 +402,18 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| API version | - **filter** | **string**| A filter statement to identify specific records to retrieve. For more information on filtering, see <a href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</a>. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: issuerId issuerReferenceId taxYear addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified createdAt edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted email federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held recipientName mailStatus - possible values are: sent, unscheduled, pending, delivered referenceId tinMatchStatus - possible values are: none, pending, matched, failed type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC updatedAt validity - possible values are: true, false | [optional] - **top** | **int**| If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. | [optional] [default to 10] - **skip** | **int**| If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. | [optional] [default to 0] - **order_by** | **string**| A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example issuerReferenceId ASC. Supported sorting fields are: issuerReferenceId taxYear createdAt recipientName updatedAt | [optional] + **filter** | **string**| A filter statement to identify specific records to retrieve. For more information on filtering, see <a href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</a>. | [optional] + **top** | **int**| If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. | [optional] + **skip** | **int**| If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. | [optional] + **order_by** | **string**| A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. | [optional] + **count** | **bool**| If true, return the global count of elements in the collection. | [optional] + **count_only** | **bool**| If true, return ONLY the global count of elements in the collection. It only applies when count=true. | [optional] **x_correlation_id** | **string**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **string**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] ### Return type -[**\AvalaraSDK\ModelA1099V2\Form1099ListResponse**](../Model/Form1099ListResponse.md) +[**\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelForm1099Base**](../Model/PaginatedQueryResultModelForm1099Base.md) ### Authorization @@ -427,7 +431,7 @@ Name | Type | Description | Notes ## `update1099Form()` ```php -update1099Form($id, $avalara_version, $x_correlation_id, $x_avalara_client, $i_update_form1099_request): \AvalaraSDK\ModelA1099V2\Update1099Form200Response +update1099Form($id, $avalara_version, $x_correlation_id, $x_avalara_client, $get1099_form200_response): \Avalara\SDK\Model\A1099\V2\Get1099Form200Response ``` Update a 1099/1095/W2/1042S form @@ -450,16 +454,16 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\Forms1099Api($client); +$apiInstance = new Avalara\SDK\Api\Forms1099Api($client); $id = 'id_example'; // string $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 9f622e4f-7992-4e4f-8e24-e628c5339402; // string | Unique correlation Id in a GUID format +$x_correlation_id = 4ac97a3a-ecbd-4fdb-8cde-67d3ae9d724d; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . -$i_update_form1099_request = new \AvalaraSDK\ModelA1099V2\IUpdateForm1099Request(); // \AvalaraSDK\ModelA1099V2\IUpdateForm1099Request +$get1099_form200_response = {"type":"1099-NEC","issuerId":"12345","issuerReferenceId":"ISSUER-REF-2024","taxYear":2024,"referenceId":"NEC-REF-001","tin":"123456789","recipientName":"John Doe","tinType":"SSN","recipientSecondName":"Doe Enterprises","address":"123 Main Street","address2":"Suite 100","city":"New York","state":"NY","zip":"10001","email":"john.doe@example.com","accountNumber":"ACC123456","officeCode":"NYC01","countryCode":"US","nonemployeeCompensation":15000.0,"directSalesIndicator":true,"federalIncomeTaxWithheld":3000.0,"secondTinNotice":false,"federalEfileDate":"2024-03-15","stateEfileDate":"2024-03-20","recipientEdeliveryDate":"2024-03-25","postalMail":false,"tinMatch":true,"addressVerification":true,"stateAndLocalWithholding":{"stateTaxWithheld":500.0,"state":"NY","stateIdNumber":"NY123456","stateIncome":15000.0,"localTaxWithheld":250.0,"locality":"New York City","localityIdNumber":"NYC789","localIncome":15000.0}}; // \Avalara\SDK\Model\A1099\V2\Get1099Form200Response try { - $result = $apiInstance->update1099Form($id, $avalara_version, $x_correlation_id, $x_avalara_client, $i_update_form1099_request); + $result = $apiInstance->update1099Form($id, $avalara_version, $x_correlation_id, $x_avalara_client, $get1099_form200_response); print_r($result); } catch (Exception $e) { echo 'Exception when calling Forms1099Api->update1099Form: ', $e->getMessage(), PHP_EOL; @@ -474,11 +478,11 @@ Name | Type | Description | Notes **avalara_version** | **string**| API version | **x_correlation_id** | **string**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **string**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **i_update_form1099_request** | [**\AvalaraSDK\ModelA1099V2\IUpdateForm1099Request**](../Model/IUpdateForm1099Request.md)| | [optional] + **get1099_form200_response** | [**\Avalara\SDK\Model\A1099\V2\Get1099Form200Response**](../Model/Get1099Form200Response.md)| | [optional] ### Return type -[**\AvalaraSDK\ModelA1099V2\Update1099Form200Response**](../Model/Update1099Form200Response.md) +[**\Avalara\SDK\Model\A1099\V2\Get1099Form200Response**](../Model/Get1099Form200Response.md) ### Authorization diff --git a/docs/A1099/V2/FormsW9Api.md b/docs/A1099/V2/FormsW9Api.md index b50098b..bb79e91 100644 --- a/docs/A1099/V2/FormsW9Api.md +++ b/docs/A1099/V2/FormsW9Api.md @@ -1,9 +1,10 @@ -# AvalaraSDK\FormsW9Api +# Avalara\SDK\FormsW9Api -All URIs are relative to https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/avalara1099. +All URIs are relative to https://api.sbx.avalara.com/avalara1099. Method | HTTP request | Description ------------- | ------------- | ------------- +[**createAndSendW9FormEmail()**](FormsW9Api.md#createAndSendW9FormEmail) | **POST** /w9/forms/$create-and-send-email | Create a minimal W9/W4/W8 form and sends the e-mail request [**createW9Form()**](FormsW9Api.md#createW9Form) | **POST** /w9/forms | Create a W9/W4/W8 form [**deleteW9Form()**](FormsW9Api.md#deleteW9Form) | **DELETE** /w9/forms/{id} | Delete a W9/W4/W8 form [**getW9Form()**](FormsW9Api.md#getW9Form) | **GET** /w9/forms/{id} | Retrieve a W9/W4/W8 form @@ -13,10 +14,77 @@ Method | HTTP request | Description [**uploadW9Files()**](FormsW9Api.md#uploadW9Files) | **POST** /w9/forms/{id}/attachment | Replace the PDF file for a W9/W4/W8 form +## `createAndSendW9FormEmail()` + +```php +createAndSendW9FormEmail($avalara_version, $x_correlation_id, $x_avalara_client, $create_and_send_w9_form_email_request): \Avalara\SDK\Model\A1099\V2\CreateW9Form201Response +``` + +Create a minimal W9/W4/W8 form and sends the e-mail request + +Create a minimal W9/W4/W8 form and sends the e-mail request. + +### Example + +```php +setBearerToken('YOUR_JWT_ACCESS_TOKEN') + ->setAppName('YOUR_APP_NAME') + ->setEnvironment('sandbox') + ->setMachineName('YOUR_MACHINE_NAME') + ->setAppVersion('YOUR_APP_VERSION'); + +$client = new \Avalara\SDK\ApiClient($config); + +$apiInstance = new Avalara\SDK\Api\FormsW9Api($client); + +$avalara_version = 2.0.0; // string | API version +$x_correlation_id = 2214948e-c306-43fe-bd5d-2367079a9afb; // string | Unique correlation Id in a GUID format +$x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . +$create_and_send_w9_form_email_request = {"type":"W9","email":"john.doe@example.com","name":"John Doe","accountNumber":"ACC01","companyId":"32553266","referenceId":"REF-12345"}; // \Avalara\SDK\Model\A1099\V2\CreateAndSendW9FormEmailRequest | Form to be created + +try { + $result = $apiInstance->createAndSendW9FormEmail($avalara_version, $x_correlation_id, $x_avalara_client, $create_and_send_w9_form_email_request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling FormsW9Api->createAndSendW9FormEmail: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalara_version** | **string**| API version | + **x_correlation_id** | **string**| Unique correlation Id in a GUID format | [optional] + **x_avalara_client** | **string**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] + **create_and_send_w9_form_email_request** | [**\Avalara\SDK\Model\A1099\V2\CreateAndSendW9FormEmailRequest**](../Model/CreateAndSendW9FormEmailRequest.md)| Form to be created | [optional] + +### Return type + +[**\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response**](../Model/CreateW9Form201Response.md) + +### Authorization + +[bearer](../../../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: `application/json`, `text/json`, `application/*+json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../../README.md#endpoints) +[[Back to Model list]](../../../README.md#models) +[[Back to README]](../../../README.md) + ## `createW9Form()` ```php -createW9Form($avalara_version, $x_correlation_id, $x_avalara_client, $create_w9_form_request): \AvalaraSDK\ModelA1099V2\CreateW9Form201Response +createW9Form($avalara_version, $x_correlation_id, $x_avalara_client, $create_w9_form_request): \Avalara\SDK\Model\A1099\V2\CreateW9Form201Response ``` Create a W9/W4/W8 form @@ -39,12 +107,12 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\FormsW9Api($client); +$apiInstance = new Avalara\SDK\Api\FormsW9Api($client); $avalara_version = 2.0.0; // string | API version -$x_correlation_id = d8cc3501-afdd-4b9e-af90-85db9793cbbc; // string | Unique correlation Id in a GUID format +$x_correlation_id = 31c8c463-0df9-4a90-b6c8-88622e9da1f2; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . -$create_w9_form_request = {"type":"W9","name":"John Doe","businessName":"Acme Inc.","businessClassification":"Individual","businessOther":null,"foreignPartnerOwnerOrBeneficiary":false,"exemptPayeeCode":null,"exemptFatcaCode":null,"foreignCountryIndicator":false,"address":"123 Main St.","foreignAddress":null,"city":"Anytown","state":"CA","zip":"12345","accountNumber":null,"tinType":"SSN","tin":"543456789","backupWithholding":false,"is1099able":true,"companyId":"32553266","referenceId":null,"email":null,"eDeliveryConsentedAt":null,"signature":null}; // \AvalaraSDK\ModelA1099V2\CreateW9FormRequest | Form to be created +$create_w9_form_request = {"type":"W9","name":"John Doe","businessName":"Acme Inc.","businessClassification":"Individual","businessOther":null,"foreignPartnerOwnerOrBeneficiary":false,"exemptPayeeCode":null,"exemptFatcaCode":null,"foreignCountryIndicator":false,"address":"123 Main St.","foreignAddress":null,"city":"Anytown","state":"CA","zip":"12345","accountNumber":null,"tinType":"SSN","tin":"543456789","backupWithholding":false,"is1099able":true,"eDeliveryConsentedAt":null,"signature":null,"companyId":"32553266","referenceId":null,"email":null}; // \Avalara\SDK\Model\A1099\V2\CreateW9FormRequest | Form to be created try { $result = $apiInstance->createW9Form($avalara_version, $x_correlation_id, $x_avalara_client, $create_w9_form_request); @@ -61,11 +129,11 @@ Name | Type | Description | Notes **avalara_version** | **string**| API version | **x_correlation_id** | **string**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **string**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **create_w9_form_request** | [**\AvalaraSDK\ModelA1099V2\CreateW9FormRequest**](../Model/CreateW9FormRequest.md)| Form to be created | [optional] + **create_w9_form_request** | [**\Avalara\SDK\Model\A1099\V2\CreateW9FormRequest**](../Model/CreateW9FormRequest.md)| Form to be created | [optional] ### Return type -[**\AvalaraSDK\ModelA1099V2\CreateW9Form201Response**](../Model/CreateW9Form201Response.md) +[**\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response**](../Model/CreateW9Form201Response.md) ### Authorization @@ -106,11 +174,11 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\FormsW9Api($client); +$apiInstance = new Avalara\SDK\Api\FormsW9Api($client); $id = 'id_example'; // string | ID of the form to delete $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 0013f0dd-e304-45c6-9f17-bd023626ba48; // string | Unique correlation Id in a GUID format +$x_correlation_id = b83c29be-2fb5-46f3-9e8f-50e1e426b5d3; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -149,7 +217,7 @@ void (empty response body) ## `getW9Form()` ```php -getW9Form($id, $avalara_version, $x_correlation_id, $x_avalara_client): \AvalaraSDK\ModelA1099V2\CreateW9Form201Response +getW9Form($id, $avalara_version, $x_correlation_id, $x_avalara_client): \Avalara\SDK\Model\A1099\V2\CreateW9Form201Response ``` Retrieve a W9/W4/W8 form @@ -172,11 +240,11 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\FormsW9Api($client); +$apiInstance = new Avalara\SDK\Api\FormsW9Api($client); $id = 'id_example'; // string | ID of the form $avalara_version = 2.0.0; // string | API version -$x_correlation_id = e76a4eb2-f5f0-4586-888a-c25443f75fc4; // string | Unique correlation Id in a GUID format +$x_correlation_id = 7d74e367-1323-4e0f-9bb4-63ea68bd9f7c; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -198,7 +266,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelA1099V2\CreateW9Form201Response**](../Model/CreateW9Form201Response.md) +[**\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response**](../Model/CreateW9Form201Response.md) ### Authorization @@ -216,7 +284,7 @@ Name | Type | Description | Notes ## `listW9Forms()` ```php -listW9Forms($avalara_version, $filter, $top, $skip, $order_by, $count, $count_only, $x_correlation_id, $x_avalara_client): \AvalaraSDK\ModelA1099V2\PaginatedQueryResultModelW9FormBaseResponse +listW9Forms($avalara_version, $filter, $top, $skip, $order_by, $count, $count_only, $x_correlation_id, $x_avalara_client): \Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelW9FormBaseResponse ``` List W9/W4/W8 forms @@ -239,7 +307,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\FormsW9Api($client); +$apiInstance = new Avalara\SDK\Api\FormsW9Api($client); $avalara_version = 2.0.0; // string | API version $filter = 'filter_example'; // string | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. @@ -248,7 +316,7 @@ $skip = 56; // int | If nonzero, skip this number of results before returning da $order_by = 'order_by_example'; // string | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. $count = True; // bool | If true, return the global count of elements in the collection. $count_only = True; // bool | If true, return ONLY the global count of elements in the collection. It only applies when count=true. -$x_correlation_id = 8092ac9c-17d0-4ee8-a00e-804088e5ab81; // string | Unique correlation Id in a GUID format +$x_correlation_id = 7eb2ccbb-5b16-4d40-ab9a-cdec87cec21b; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -275,7 +343,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelA1099V2\PaginatedQueryResultModelW9FormBaseResponse**](../Model/PaginatedQueryResultModelW9FormBaseResponse.md) +[**\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelW9FormBaseResponse**](../Model/PaginatedQueryResultModelW9FormBaseResponse.md) ### Authorization @@ -293,12 +361,12 @@ Name | Type | Description | Notes ## `sendW9FormEmail()` ```php -sendW9FormEmail($id, $avalara_version, $x_correlation_id, $x_avalara_client): \AvalaraSDK\ModelA1099V2\IW9FormDataModelsOneOf +sendW9FormEmail($id, $avalara_version, $x_correlation_id, $x_avalara_client): \Avalara\SDK\Model\A1099\V2\CreateW9Form201Response ``` Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form -Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. +Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request. ### Example @@ -316,11 +384,11 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\FormsW9Api($client); +$apiInstance = new Avalara\SDK\Api\FormsW9Api($client); $id = 'id_example'; // string | The ID of the W9/W4/W8 form. $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 05ca3285-5ab1-43c0-88d7-f23c30428d54; // string | Unique correlation Id in a GUID format +$x_correlation_id = df570e41-1404-49d7-9be5-18b669b7ab5a; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -342,7 +410,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelA1099V2\IW9FormDataModelsOneOf**](../Model/IW9FormDataModelsOneOf.md) +[**\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response**](../Model/CreateW9Form201Response.md) ### Authorization @@ -360,7 +428,7 @@ Name | Type | Description | Notes ## `updateW9Form()` ```php -updateW9Form($id, $avalara_version, $x_correlation_id, $x_avalara_client, $iw9_form_data_models_one_of): \AvalaraSDK\ModelA1099V2\IW9FormDataModelsOneOf +updateW9Form($id, $avalara_version, $x_correlation_id, $x_avalara_client, $iw9_form_data_models_one_of): \Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf ``` Update a W9/W4/W8 form @@ -383,13 +451,13 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\FormsW9Api($client); +$apiInstance = new Avalara\SDK\Api\FormsW9Api($client); $id = 'id_example'; // string | ID of the form to update $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 87498441-c774-4e3a-864e-dd604bff0d41; // string | Unique correlation Id in a GUID format +$x_correlation_id = db96dbe4-c511-42f0-922a-c972ebc22e2f; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . -$iw9_form_data_models_one_of = new \AvalaraSDK\ModelA1099V2\IW9FormDataModelsOneOf(); // \AvalaraSDK\ModelA1099V2\IW9FormDataModelsOneOf | Form to be updated +$iw9_form_data_models_one_of = new \Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf(); // \Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf | Form to be updated try { $result = $apiInstance->updateW9Form($id, $avalara_version, $x_correlation_id, $x_avalara_client, $iw9_form_data_models_one_of); @@ -407,11 +475,11 @@ Name | Type | Description | Notes **avalara_version** | **string**| API version | **x_correlation_id** | **string**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **string**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **iw9_form_data_models_one_of** | [**\AvalaraSDK\ModelA1099V2\IW9FormDataModelsOneOf**](../Model/IW9FormDataModelsOneOf.md)| Form to be updated | [optional] + **iw9_form_data_models_one_of** | [**\Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf**](../Model/IW9FormDataModelsOneOf.md)| Form to be updated | [optional] ### Return type -[**\AvalaraSDK\ModelA1099V2\IW9FormDataModelsOneOf**](../Model/IW9FormDataModelsOneOf.md) +[**\Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf**](../Model/IW9FormDataModelsOneOf.md) ### Authorization @@ -452,11 +520,11 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\FormsW9Api($client); +$apiInstance = new Avalara\SDK\Api\FormsW9Api($client); $id = 'id_example'; // string | Id of the form $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 453b7d64-1fd0-4ed3-ba3c-a1d9ca1d69e6; // string | Unique correlation Id in a GUID format +$x_correlation_id = 1cdd6ae5-5b24-489e-9cbf-c95b7d333325; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . $file = "/path/to/file.txt"; // \SplFileObject diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index 1d112a6..b926e3e 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -1,6 +1,6 @@ -# AvalaraSDK\Issuers1099Api +# Avalara\SDK\Issuers1099Api -All URIs are relative to https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/avalara1099. +All URIs are relative to https://api.sbx.avalara.com/avalara1099. Method | HTTP request | Description ------------- | ------------- | ------------- @@ -14,7 +14,7 @@ Method | HTTP request | Description ## `createIssuer()` ```php -createIssuer($avalara_version, $x_correlation_id, $x_avalara_client, $issuer_command): \AvalaraSDK\ModelA1099V2\IssuerResponse +createIssuer($avalara_version, $x_correlation_id, $x_avalara_client, $create_issuer_request): \Avalara\SDK\Model\A1099\V2\IssuerResponse ``` Create an issuer @@ -37,15 +37,15 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\Issuers1099Api($client); +$apiInstance = new Avalara\SDK\Api\Issuers1099Api($client); $avalara_version = 2.0.0; // string | API version -$x_correlation_id = d2b38090-a4c9-4170-bc1d-6cc2778b0bd0; // string | Unique correlation Id in a GUID format +$x_correlation_id = ced0c206-5b7f-4d5a-8391-fd3f074295f8; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . -$issuer_command = new \AvalaraSDK\ModelA1099V2\IssuerCommand(); // \AvalaraSDK\ModelA1099V2\IssuerCommand | The issuer to create +$create_issuer_request = {"name":"Acme Corporation","dbaName":"Acme Widgets","tin":"94-2765431","referenceId":"issuer-001","telephone":"+1-555-123-4567","taxYear":2024,"countryCode":"US","email":"support@acmecorp.com","address":"123 Main Street","city":"San Francisco","state":"CA","zip":"94105","foreignProvince":"","transferAgentName":"","lastFiling":false}; // \Avalara\SDK\Model\A1099\V2\CreateIssuerRequest | The issuer to create try { - $result = $apiInstance->createIssuer($avalara_version, $x_correlation_id, $x_avalara_client, $issuer_command); + $result = $apiInstance->createIssuer($avalara_version, $x_correlation_id, $x_avalara_client, $create_issuer_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling Issuers1099Api->createIssuer: ', $e->getMessage(), PHP_EOL; @@ -59,11 +59,11 @@ Name | Type | Description | Notes **avalara_version** | **string**| API version | **x_correlation_id** | **string**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **string**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **issuer_command** | [**\AvalaraSDK\ModelA1099V2\IssuerCommand**](../Model/IssuerCommand.md)| The issuer to create | [optional] + **create_issuer_request** | [**\Avalara\SDK\Model\A1099\V2\CreateIssuerRequest**](../Model/CreateIssuerRequest.md)| The issuer to create | [optional] ### Return type -[**\AvalaraSDK\ModelA1099V2\IssuerResponse**](../Model/IssuerResponse.md) +[**\Avalara\SDK\Model\A1099\V2\IssuerResponse**](../Model/IssuerResponse.md) ### Authorization @@ -104,11 +104,11 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\Issuers1099Api($client); +$apiInstance = new Avalara\SDK\Api\Issuers1099Api($client); $id = 'id_example'; // string | Id of the issuer to delete $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 22e9dc96-0041-4e27-ab37-038dc9d6c215; // string | Unique correlation Id in a GUID format +$x_correlation_id = 6895b041-20ea-4bea-a61b-a55ecb1b84d3; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -147,7 +147,7 @@ void (empty response body) ## `getIssuer()` ```php -getIssuer($id, $avalara_version, $x_correlation_id, $x_avalara_client): \AvalaraSDK\ModelA1099V2\IssuerResponse +getIssuer($id, $avalara_version, $x_correlation_id, $x_avalara_client): \Avalara\SDK\Model\A1099\V2\IssuerResponse ``` Retrieve an issuer @@ -170,11 +170,11 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\Issuers1099Api($client); +$apiInstance = new Avalara\SDK\Api\Issuers1099Api($client); $id = 'id_example'; // string | Id of the issuer to retrieve $avalara_version = 2.0.0; // string | API version -$x_correlation_id = 86c9eff5-1ed3-49b1-be09-a117b235f3e2; // string | Unique correlation Id in a GUID format +$x_correlation_id = 9e7076a2-281a-433e-9115-310ce4928896; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -196,7 +196,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelA1099V2\IssuerResponse**](../Model/IssuerResponse.md) +[**\Avalara\SDK\Model\A1099\V2\IssuerResponse**](../Model/IssuerResponse.md) ### Authorization @@ -214,7 +214,7 @@ Name | Type | Description | Notes ## `getIssuers()` ```php -getIssuers($avalara_version, $filter, $top, $skip, $order_by, $count, $count_only, $x_correlation_id, $x_avalara_client): \AvalaraSDK\ModelA1099V2\PaginatedQueryResultModelIssuerResponse +getIssuers($avalara_version, $filter, $top, $skip, $order_by, $count, $count_only, $x_correlation_id, $x_avalara_client): \Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelIssuerResponse ``` List issuers @@ -237,7 +237,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\Issuers1099Api($client); +$apiInstance = new Avalara\SDK\Api\Issuers1099Api($client); $avalara_version = 2.0.0; // string | API version $filter = taxYear eq 2024; // string | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. @@ -246,7 +246,7 @@ $skip = 56; // int | If nonzero, skip this number of results before returning da $order_by = 'order_by_example'; // string | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. $count = True; // bool | If true, return the global count of elements in the collection. $count_only = True; // bool | If true, return ONLY the global count of elements in the collection. It only applies when count=true. -$x_correlation_id = 0983f292-e1e0-4415-9cdc-b70482da76b0; // string | Unique correlation Id in a GUID format +$x_correlation_id = 04fb5d43-da04-40f1-b6d4-125e592f2d21; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { @@ -273,7 +273,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelA1099V2\PaginatedQueryResultModelIssuerResponse**](../Model/PaginatedQueryResultModelIssuerResponse.md) +[**\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelIssuerResponse**](../Model/PaginatedQueryResultModelIssuerResponse.md) ### Authorization @@ -291,7 +291,7 @@ Name | Type | Description | Notes ## `updateIssuer()` ```php -updateIssuer($id, $avalara_version, $x_correlation_id, $x_avalara_client, $issuer_command) +updateIssuer($id, $avalara_version, $x_correlation_id, $x_avalara_client, $create_issuer_request) ``` Update an issuer @@ -314,16 +314,16 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\Issuers1099Api($client); +$apiInstance = new Avalara\SDK\Api\Issuers1099Api($client); $id = 'id_example'; // string | Id of the issuer to update $avalara_version = 2.0.0; // string | API version -$x_correlation_id = f43f2c52-c35e-4e50-b1ad-2923b624e5a0; // string | Unique correlation Id in a GUID format +$x_correlation_id = 7ad26bf3-01e6-4ffe-a1cd-258f16aae719; // string | Unique correlation Id in a GUID format $x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . -$issuer_command = new \AvalaraSDK\ModelA1099V2\IssuerCommand(); // \AvalaraSDK\ModelA1099V2\IssuerCommand | The issuer to update +$create_issuer_request = {"name":"Acme Corporation","dbaName":"Acme Widgets","tin":"94-2765431","referenceId":"issuer-001","telephone":"+1-555-123-4567","taxYear":2024,"countryCode":"US","email":"support@acmecorp.com","address":"123 Main Street","city":"San Francisco","state":"CA","zip":"94105","foreignProvince":"","transferAgentName":"","lastFiling":false}; // \Avalara\SDK\Model\A1099\V2\CreateIssuerRequest | The issuer to update try { - $apiInstance->updateIssuer($id, $avalara_version, $x_correlation_id, $x_avalara_client, $issuer_command); + $apiInstance->updateIssuer($id, $avalara_version, $x_correlation_id, $x_avalara_client, $create_issuer_request); } catch (Exception $e) { echo 'Exception when calling Issuers1099Api->updateIssuer: ', $e->getMessage(), PHP_EOL; } @@ -337,7 +337,7 @@ Name | Type | Description | Notes **avalara_version** | **string**| API version | **x_correlation_id** | **string**| Unique correlation Id in a GUID format | [optional] **x_avalara_client** | **string**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **issuer_command** | [**\AvalaraSDK\ModelA1099V2\IssuerCommand**](../Model/IssuerCommand.md)| The issuer to update | [optional] + **create_issuer_request** | [**\Avalara\SDK\Model\A1099\V2\CreateIssuerRequest**](../Model/CreateIssuerRequest.md)| The issuer to update | [optional] ### Return type diff --git a/docs/A1099/V2/JobsApi.md b/docs/A1099/V2/JobsApi.md new file mode 100644 index 0000000..4d5ffbb --- /dev/null +++ b/docs/A1099/V2/JobsApi.md @@ -0,0 +1,75 @@ +# Avalara\SDK\JobsApi + +All URIs are relative to https://api.sbx.avalara.com/avalara1099. + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getJob()**](JobsApi.md#getJob) | **GET** /jobs/{id} | Retrieves information about the job + + +## `getJob()` + +```php +getJob($id, $avalara_version, $x_correlation_id, $x_avalara_client): \Avalara\SDK\Model\A1099\V2\JobResponse +``` + +Retrieves information about the job + +Retrieves information about the job + +### Example + +```php +setBearerToken('YOUR_JWT_ACCESS_TOKEN') + ->setAppName('YOUR_APP_NAME') + ->setEnvironment('sandbox') + ->setMachineName('YOUR_MACHINE_NAME') + ->setAppVersion('YOUR_APP_VERSION'); + +$client = new \Avalara\SDK\ApiClient($config); + +$apiInstance = new Avalara\SDK\Api\JobsApi($client); + +$id = 'id_example'; // string | Job id obtained from other API responses, like `/1099/bulk-upsert`. +$avalara_version = 2.0.0; // string | API version +$x_correlation_id = 7127b0fd-56f1-4e2e-bd89-c1d4f762cd9f; // string | Unique correlation Id in a GUID format +$x_avalara_client = Swagger UI; 22.1.0; // string | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . + +try { + $result = $apiInstance->getJob($id, $avalara_version, $x_correlation_id, $x_avalara_client); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling JobsApi->getJob: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Job id obtained from other API responses, like `/1099/bulk-upsert`. | + **avalara_version** | **string**| API version | + **x_correlation_id** | **string**| Unique correlation Id in a GUID format | [optional] + **x_avalara_client** | **string**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] + +### Return type + +[**\Avalara\SDK\Model\A1099\V2\JobResponse**](../Model/JobResponse.md) + +### Authorization + +[bearer](../../../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../../README.md#endpoints) +[[Back to Model list]](../../../README.md#models) +[[Back to README]](../../../README.md) diff --git a/docs/A1099/ValidationError.md b/docs/A1099/ValidationError.md index 859702c..fe7f66e 100644 --- a/docs/A1099/ValidationError.md +++ b/docs/A1099/ValidationError.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**field** | **string** | | [optional] -**errors** | **string[]** | | [optional] +**field** | **string** | The field containing the error | [optional] +**errors** | **string[]** | The list of error messages | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W4FormDataModel.md b/docs/A1099/W4FormDataModel.md index 98d6b7f..7abb195 100644 --- a/docs/A1099/W4FormDataModel.md +++ b/docs/A1099/W4FormDataModel.md @@ -123,7 +123,7 @@ Name | Type | Description | Notes **part19_formation_or_resolution_date** | **\DateTime** | | [optional] **part20_filing_date** | **\DateTime** | | [optional] **part21_determination_date** | **\DateTime** | | [optional] -**substantial_us_owners** | [**\AvalaraSDK\ModelA1099V2\W8BenESubstantialUsOwnerDataModel[]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] +**substantial_us_owners** | [**\Avalara\SDK\Model\A1099\V2\W8BenESubstantialUsOwnerDataModel[]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] **birthday** | **string** | The birthday of the individual associated with the form. | [optional] **foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not required. | [optional] **archived** | **bool** | Indicates whether the form is archived. | [optional] diff --git a/docs/A1099/W4FormMinimalRequest.md b/docs/A1099/W4FormMinimalRequest.md new file mode 100644 index 0000000..84f3f4e --- /dev/null +++ b/docs/A1099/W4FormMinimalRequest.md @@ -0,0 +1,15 @@ +# # W4FormMinimalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The form type (always \"w4\" for this model). | [optional] [readonly] +**email** | **string** | The email address of the individual associated with the form. | +**employee_first_name** | **string** | The first name of the employee. | +**employee_last_name** | **string** | The last name of the employee. | +**office_code** | **string** | The office code associated with the form. | [optional] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W4FormRequest.md b/docs/A1099/W4FormRequest.md index 0ea1dac..6dec675 100644 --- a/docs/A1099/W4FormRequest.md +++ b/docs/A1099/W4FormRequest.md @@ -24,10 +24,10 @@ Name | Type | Description | Notes **additional_withheld** | **float** | The additional amount withheld. | [optional] **exempt_from_withholding** | **bool** | Indicates whether the employee is exempt from withholding. | [optional] **office_code** | **string** | The office code associated with the form. | [optional] -**company_id** | **string** | The ID of the associated company. | [optional] -**reference_id** | **string** | A reference identifier for the form. | [optional] -**email** | **string** | The email address of the individual associated with the form. | [optional] **e_delivery_consented_at** | **\DateTime** | The date when e-delivery was consented. | [optional] **signature** | **string** | The signature of the form. | [optional] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] +**email** | **string** | The email address of the individual associated with the form. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W8BenEFormMinimalRequest.md b/docs/A1099/W8BenEFormMinimalRequest.md new file mode 100644 index 0000000..2b4286b --- /dev/null +++ b/docs/A1099/W8BenEFormMinimalRequest.md @@ -0,0 +1,14 @@ +# # W8BenEFormMinimalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The form type (always \"w8bene\" for this model). | [optional] [readonly] +**email** | **string** | The email address of the individual associated with the form. | +**name** | **string** | The name of the individual or entity associated with the form. | +**reference_number** | **string** | A reference number for the form. | [optional] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W8BenEFormRequest.md b/docs/A1099/W8BenEFormRequest.md index d864e48..5e3872f 100644 --- a/docs/A1099/W8BenEFormRequest.md +++ b/docs/A1099/W8BenEFormRequest.md @@ -97,13 +97,13 @@ Name | Type | Description | Notes **excepted_inter_affiliate_ffi_certification** | **bool** | Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. | [optional] **sponsored_direct_reporting_nffe_certification** | **bool** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] **direct_reporting_nffe_sponsoring_entity** | **string** | The name of the entity that sponsors the direct reporting NFFE. | [optional] -**substantial_us_owners** | [**\AvalaraSDK\ModelA1099V2\SubstantialUsOwnerRequest[]**](SubstantialUsOwnerRequest.md) | The list of substantial U.S. owners of passive NFFE. | [optional] +**substantial_us_owners** | [**\Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerRequest[]**](SubstantialUsOwnerRequest.md) | The list of substantial U.S. owners of passive NFFE. | [optional] **signer_name** | **string** | The name of the signer. | [optional] **capacity_to_sign_certification** | **bool** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] -**company_id** | **string** | The ID of the associated company. | [optional] -**reference_id** | **string** | A reference identifier for the form. | [optional] -**email** | **string** | The email address of the individual associated with the form. | [optional] **e_delivery_consented_at** | **\DateTime** | The date when e-delivery was consented. | [optional] **signature** | **string** | The signature of the form. | [optional] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] +**email** | **string** | The email address of the individual associated with the form. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W8BenEFormResponse.md b/docs/A1099/W8BenEFormResponse.md index a07a8f4..cabf79f 100644 --- a/docs/A1099/W8BenEFormResponse.md +++ b/docs/A1099/W8BenEFormResponse.md @@ -97,7 +97,7 @@ Name | Type | Description | Notes **excepted_inter_affiliate_ffi_certification** | **bool** | Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. | [optional] **sponsored_direct_reporting_nffe_certification** | **bool** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] **direct_reporting_nffe_sponsoring_entity** | **string** | The name of the entity that sponsors the direct reporting NFFE. | [optional] -**substantial_us_owners** | [**\AvalaraSDK\ModelA1099V2\SubstantialUsOwnerResponse[]**](SubstantialUsOwnerResponse.md) | The list of substantial U.S. owners of passive NFFE. | [optional] +**substantial_us_owners** | [**\Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerResponse[]**](SubstantialUsOwnerResponse.md) | The list of substantial U.S. owners of passive NFFE. | [optional] **signer_name** | **string** | The name of the signer. | [optional] **capacity_to_sign_certification** | **bool** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] diff --git a/docs/A1099/W8BenFormDataModel.md b/docs/A1099/W8BenFormDataModel.md index 3e3f7e3..e1f6834 100644 --- a/docs/A1099/W8BenFormDataModel.md +++ b/docs/A1099/W8BenFormDataModel.md @@ -132,7 +132,7 @@ Name | Type | Description | Notes **part19_formation_or_resolution_date** | **\DateTime** | | [optional] **part20_filing_date** | **\DateTime** | | [optional] **part21_determination_date** | **\DateTime** | | [optional] -**substantial_us_owners** | [**\AvalaraSDK\ModelA1099V2\W8BenESubstantialUsOwnerDataModel[]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] +**substantial_us_owners** | [**\Avalara\SDK\Model\A1099\V2\W8BenESubstantialUsOwnerDataModel[]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] **ein** | **string** | The employer identification number (EIN). | [optional] **ein_type** | **string** | The type of employer identification number (EIN). | [optional] **certify_box14** | **bool** | Indicates certification for box 14. | [optional] diff --git a/docs/A1099/W8BenFormMinimalRequest.md b/docs/A1099/W8BenFormMinimalRequest.md new file mode 100644 index 0000000..17e1a53 --- /dev/null +++ b/docs/A1099/W8BenFormMinimalRequest.md @@ -0,0 +1,14 @@ +# # W8BenFormMinimalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The form type (always \"w8ben\" for this model). | [optional] [readonly] +**email** | **string** | The email address of the individual associated with the form. | +**name** | **string** | The name of the individual or entity associated with the form. | +**reference_number** | **string** | A reference number for the form. | [optional] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W8BenFormRequest.md b/docs/A1099/W8BenFormRequest.md index 091e3de..740ff3b 100644 --- a/docs/A1099/W8BenFormRequest.md +++ b/docs/A1099/W8BenFormRequest.md @@ -29,10 +29,10 @@ Name | Type | Description | Notes **withholding_rate** | **string** | The withholding rate applied as per the treaty. | [optional] **income_type** | **string** | The type of income covered by the treaty. | [optional] **signer_name** | **string** | The name of the signer of the form. | [optional] -**company_id** | **string** | The ID of the associated company. | [optional] -**reference_id** | **string** | A reference identifier for the form. | [optional] -**email** | **string** | The email address of the individual associated with the form. | [optional] **e_delivery_consented_at** | **\DateTime** | The date when e-delivery was consented. | [optional] **signature** | **string** | The signature of the form. | [optional] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] +**email** | **string** | The email address of the individual associated with the form. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W8BeneFormDataModel.md b/docs/A1099/W8BeneFormDataModel.md index 4557d31..b4013d9 100644 --- a/docs/A1099/W8BeneFormDataModel.md +++ b/docs/A1099/W8BeneFormDataModel.md @@ -106,7 +106,7 @@ Name | Type | Description | Notes **part19_formation_or_resolution_date** | **\DateTime** | | [optional] **part20_filing_date** | **\DateTime** | | [optional] **part21_determination_date** | **\DateTime** | | [optional] -**substantial_us_owners** | [**\AvalaraSDK\ModelA1099V2\W8BenESubstantialUsOwnerDataModel[]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] +**substantial_us_owners** | [**\Avalara\SDK\Model\A1099\V2\W8BenESubstantialUsOwnerDataModel[]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] **employee_first_name** | **string** | The first name of the employee. | [optional] **employee_middle_name** | **string** | The middle name of the employee. | [optional] **employee_last_name** | **string** | The last name of the employee. | [optional] diff --git a/docs/A1099/W8ImyFormDataModel.md b/docs/A1099/W8ImyFormDataModel.md index 40755fd..35af046 100644 --- a/docs/A1099/W8ImyFormDataModel.md +++ b/docs/A1099/W8ImyFormDataModel.md @@ -196,7 +196,7 @@ Name | Type | Description | Notes **part19_formation_or_resolution_date** | **\DateTime** | | [optional] **part20_filing_date** | **\DateTime** | | [optional] **part21_determination_date** | **\DateTime** | | [optional] -**substantial_us_owners** | [**\AvalaraSDK\ModelA1099V2\W8BenESubstantialUsOwnerDataModel[]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] +**substantial_us_owners** | [**\Avalara\SDK\Model\A1099\V2\W8BenESubstantialUsOwnerDataModel[]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] **birthday** | **string** | The birthday of the individual associated with the form. | [optional] **foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not required. | [optional] **archived** | **bool** | Indicates whether the form is archived. | [optional] diff --git a/docs/A1099/W8ImyFormMinimalRequest.md b/docs/A1099/W8ImyFormMinimalRequest.md new file mode 100644 index 0000000..51e0289 --- /dev/null +++ b/docs/A1099/W8ImyFormMinimalRequest.md @@ -0,0 +1,14 @@ +# # W8ImyFormMinimalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The form type (always \"w8imy\" for this model). | [optional] [readonly] +**email** | **string** | The email address of the individual associated with the form. | +**name** | **string** | The name of the individual or entity associated with the form. | +**reference_number** | **string** | A reference number for the form. | [optional] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W8ImyFormRequest.md b/docs/A1099/W8ImyFormRequest.md index 270e809..73f59fa 100644 --- a/docs/A1099/W8ImyFormRequest.md +++ b/docs/A1099/W8ImyFormRequest.md @@ -116,10 +116,10 @@ Name | Type | Description | Notes **sponsored_direct_reporting_nffe_certification** | **bool** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] **direct_reporting_nffe_sponsoring_entity** | **string** | The name of the entity that sponsors the direct reporting NFFE. | [optional] **signer_name** | **string** | The name of the signer. | [optional] -**company_id** | **string** | The ID of the associated company. | [optional] -**reference_id** | **string** | A reference identifier for the form. | [optional] -**email** | **string** | The email address of the individual associated with the form. | [optional] **e_delivery_consented_at** | **\DateTime** | The date when e-delivery was consented. | [optional] **signature** | **string** | The signature of the form. | [optional] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] +**email** | **string** | The email address of the individual associated with the form. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W9FormBaseMinimalRequest.md b/docs/A1099/W9FormBaseMinimalRequest.md new file mode 100644 index 0000000..18b49cf --- /dev/null +++ b/docs/A1099/W9FormBaseMinimalRequest.md @@ -0,0 +1,12 @@ +# # W9FormBaseMinimalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The form type. | [optional] [readonly] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] +**email** | **string** | The email address of the individual associated with the form. | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W9FormBaseRequest.md b/docs/A1099/W9FormBaseRequest.md index e8f4066..041cbdb 100644 --- a/docs/A1099/W9FormBaseRequest.md +++ b/docs/A1099/W9FormBaseRequest.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**e_delivery_consented_at** | **\DateTime** | The date when e-delivery was consented. | [optional] +**signature** | **string** | The signature of the form. | [optional] **type** | **string** | The form type. | [optional] [readonly] -**company_id** | **string** | The ID of the associated company. | [optional] +**company_id** | **string** | The ID of the associated company. | **reference_id** | **string** | A reference identifier for the form. | [optional] **email** | **string** | The email address of the individual associated with the form. | [optional] -**e_delivery_consented_at** | **\DateTime** | The date when e-delivery was consented. | [optional] -**signature** | **string** | The signature of the form. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W9FormBaseResponse.md b/docs/A1099/W9FormBaseResponse.md index ca4501b..ec2abbb 100644 --- a/docs/A1099/W9FormBaseResponse.md +++ b/docs/A1099/W9FormBaseResponse.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | The unique identifier for the form. | [optional] -**entry_status** | **string** | The form status. | [optional] -**entry_status_date** | **\DateTime** | The timestamp for the latest status update. | [optional] +**entry_status** | [**\Avalara\SDK\Model\A1099\V2\EntryStatusResponse**](EntryStatusResponse.md) | The entry status information for the form. | [optional] **reference_id** | **string** | A reference identifier for the form. | [optional] **company_id** | **string** | The ID of the associated company. | [optional] **display_name** | **string** | The display name associated with the form. | [optional] **email** | **string** | The email address of the individual associated with the form. | [optional] **archived** | **bool** | Indicates whether the form is archived. | [optional] +**ancestor_id** | **string** | Form ID of previous version. | [optional] **signature** | **string** | The signature of the form. | [optional] **signed_date** | **\DateTime** | The date the form was signed. | [optional] **e_delivery_consented_at** | **\DateTime** | The date when e-delivery was consented. | [optional] diff --git a/docs/A1099/W9FormDataModel.md b/docs/A1099/W9FormDataModel.md index 5ecc2d9..1f0f446 100644 --- a/docs/A1099/W9FormDataModel.md +++ b/docs/A1099/W9FormDataModel.md @@ -136,7 +136,7 @@ Name | Type | Description | Notes **part19_formation_or_resolution_date** | **\DateTime** | | [optional] **part20_filing_date** | **\DateTime** | | [optional] **part21_determination_date** | **\DateTime** | | [optional] -**substantial_us_owners** | [**\AvalaraSDK\ModelA1099V2\W8BenESubstantialUsOwnerDataModel[]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] +**substantial_us_owners** | [**\Avalara\SDK\Model\A1099\V2\W8BenESubstantialUsOwnerDataModel[]**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] **birthday** | **string** | The birthday of the individual associated with the form. | [optional] **foreign_tin_not_required** | **bool** | Indicates whether a foreign TIN is not required. | [optional] **archived** | **bool** | Indicates whether the form is archived. | [optional] diff --git a/docs/A1099/W9FormMinimalRequest.md b/docs/A1099/W9FormMinimalRequest.md new file mode 100644 index 0000000..7d46d64 --- /dev/null +++ b/docs/A1099/W9FormMinimalRequest.md @@ -0,0 +1,14 @@ +# # W9FormMinimalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The form type (always \"w9\" for this model). | [optional] [readonly] +**email** | **string** | The email address of the individual associated with the form. | +**name** | **string** | The name of the individual or entity associated with the form. | +**account_number** | **string** | The account number associated with the form. | [optional] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] + +[[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W9FormRequest.md b/docs/A1099/W9FormRequest.md index f6b0d09..789bc32 100644 --- a/docs/A1099/W9FormRequest.md +++ b/docs/A1099/W9FormRequest.md @@ -23,10 +23,10 @@ Name | Type | Description | Notes **tin** | **string** | The taxpayer identification number (TIN). | [optional] **backup_withholding** | **bool** | Indicates whether backup withholding applies. | [optional] **is1099able** | **bool** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] -**company_id** | **string** | The ID of the associated company. | [optional] -**reference_id** | **string** | A reference identifier for the form. | [optional] -**email** | **string** | The email address of the individual associated with the form. | [optional] **e_delivery_consented_at** | **\DateTime** | The date when e-delivery was consented. | [optional] **signature** | **string** | The signature of the form. | [optional] +**company_id** | **string** | The ID of the associated company. | +**reference_id** | **string** | A reference identifier for the form. | [optional] +**email** | **string** | The email address of the individual associated with the form. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/A1099/W9FormResponse.md b/docs/A1099/W9FormResponse.md index ba287e9..4c8997b 100644 --- a/docs/A1099/W9FormResponse.md +++ b/docs/A1099/W9FormResponse.md @@ -22,6 +22,6 @@ Name | Type | Description | Notes **tin** | **string** | The taxpayer identification number (TIN). | [optional] **backup_withholding** | **bool** | Indicates whether backup withholding applies. | [optional] **is1099able** | **bool** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] -**tin_match_status** | [**\AvalaraSDK\ModelA1099V2\TinMatchStatusResponse**](TinMatchStatusResponse.md) | The TIN Match status from IRS. | [optional] +**tin_match_status** | [**\Avalara\SDK\Model\A1099\V2\TinMatchStatusResponse**](TinMatchStatusResponse.md) | The TIN Match status from IRS. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/BatchErrorDetail.md b/docs/EInvoicing/BatchErrorDetail.md index ee9279c..72be7d7 100644 --- a/docs/EInvoicing/BatchErrorDetail.md +++ b/docs/EInvoicing/BatchErrorDetail.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **index** | **int** | The index of the request that caused the error in the batch. | [optional] -**validation_errors** | [**\AvalaraSDK\ModelEInvoicingV1\ValidationError[]**](ValidationError.md) | | [optional] +**validation_errors** | [**\Avalara\SDK\Model\EInvoicing\V1\ValidationError[]**](ValidationError.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/BatchSearch.md b/docs/EInvoicing/BatchSearch.md index 54ca650..9dd2824 100644 --- a/docs/EInvoicing/BatchSearch.md +++ b/docs/EInvoicing/BatchSearch.md @@ -10,6 +10,6 @@ Name | Type | Description | Notes **created** | **\DateTime** | Timestamp when the batch search was created | [optional] **last_modified** | **\DateTime** | Timestamp when the batch search was created | [optional] **status** | **string** | Status of the batch search | [optional] -**error** | [**\AvalaraSDK\ModelEInvoicingV1\ErrorResponse**](ErrorResponse.md) | | [optional] +**error** | [**\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse**](ErrorResponse.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/BatchSearchListResponse.md b/docs/EInvoicing/BatchSearchListResponse.md index 9072527..7e12874 100644 --- a/docs/EInvoicing/BatchSearchListResponse.md +++ b/docs/EInvoicing/BatchSearchListResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_record_set_count** | **int** | The count of records in the result set. | [optional] **at_next_link** | **string** | Next Link | [optional] -**value** | [**\AvalaraSDK\ModelEInvoicingV1\BatchSearch[]**](BatchSearch.md) | List of batch search records. | [optional] +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\BatchSearch[]**](BatchSearch.md) | List of batch search records. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/ConditionalForField.md b/docs/EInvoicing/ConditionalForField.md index 2a6a5fe..ae9c8c8 100644 --- a/docs/EInvoicing/ConditionalForField.md +++ b/docs/EInvoicing/ConditionalForField.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **country_mandate** | **string** | | [optional] -**required_when** | [**\AvalaraSDK\ModelEInvoicingV1\RequiredWhenField[]**](RequiredWhenField.md) | Array of scenarios which describe when a particular field is conditional for a country mandate | [optional] +**required_when** | [**\Avalara\SDK\Model\EInvoicing\V1\RequiredWhenField[]**](RequiredWhenField.md) | Array of scenarios which describe when a particular field is conditional for a country mandate | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/CreateTradingPartnersBatch200Response.md b/docs/EInvoicing/CreateTradingPartnersBatch200Response.md index 68270a1..d91e49c 100644 --- a/docs/EInvoicing/CreateTradingPartnersBatch200Response.md +++ b/docs/EInvoicing/CreateTradingPartnersBatch200Response.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **string** | | [optional] **message** | **string** | A message indicating the result of the batch operation. | [optional] -**value** | [**\AvalaraSDK\ModelEInvoicingV1\CreateTradingPartnersBatch200ResponseValueInner[]**](CreateTradingPartnersBatch200ResponseValueInner.md) | A list of trading partners successfully created. | [optional] +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200ResponseValueInner[]**](CreateTradingPartnersBatch200ResponseValueInner.md) | A list of trading partners successfully created. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/CreateTradingPartnersBatchRequest.md b/docs/EInvoicing/CreateTradingPartnersBatchRequest.md index 1a8ce56..67fe64a 100644 --- a/docs/EInvoicing/CreateTradingPartnersBatchRequest.md +++ b/docs/EInvoicing/CreateTradingPartnersBatchRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | [**\AvalaraSDK\ModelEInvoicingV1\TradingPartner[]**](TradingPartner.md) | | [optional] +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\TradingPartner[]**](TradingPartner.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DataInputField.md b/docs/EInvoicing/DataInputField.md index afee3d9..edfd4ac 100644 --- a/docs/EInvoicing/DataInputField.md +++ b/docs/EInvoicing/DataInputField.md @@ -15,9 +15,9 @@ Name | Type | Description | Notes **documentation_link** | **string** | An example of the content for this field | [optional] **description** | **string** | A description of this field | [optional] **is_segment** | **bool** | Is this a segment of the schema | [optional] -**required_for** | [**\AvalaraSDK\ModelEInvoicingV1\DataInputFieldRequiredFor**](DataInputFieldRequiredFor.md) | | [optional] -**conditional_for** | [**\AvalaraSDK\ModelEInvoicingV1\ConditionalForField[]**](ConditionalForField.md) | | [optional] -**not_used_for** | [**\AvalaraSDK\ModelEInvoicingV1\DataInputFieldNotUsedFor**](DataInputFieldNotUsedFor.md) | | [optional] -**optional_for** | [**\AvalaraSDK\ModelEInvoicingV1\DataInputFieldOptionalFor**](DataInputFieldOptionalFor.md) | | [optional] +**required_for** | [**\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldRequiredFor**](DataInputFieldRequiredFor.md) | | [optional] +**conditional_for** | [**\Avalara\SDK\Model\EInvoicing\V1\ConditionalForField[]**](ConditionalForField.md) | | [optional] +**not_used_for** | [**\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldNotUsedFor**](DataInputFieldNotUsedFor.md) | | [optional] +**optional_for** | [**\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldOptionalFor**](DataInputFieldOptionalFor.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DataInputFieldsResponse.md b/docs/EInvoicing/DataInputFieldsResponse.md index dd312da..ee2b0c1 100644 --- a/docs/EInvoicing/DataInputFieldsResponse.md +++ b/docs/EInvoicing/DataInputFieldsResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_recordset_count** | **float** | Total count of results | [optional] **at_next_link** | **string** | | [optional] -**value** | [**\AvalaraSDK\ModelEInvoicingV1\DataInputField[]**](DataInputField.md) | Array of Data Input Fields | [optional] +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\DataInputField[]**](DataInputField.md) | Array of Data Input Fields | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DocumentListResponse.md b/docs/EInvoicing/DocumentListResponse.md index 4dcb2e9..d57f893 100644 --- a/docs/EInvoicing/DocumentListResponse.md +++ b/docs/EInvoicing/DocumentListResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_recordset_count** | **string** | Count of collections for the given date range | [optional] **at_next_link** | **string** | | [optional] -**value** | [**\AvalaraSDK\ModelEInvoicingV1\DocumentSummary[]**](DocumentSummary.md) | Array of documents matching query parameters | +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\DocumentSummary[]**](DocumentSummary.md) | Array of documents matching query parameters | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/DocumentStatusResponse.md b/docs/EInvoicing/DocumentStatusResponse.md index 7260604..d5733c3 100644 --- a/docs/EInvoicing/DocumentStatusResponse.md +++ b/docs/EInvoicing/DocumentStatusResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | The unique ID for this document | [optional] **status** | **string** | Status of the document | [optional] -**events** | [**\AvalaraSDK\ModelEInvoicingV1\StatusEvent[]**](StatusEvent.md) | | [optional] +**events** | [**\Avalara\SDK\Model\EInvoicing\V1\StatusEvent[]**](StatusEvent.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/EventMessage.md b/docs/EInvoicing/EventMessage.md index 4b3b459..ed65681 100644 --- a/docs/EInvoicing/EventMessage.md +++ b/docs/EInvoicing/EventMessage.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **message** | **object** | Event-specific information | -**signature** | [**\AvalaraSDK\ModelEInvoicingV1\SignatureValueSignature**](SignatureValueSignature.md) | | +**signature** | [**\Avalara\SDK\Model\EInvoicing\V1\SignatureValueSignature**](SignatureValueSignature.md) | | **tenant_id** | **string** | Tenant ID of the event | **correlation_id** | **string** | The correlation ID used by Avalara to aid in tracing through to provenance of this event massage. | [optional] **system_code** | **string** | The Avalara registered code for the system. See <a href=\"https://avalara.atlassian.net/wiki/spaces/AIM/pages/637250338966/Taxonomy+Avalara+Systems\">Taxonomy&#58; Avalara Systems</a> | diff --git a/docs/EInvoicing/EventPayload.md b/docs/EInvoicing/EventPayload.md index 09e5235..88e72b2 100644 --- a/docs/EInvoicing/EventPayload.md +++ b/docs/EInvoicing/EventPayload.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**signature** | [**\AvalaraSDK\ModelEInvoicingV1\SignatureValueSignature**](SignatureValueSignature.md) | | +**signature** | [**\Avalara\SDK\Model\EInvoicing\V1\SignatureValueSignature**](SignatureValueSignature.md) | | **message** | **object** | Event-specific information | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/FetchDocumentsRequest.md b/docs/EInvoicing/FetchDocumentsRequest.md index 5572d8e..a08fd4a 100644 --- a/docs/EInvoicing/FetchDocumentsRequest.md +++ b/docs/EInvoicing/FetchDocumentsRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\AvalaraSDK\ModelEInvoicingV1\FetchDocumentsRequestDataInner[]**](FetchDocumentsRequestDataInner.md) | Array of key-value pairs used to retrieve inbound documents from the Tax Authority | [optional] -**metadata** | [**\AvalaraSDK\ModelEInvoicingV1\FetchDocumentsRequestMetadata**](FetchDocumentsRequestMetadata.md) | | [optional] +**data** | [**\Avalara\SDK\Model\EInvoicing\V1\FetchDocumentsRequestDataInner[]**](FetchDocumentsRequestDataInner.md) | Array of key-value pairs used to retrieve inbound documents from the Tax Authority | [optional] +**metadata** | [**\Avalara\SDK\Model\EInvoicing\V1\FetchDocumentsRequestMetadata**](FetchDocumentsRequestMetadata.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/Mandate.md b/docs/EInvoicing/Mandate.md index 0aa8417..e3f5f1e 100644 --- a/docs/EInvoicing/Mandate.md +++ b/docs/EInvoicing/Mandate.md @@ -14,8 +14,8 @@ Name | Type | Description | Notes **e_invoicing_flow_documentation_link** | **string** | Link to the documentation for this mandate's e-invoicing flow | [optional] **get_invoice_available_media_type** | **string[]** | List of available media types for downloading invoices for this mandate | [optional] **supports_inbound_digital_document** | **string** | Indicates whether this mandate supports inbound digital documents | [optional] -**input_data_formats** | [**\AvalaraSDK\ModelEInvoicingV1\InputDataFormats[]**](InputDataFormats.md) | Format and version used when inputting the data | [optional] -**output_data_formats** | [**\AvalaraSDK\ModelEInvoicingV1\OutputDataFormats[]**](OutputDataFormats.md) | Lists the supported output document formats for the country mandate. For countries where specifying an output document format is required (e.g., France), this array will contain the applicable formats. For other countries where output format selection is not necessary, the array will be empty. | [optional] -**workflow_ids** | [**\AvalaraSDK\ModelEInvoicingV1\WorkflowIds[]**](WorkflowIds.md) | Workflow ID list | [optional] +**input_data_formats** | [**\Avalara\SDK\Model\EInvoicing\V1\InputDataFormats[]**](InputDataFormats.md) | Format and version used when inputting the data | [optional] +**output_data_formats** | [**\Avalara\SDK\Model\EInvoicing\V1\OutputDataFormats[]**](OutputDataFormats.md) | Lists the supported output document formats for the country mandate. For countries where specifying an output document format is required (e.g., France), this array will contain the applicable formats. For other countries where output format selection is not necessary, the array will be empty. | [optional] +**workflow_ids** | [**\Avalara\SDK\Model\EInvoicing\V1\WorkflowIds[]**](WorkflowIds.md) | Workflow ID list | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/MandateDataInputField.md b/docs/EInvoicing/MandateDataInputField.md index 19b7a0e..785dd49 100644 --- a/docs/EInvoicing/MandateDataInputField.md +++ b/docs/EInvoicing/MandateDataInputField.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **path** | **string** | Path to this field | [optional] **path_type** | **string** | The type of path | [optional] **field_name** | **string** | Field name | [optional] -**namespace** | [**\AvalaraSDK\ModelEInvoicingV1\MandateDataInputFieldNamespace**](MandateDataInputFieldNamespace.md) | | [optional] +**namespace** | [**\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputFieldNamespace**](MandateDataInputFieldNamespace.md) | | [optional] **example_or_fixed_value** | **string** | An example of the content for this field | [optional] **accepted_values** | **string[]** | An Array representing the acceptable values for this field | [optional] **documentation_link** | **string** | An example of the content for this field | [optional] diff --git a/docs/EInvoicing/MandatesResponse.md b/docs/EInvoicing/MandatesResponse.md index 963e3cb..829ada0 100644 --- a/docs/EInvoicing/MandatesResponse.md +++ b/docs/EInvoicing/MandatesResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_recordset_count** | **float** | Total count of results | [optional] **at_next_link** | **string** | | [optional] -**value** | [**\AvalaraSDK\ModelEInvoicingV1\Mandate[]**](Mandate.md) | Mandates schema | [optional] +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\Mandate[]**](Mandate.md) | Mandates schema | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/SearchParticipants200Response.md b/docs/EInvoicing/SearchParticipants200Response.md index 8a68223..03b245b 100644 --- a/docs/EInvoicing/SearchParticipants200Response.md +++ b/docs/EInvoicing/SearchParticipants200Response.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **at_record_set_count** | **int** | The count of records in the result set. | [optional] **at_next_link** | **string** | The next page link to get the next set of results. | [optional] -**value** | [**\AvalaraSDK\ModelEInvoicingV1\TradingPartner[]**](TradingPartner.md) | | [optional] +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\TradingPartner[]**](TradingPartner.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/Signature.md b/docs/EInvoicing/Signature.md index ec5dff7..68320fb 100644 --- a/docs/EInvoicing/Signature.md +++ b/docs/EInvoicing/Signature.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**signature** | [**\AvalaraSDK\ModelEInvoicingV1\SignatureSignature**](SignatureSignature.md) | | +**signature** | [**\Avalara\SDK\Model\EInvoicing\V1\SignatureSignature**](SignatureSignature.md) | | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/SignatureValue.md b/docs/EInvoicing/SignatureValue.md index 587dbb5..e8929a0 100644 --- a/docs/EInvoicing/SignatureValue.md +++ b/docs/EInvoicing/SignatureValue.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**signature** | [**\AvalaraSDK\ModelEInvoicingV1\SignatureValueSignature**](SignatureValueSignature.md) | | +**signature** | [**\Avalara\SDK\Model\EInvoicing\V1\SignatureValueSignature**](SignatureValueSignature.md) | | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/SubscriptionDetail.md b/docs/EInvoicing/SubscriptionDetail.md index c488b99..c7ebb7e 100644 --- a/docs/EInvoicing/SubscriptionDetail.md +++ b/docs/EInvoicing/SubscriptionDetail.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **id** | **string** | Unique identifier of this specific resource. | **description** | **string** | Description of the subscription | [optional] **notification_url** | **string** | The URL of the webhook endpoint to which event messages will be delivered | -**signature** | [**\AvalaraSDK\ModelEInvoicingV1\SignatureSignature**](SignatureSignature.md) | | -**events** | [**\AvalaraSDK\ModelEInvoicingV1\EventSubscription[]**](EventSubscription.md) | | +**signature** | [**\Avalara\SDK\Model\EInvoicing\V1\SignatureSignature**](SignatureSignature.md) | | +**events** | [**\Avalara\SDK\Model\EInvoicing\V1\EventSubscription[]**](EventSubscription.md) | | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/SubscriptionListResponse.md b/docs/EInvoicing/SubscriptionListResponse.md index e762543..cd5011a 100644 --- a/docs/EInvoicing/SubscriptionListResponse.md +++ b/docs/EInvoicing/SubscriptionListResponse.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **recordset_count** | **int** | The total count of records in the dataset. | [optional] **at_next_link** | **string** | The URL to the next page of results. | [optional] -**value** | [**\AvalaraSDK\ModelEInvoicingV1\SubscriptionDetail[]**](SubscriptionDetail.md) | The list of subscriptions. | [optional] +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\SubscriptionDetail[]**](SubscriptionDetail.md) | The list of subscriptions. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/SubscriptionRegistration.md b/docs/EInvoicing/SubscriptionRegistration.md index efc9964..9b96ce9 100644 --- a/docs/EInvoicing/SubscriptionRegistration.md +++ b/docs/EInvoicing/SubscriptionRegistration.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **string** | Description of the subscription | [optional] **notification_url** | **string** | The URL of the webhook endpoint to which event messages will be delivered | -**signature** | [**\AvalaraSDK\ModelEInvoicingV1\SignatureSignature**](SignatureSignature.md) | | -**events** | [**\AvalaraSDK\ModelEInvoicingV1\EventSubscription[]**](EventSubscription.md) | | +**signature** | [**\Avalara\SDK\Model\EInvoicing\V1\SignatureSignature**](SignatureSignature.md) | | +**events** | [**\Avalara\SDK\Model\EInvoicing\V1\EventSubscription[]**](EventSubscription.md) | | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/SupportedDocumentTypes.md b/docs/EInvoicing/SupportedDocumentTypes.md index d5cb0e3..a58d154 100644 --- a/docs/EInvoicing/SupportedDocumentTypes.md +++ b/docs/EInvoicing/SupportedDocumentTypes.md @@ -8,6 +8,6 @@ Name | Type | Description | Notes **value** | **string** | Document type value. | **supported_by_trading_partner** | **bool** | Does trading partner support receiving this document type. | **supported_by_avalara** | **bool** | Does avalara support exchanging this document type. | [optional] -**extensions** | [**\AvalaraSDK\ModelEInvoicingV1\Extension[]**](Extension.md) | Optional array used to carry additional metadata or configuration values that may be required by specific document types. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error. | [optional] +**extensions** | [**\Avalara\SDK\Model\EInvoicing\V1\Extension[]**](Extension.md) | Optional array used to carry additional metadata or configuration values that may be required by specific document types. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/TaxIdentifierResponse.md b/docs/EInvoicing/TaxIdentifierResponse.md index 9a0a60e..91a3611 100644 --- a/docs/EInvoicing/TaxIdentifierResponse.md +++ b/docs/EInvoicing/TaxIdentifierResponse.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **country_code** | **string** | The two-letter ISO-3166 country code of the tax identifier. | -**value** | [**\AvalaraSDK\ModelEInvoicingV1\TaxIdentifierResponseValue**](TaxIdentifierResponseValue.md) | | [optional] +**value** | [**\Avalara\SDK\Model\EInvoicing\V1\TaxIdentifierResponseValue**](TaxIdentifierResponseValue.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/TradingPartner.md b/docs/EInvoicing/TradingPartner.md index e992187..fbd0d8a 100644 --- a/docs/EInvoicing/TradingPartner.md +++ b/docs/EInvoicing/TradingPartner.md @@ -8,10 +8,10 @@ Name | Type | Description | Notes **name** | **string** | Name of the participant (typically, the name of the business entity). | **network** | **string** | The network where the participant is present. When creating or updating a trading partner, the value provided for the attribute 'network' will be ignored. | [optional] [readonly] **registration_date** | **string** | Registration date of the participant if available. | [optional] -**identifiers** | [**\AvalaraSDK\ModelEInvoicingV1\Identifier[]**](Identifier.md) | A list of identifiers associated with the trading partner. Each identifier should consistently include the fields name, and value to maintain clarity and ensure consistent structure across entries. When creating or updating a trading partner, the attribute 'name' must be agreed upon with Avalara to ensure consistency. Failing to adhere to the agreed values will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attribute 'displayName' will be ignored and instead retrieved from the standard set of display names maintained. | -**addresses** | [**\AvalaraSDK\ModelEInvoicingV1\Address[]**](Address.md) | | -**supported_document_types** | [**\AvalaraSDK\ModelEInvoicingV1\SupportedDocumentTypes[]**](SupportedDocumentTypes.md) | A list of document types supported by the trading partner for exchange. Each document type identifier value must match the standard list maintained by Avalara, which includes Peppol and other public network document type identifier schemes and values, as well as any approved partner-specific identifiers. The 'value' field must exactly match an entry from the provided document identifier list. Any attempt to submit unsupported document types will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attributes 'name' and 'supportedByAvalara' will be ignored. | -**consents** | [**\AvalaraSDK\ModelEInvoicingV1\Consents**](Consents.md) | | [optional] -**extensions** | [**\AvalaraSDK\ModelEInvoicingV1\Extension[]**](Extension.md) | Optional array used to carry additional metadata or configuration values that may be required by specific networks. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error. | [optional] +**identifiers** | [**\Avalara\SDK\Model\EInvoicing\V1\Identifier[]**](Identifier.md) | A list of identifiers associated with the trading partner. Each identifier should consistently include the fields name, and value to maintain clarity and ensure consistent structure across entries. When creating or updating a trading partner, the attribute 'name' must be agreed upon with Avalara to ensure consistency. Failing to adhere to the agreed values will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attribute 'displayName' will be ignored and instead retrieved from the standard set of display names maintained. | +**addresses** | [**\Avalara\SDK\Model\EInvoicing\V1\Address[]**](Address.md) | | +**supported_document_types** | [**\Avalara\SDK\Model\EInvoicing\V1\SupportedDocumentTypes[]**](SupportedDocumentTypes.md) | A list of document types supported by the trading partner for exchange. Each document type identifier value must match the standard list maintained by Avalara, which includes Peppol and other public network document type identifier schemes and values, as well as any approved partner-specific identifiers. The 'value' field must exactly match an entry from the provided document identifier list. Any attempt to submit unsupported document types will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attributes 'name' and 'supportedByAvalara' will be ignored. | +**consents** | [**\Avalara\SDK\Model\EInvoicing\V1\Consents**](Consents.md) | | [optional] +**extensions** | [**\Avalara\SDK\Model\EInvoicing\V1\Extension[]**](Extension.md) | Optional array used to carry additional metadata or configuration values that may be required by specific networks. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error. | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/V1/DataInputFieldsApi.md b/docs/EInvoicing/V1/DataInputFieldsApi.md index 9a1fbf8..9ef0234 100644 --- a/docs/EInvoicing/V1/DataInputFieldsApi.md +++ b/docs/EInvoicing/V1/DataInputFieldsApi.md @@ -1,4 +1,4 @@ -# AvalaraSDK\DataInputFieldsApi +# Avalara\SDK\DataInputFieldsApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. @@ -10,7 +10,7 @@ Method | HTTP request | Description ## `getDataInputFields()` ```php -getDataInputFields($avalara_version, $x_avalara_client, $filter, $top, $skip, $count, $count_only): \AvalaraSDK\ModelEInvoicingV1\DataInputFieldsResponse +getDataInputFields($avalara_version, $x_avalara_client, $filter, $top, $skip, $count, $count_only): \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse ``` Returns the optionality of document fields for different country mandates @@ -33,7 +33,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\DataInputFieldsApi($client); +$apiInstance = new Avalara\SDK\Api\DataInputFieldsApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. @@ -65,7 +65,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\DataInputFieldsResponse**](../Model/DataInputFieldsResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse**](../Model/DataInputFieldsResponse.md) ### Authorization diff --git a/docs/EInvoicing/V1/DocumentsApi.md b/docs/EInvoicing/V1/DocumentsApi.md index 55863b1..c022276 100644 --- a/docs/EInvoicing/V1/DocumentsApi.md +++ b/docs/EInvoicing/V1/DocumentsApi.md @@ -1,4 +1,4 @@ -# AvalaraSDK\DocumentsApi +# Avalara\SDK\DocumentsApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. @@ -37,7 +37,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used $accept = application/pdf; // string | This header indicates the MIME type of the document @@ -81,7 +81,7 @@ Name | Type | Description | Notes ## `fetchDocuments()` ```php -fetchDocuments($avalara_version, $fetch_documents_request, $x_avalara_client): \AvalaraSDK\ModelEInvoicingV1\DocumentFetch +fetchDocuments($avalara_version, $fetch_documents_request, $x_avalara_client): \Avalara\SDK\Model\EInvoicing\V1\DocumentFetch ``` Fetch the inbound document from a tax authority @@ -104,10 +104,10 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used -$fetch_documents_request = new \AvalaraSDK\ModelEInvoicingV1\FetchDocumentsRequest(); // \AvalaraSDK\ModelEInvoicingV1\FetchDocumentsRequest +$fetch_documents_request = new \Avalara\SDK\Model\EInvoicing\V1\FetchDocumentsRequest(); // \Avalara\SDK\Model\EInvoicing\V1\FetchDocumentsRequest $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. try { @@ -123,12 +123,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **fetch_documents_request** | [**\AvalaraSDK\ModelEInvoicingV1\FetchDocumentsRequest**](../Model/FetchDocumentsRequest.md)| | + **fetch_documents_request** | [**\Avalara\SDK\Model\EInvoicing\V1\FetchDocumentsRequest**](../Model/FetchDocumentsRequest.md)| | **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\DocumentFetch**](../Model/DocumentFetch.md) +[**\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch**](../Model/DocumentFetch.md) ### Authorization @@ -146,7 +146,7 @@ Name | Type | Description | Notes ## `getDocumentList()` ```php -getDocumentList($avalara_version, $x_avalara_client, $start_date, $end_date, $flow, $count, $count_only, $filter, $top, $skip): \AvalaraSDK\ModelEInvoicingV1\DocumentListResponse +getDocumentList($avalara_version, $x_avalara_client, $start_date, $end_date, $flow, $count, $count_only, $filter, $top, $skip): \Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse ``` Returns a summary of documents for a date range @@ -169,7 +169,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. @@ -207,7 +207,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\DocumentListResponse**](../Model/DocumentListResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse**](../Model/DocumentListResponse.md) ### Authorization @@ -225,7 +225,7 @@ Name | Type | Description | Notes ## `getDocumentStatus()` ```php -getDocumentStatus($avalara_version, $document_id, $x_avalara_client): \AvalaraSDK\ModelEInvoicingV1\DocumentStatusResponse +getDocumentStatus($avalara_version, $document_id, $x_avalara_client): \Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse ``` Checks the status of a document @@ -248,7 +248,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used $document_id = 'document_id_example'; // string | The unique ID for this document that was returned in the POST /einvoicing/documents response body @@ -272,7 +272,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\DocumentStatusResponse**](../Model/DocumentStatusResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse**](../Model/DocumentStatusResponse.md) ### Authorization @@ -290,7 +290,7 @@ Name | Type | Description | Notes ## `submitDocument()` ```php -submitDocument($avalara_version, $metadata, $data, $x_avalara_client): \AvalaraSDK\ModelEInvoicingV1\DocumentSubmitResponse +submitDocument($avalara_version, $metadata, $data, $x_avalara_client): \Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse ``` Submits a document to Avalara E-Invoicing API @@ -313,10 +313,10 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\DocumentsApi($client); +$apiInstance = new Avalara\SDK\Api\DocumentsApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used -$metadata = new \AvalaraSDK\ModelEInvoicingV1\SubmitDocumentMetadata(); // \AvalaraSDK\ModelEInvoicingV1\SubmitDocumentMetadata +$metadata = new \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata(); // \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata $data = array('key' => new \stdClass); // object | The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. @@ -333,13 +333,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used | - **metadata** | [**\AvalaraSDK\ModelEInvoicingV1\SubmitDocumentMetadata**](../Model/SubmitDocumentMetadata.md)| | + **metadata** | [**\Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata**](../Model/SubmitDocumentMetadata.md)| | **data** | [**object**](../Model/object.md)| The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' | **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\DocumentSubmitResponse**](../Model/DocumentSubmitResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse**](../Model/DocumentSubmitResponse.md) ### Authorization diff --git a/docs/EInvoicing/V1/InteropApi.md b/docs/EInvoicing/V1/InteropApi.md index 04467b2..07ab7d6 100644 --- a/docs/EInvoicing/V1/InteropApi.md +++ b/docs/EInvoicing/V1/InteropApi.md @@ -1,4 +1,4 @@ -# AvalaraSDK\InteropApi +# Avalara\SDK\InteropApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. @@ -10,7 +10,7 @@ Method | HTTP request | Description ## `submitInteropDocument()` ```php -submitInteropDocument($document_type, $interchange_type, $avalara_version, $x_avalara_client, $x_correlation_id, $file_name): \AvalaraSDK\ModelEInvoicingV1\SubmitInteropDocument202Response +submitInteropDocument($document_type, $interchange_type, $avalara_version, $x_avalara_client, $x_correlation_id, $file_name): \Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response ``` Submit a document @@ -33,7 +33,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\InteropApi($client); +$apiInstance = new Avalara\SDK\Api\InteropApi($client); $document_type = 'document_type_example'; // string | Type of the document being uploaded. Partners will be configured in Avalara system to send only certain types of documents. $interchange_type = 'interchange_type_example'; // string | Type of interchange (codes in Avalara system that uniquely identifies a type of interchange). Partners will be configured in Avalara system to send documents belonging to certain types of interchanges. @@ -63,7 +63,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\SubmitInteropDocument202Response**](../Model/SubmitInteropDocument202Response.md) +[**\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response**](../Model/SubmitInteropDocument202Response.md) ### Authorization diff --git a/docs/EInvoicing/V1/MandatesApi.md b/docs/EInvoicing/V1/MandatesApi.md index 18bee5b..d1ef72f 100644 --- a/docs/EInvoicing/V1/MandatesApi.md +++ b/docs/EInvoicing/V1/MandatesApi.md @@ -1,4 +1,4 @@ -# AvalaraSDK\MandatesApi +# Avalara\SDK\MandatesApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. @@ -11,7 +11,7 @@ Method | HTTP request | Description ## `getMandateDataInputFields()` ```php -getMandateDataInputFields($avalara_version, $mandate_id, $document_type, $document_version, $x_avalara_client): \AvalaraSDK\ModelEInvoicingV1\MandateDataInputField[] +getMandateDataInputFields($avalara_version, $mandate_id, $document_type, $document_version, $x_avalara_client): \Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[] ``` Returns document field information for a country mandate, a selected document type, and its version @@ -34,7 +34,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\MandatesApi($client); +$apiInstance = new Avalara\SDK\Api\MandatesApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used $mandate_id = AD-B2G-PEPPOL; // string | The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body @@ -62,7 +62,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\MandateDataInputField[]**](../Model/MandateDataInputField.md) +[**\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]**](../Model/MandateDataInputField.md) ### Authorization @@ -80,7 +80,7 @@ Name | Type | Description | Notes ## `getMandates()` ```php -getMandates($avalara_version, $x_avalara_client, $filter, $top, $skip, $count, $count_only): \AvalaraSDK\ModelEInvoicingV1\MandatesResponse +getMandates($avalara_version, $x_avalara_client, $filter, $top, $skip, $count, $count_only): \Avalara\SDK\Model\EInvoicing\V1\MandatesResponse ``` List country mandates that are supported by the Avalara E-Invoicing platform @@ -103,7 +103,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\MandatesApi($client); +$apiInstance = new Avalara\SDK\Api\MandatesApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. @@ -135,7 +135,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\MandatesResponse**](../Model/MandatesResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse**](../Model/MandatesResponse.md) ### Authorization diff --git a/docs/EInvoicing/V1/SubscriptionsApi.md b/docs/EInvoicing/V1/SubscriptionsApi.md index 8e180a4..c985435 100644 --- a/docs/EInvoicing/V1/SubscriptionsApi.md +++ b/docs/EInvoicing/V1/SubscriptionsApi.md @@ -1,4 +1,4 @@ -# AvalaraSDK\SubscriptionsApi +# Avalara\SDK\SubscriptionsApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. @@ -13,7 +13,7 @@ Method | HTTP request | Description ## `createWebhookSubscription()` ```php -createWebhookSubscription($avalara_version, $subscription_registration, $x_correlation_id, $x_avalara_client): \AvalaraSDK\ModelEInvoicingV1\SuccessResponse +createWebhookSubscription($avalara_version, $subscription_registration, $x_correlation_id, $x_avalara_client): \Avalara\SDK\Model\EInvoicing\V1\SuccessResponse ``` Create a subscription to events @@ -36,10 +36,10 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\SubscriptionsApi($client); +$apiInstance = new Avalara\SDK\Api\SubscriptionsApi($client); $avalara_version = 'avalara_version_example'; // string | The version of the API to use, e.g., \"1.4\". -$subscription_registration = new \AvalaraSDK\ModelEInvoicingV1\SubscriptionRegistration(); // \AvalaraSDK\ModelEInvoicingV1\SubscriptionRegistration +$subscription_registration = new \Avalara\SDK\Model\EInvoicing\V1\SubscriptionRegistration(); // \Avalara\SDK\Model\EInvoicing\V1\SubscriptionRegistration $x_correlation_id = 'x_correlation_id_example'; // string | A unique identifier for tracking the request and its response $x_avalara_client = 'x_avalara_client_example'; // string | Client application identification @@ -56,13 +56,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The version of the API to use, e.g., \"1.4\". | - **subscription_registration** | [**\AvalaraSDK\ModelEInvoicingV1\SubscriptionRegistration**](../Model/SubscriptionRegistration.md)| | + **subscription_registration** | [**\Avalara\SDK\Model\EInvoicing\V1\SubscriptionRegistration**](../Model/SubscriptionRegistration.md)| | **x_correlation_id** | **string**| A unique identifier for tracking the request and its response | [optional] **x_avalara_client** | **string**| Client application identification | [optional] ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\SuccessResponse**](../Model/SuccessResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\SuccessResponse**](../Model/SuccessResponse.md) ### Authorization @@ -103,7 +103,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\SubscriptionsApi($client); +$apiInstance = new Avalara\SDK\Api\SubscriptionsApi($client); $subscription_id = 'subscription_id_example'; // string $avalara_version = 'avalara_version_example'; // string | The version of the API to use, e.g., \"1.4\". @@ -146,7 +146,7 @@ void (empty response body) ## `getWebhookSubscription()` ```php -getWebhookSubscription($subscription_id, $avalara_version, $x_correlation_id, $x_avalara_client): \AvalaraSDK\ModelEInvoicingV1\SubscriptionDetail +getWebhookSubscription($subscription_id, $avalara_version, $x_correlation_id, $x_avalara_client): \Avalara\SDK\Model\EInvoicing\V1\SubscriptionDetail ``` Get details of a subscription @@ -169,7 +169,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\SubscriptionsApi($client); +$apiInstance = new Avalara\SDK\Api\SubscriptionsApi($client); $subscription_id = 'subscription_id_example'; // string $avalara_version = 'avalara_version_example'; // string | The version of the API to use, e.g., \"1.4\". @@ -195,7 +195,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\SubscriptionDetail**](../Model/SubscriptionDetail.md) +[**\Avalara\SDK\Model\EInvoicing\V1\SubscriptionDetail**](../Model/SubscriptionDetail.md) ### Authorization @@ -213,7 +213,7 @@ Name | Type | Description | Notes ## `listWebhookSubscriptions()` ```php -listWebhookSubscriptions($avalara_version, $x_correlation_id, $x_avalara_client, $top, $skip, $count, $count_only): \AvalaraSDK\ModelEInvoicingV1\SubscriptionListResponse +listWebhookSubscriptions($avalara_version, $x_correlation_id, $x_avalara_client, $top, $skip, $count, $count_only): \Avalara\SDK\Model\EInvoicing\V1\SubscriptionListResponse ``` List all subscriptions @@ -236,7 +236,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\SubscriptionsApi($client); +$apiInstance = new Avalara\SDK\Api\SubscriptionsApi($client); $avalara_version = 'avalara_version_example'; // string | The version of the API to use, e.g., \"1.4\". $x_correlation_id = 'x_correlation_id_example'; // string | A unique identifier for tracking the request and its response @@ -268,7 +268,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\SubscriptionListResponse**](../Model/SubscriptionListResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\SubscriptionListResponse**](../Model/SubscriptionListResponse.md) ### Authorization diff --git a/docs/EInvoicing/V1/TaxIdentifiersApi.md b/docs/EInvoicing/V1/TaxIdentifiersApi.md index b8ce521..21e3783 100644 --- a/docs/EInvoicing/V1/TaxIdentifiersApi.md +++ b/docs/EInvoicing/V1/TaxIdentifiersApi.md @@ -1,4 +1,4 @@ -# AvalaraSDK\TaxIdentifiersApi +# Avalara\SDK\TaxIdentifiersApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. @@ -11,7 +11,7 @@ Method | HTTP request | Description ## `taxIdentifierSchemaByCountry()` ```php -taxIdentifierSchemaByCountry($avalara_version, $country_code, $x_avalara_client, $x_correlation_id, $type): \AvalaraSDK\ModelEInvoicingV1\TaxIdentifierSchemaByCountry200Response +taxIdentifierSchemaByCountry($avalara_version, $country_code, $x_avalara_client, $x_correlation_id, $type): \Avalara\SDK\Model\EInvoicing\V1\TaxIdentifierSchemaByCountry200Response ``` Returns the tax identifier request & response schema for a specific country. @@ -34,7 +34,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\TaxIdentifiersApi($client); +$apiInstance = new Avalara\SDK\Api\TaxIdentifiersApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used. $country_code = DE; // string | The two-letter ISO-3166 country code for which the schema should be retrieved. @@ -62,7 +62,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\TaxIdentifierSchemaByCountry200Response**](../Model/TaxIdentifierSchemaByCountry200Response.md) +[**\Avalara\SDK\Model\EInvoicing\V1\TaxIdentifierSchemaByCountry200Response**](../Model/TaxIdentifierSchemaByCountry200Response.md) ### Authorization @@ -80,7 +80,7 @@ Name | Type | Description | Notes ## `validateTaxIdentifier()` ```php -validateTaxIdentifier($avalara_version, $tax_identifier_request, $x_avalara_client, $x_correlation_id): \AvalaraSDK\ModelEInvoicingV1\TaxIdentifierResponse +validateTaxIdentifier($avalara_version, $tax_identifier_request, $x_avalara_client, $x_correlation_id): \Avalara\SDK\Model\EInvoicing\V1\TaxIdentifierResponse ``` Validates a tax identifier. @@ -103,10 +103,10 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\TaxIdentifiersApi($client); +$apiInstance = new Avalara\SDK\Api\TaxIdentifiersApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used. -$tax_identifier_request = {"countryCode":"DE","identifierType":"vat","identifier":"123456789"}; // \AvalaraSDK\ModelEInvoicingV1\TaxIdentifierRequest +$tax_identifier_request = {"countryCode":"DE","identifierType":"vat","identifier":"123456789"}; // \Avalara\SDK\Model\EInvoicing\V1\TaxIdentifierRequest $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". $x_correlation_id = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. @@ -123,13 +123,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used. | - **tax_identifier_request** | [**\AvalaraSDK\ModelEInvoicingV1\TaxIdentifierRequest**](../Model/TaxIdentifierRequest.md)| | + **tax_identifier_request** | [**\Avalara\SDK\Model\EInvoicing\V1\TaxIdentifierRequest**](../Model/TaxIdentifierRequest.md)| | **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] **x_correlation_id** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\TaxIdentifierResponse**](../Model/TaxIdentifierResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\TaxIdentifierResponse**](../Model/TaxIdentifierResponse.md) ### Authorization diff --git a/docs/EInvoicing/V1/TradingPartnersApi.md b/docs/EInvoicing/V1/TradingPartnersApi.md index 2f1a405..5ed4db3 100644 --- a/docs/EInvoicing/V1/TradingPartnersApi.md +++ b/docs/EInvoicing/V1/TradingPartnersApi.md @@ -1,4 +1,4 @@ -# AvalaraSDK\TradingPartnersApi +# Avalara\SDK\TradingPartnersApi All URIs are relative to https://api.sbx.avalara.com/einvoicing. @@ -18,7 +18,7 @@ Method | HTTP request | Description ## `batchSearchParticipants()` ```php -batchSearchParticipants($avalara_version, $name, $notification_email, $file, $x_avalara_client, $x_correlation_id): \AvalaraSDK\ModelEInvoicingV1\BatchSearchParticipants202Response +batchSearchParticipants($avalara_version, $name, $notification_email, $file, $x_avalara_client, $x_correlation_id): \Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response ``` Handles batch search requests by uploading a file containing search parameters. @@ -41,7 +41,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used. $name = Automotive Companies in London Search; // string | A human-readable name for the batch search. @@ -71,7 +71,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\BatchSearchParticipants202Response**](../Model/BatchSearchParticipants202Response.md) +[**\Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response**](../Model/BatchSearchParticipants202Response.md) ### Authorization @@ -89,7 +89,7 @@ Name | Type | Description | Notes ## `createTradingPartner()` ```php -createTradingPartner($avalara_version, $trading_partner, $x_avalara_client, $x_correlation_id): \AvalaraSDK\ModelEInvoicingV1\CreateTradingPartner201Response +createTradingPartner($avalara_version, $trading_partner, $x_avalara_client, $x_correlation_id): \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response ``` Creates a new trading partner. @@ -112,10 +112,10 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used. -$trading_partner = {"name":"Pineapple Labs ltd","network":"","registrationDate":"2024-01-01T00:00:00.000Z","identifiers":[{"name":"urn:avalara:systems:des:directory:participant:identifiers:peppolparticipantid","displayName":"","value":"9930:de112233445"}],"addresses":[{"line1":"Line 1","line2":"Line 2","city":"Brisbane","state":"Queensland","country":"Australia","postalCode":"4000"}],"supportedDocumentTypes":[{"name":"","value":"busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1","supportedByTradingPartner":true,"supportedByAvalara":true,"extensions":[]}],"consents":{"listInAvalaraDirectory":true},"extensions":[]}; // \AvalaraSDK\ModelEInvoicingV1\TradingPartner +$trading_partner = {"name":"Pineapple Labs ltd","network":"","registrationDate":"2024-01-01T00:00:00.000Z","identifiers":[{"name":"urn:avalara:systems:des:directory:participant:identifiers:peppolparticipantid","displayName":"","value":"9930:de112233445"}],"addresses":[{"line1":"Line 1","line2":"Line 2","city":"Brisbane","state":"Queensland","country":"Australia","postalCode":"4000"}],"supportedDocumentTypes":[{"name":"","value":"busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1","supportedByTradingPartner":true,"supportedByAvalara":true,"extensions":[]}],"consents":{"listInAvalaraDirectory":true},"extensions":[]}; // \Avalara\SDK\Model\EInvoicing\V1\TradingPartner $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". $x_correlation_id = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. @@ -132,13 +132,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used. | - **trading_partner** | [**\AvalaraSDK\ModelEInvoicingV1\TradingPartner**](../Model/TradingPartner.md)| | + **trading_partner** | [**\Avalara\SDK\Model\EInvoicing\V1\TradingPartner**](../Model/TradingPartner.md)| | **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] **x_correlation_id** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\CreateTradingPartner201Response**](../Model/CreateTradingPartner201Response.md) +[**\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response**](../Model/CreateTradingPartner201Response.md) ### Authorization @@ -156,7 +156,7 @@ Name | Type | Description | Notes ## `createTradingPartnersBatch()` ```php -createTradingPartnersBatch($avalara_version, $create_trading_partners_batch_request, $x_avalara_client, $x_correlation_id): \AvalaraSDK\ModelEInvoicingV1\CreateTradingPartnersBatch200Response +createTradingPartnersBatch($avalara_version, $create_trading_partners_batch_request, $x_avalara_client, $x_correlation_id): \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response ``` Creates a batch of multiple trading partners. @@ -179,10 +179,10 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used. -$create_trading_partners_batch_request = {"value":[{"name":"Pineapple Labs ltd","network":"","registrationDate":"2024-01-01T00:00:00.000Z","identifiers":[{"name":"urn:avalara:systems:des:directory:participant:identifiers:peppolparticipantid","displayName":"","value":"9930:de112233445"}],"addresses":[{"line1":"Line 1","line2":"Line 2","city":"Brisbane","state":"Queensland","country":"Australia","postalCode":"4000"}],"supportedDocumentTypes":[{"name":"","value":"busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1","supportedByTradingPartner":true,"supportedByAvalara":true,"extensions":[]}],"consents":{"listInAvalaraDirectory":true},"extensions":[]}]}; // \AvalaraSDK\ModelEInvoicingV1\CreateTradingPartnersBatchRequest +$create_trading_partners_batch_request = {"value":[{"name":"Pineapple Labs ltd","network":"","registrationDate":"2024-01-01T00:00:00.000Z","identifiers":[{"name":"urn:avalara:systems:des:directory:participant:identifiers:peppolparticipantid","displayName":"","value":"9930:de112233445"}],"addresses":[{"line1":"Line 1","line2":"Line 2","city":"Brisbane","state":"Queensland","country":"Australia","postalCode":"4000"}],"supportedDocumentTypes":[{"name":"","value":"busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1","supportedByTradingPartner":true,"supportedByAvalara":true,"extensions":[]}],"consents":{"listInAvalaraDirectory":true},"extensions":[]}]}; // \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatchRequest $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". $x_correlation_id = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. @@ -199,13 +199,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used. | - **create_trading_partners_batch_request** | [**\AvalaraSDK\ModelEInvoicingV1\CreateTradingPartnersBatchRequest**](../Model/CreateTradingPartnersBatchRequest.md)| | + **create_trading_partners_batch_request** | [**\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatchRequest**](../Model/CreateTradingPartnersBatchRequest.md)| | **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] **x_correlation_id** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\CreateTradingPartnersBatch200Response**](../Model/CreateTradingPartnersBatch200Response.md) +[**\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response**](../Model/CreateTradingPartnersBatch200Response.md) ### Authorization @@ -246,7 +246,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used. $id = 'id_example'; // string | The ID of the trading partner which is being deleted. @@ -312,7 +312,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used. $id = 2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99; // string | The ID of the batch search for which the report should be downloaded. @@ -356,7 +356,7 @@ Name | Type | Description | Notes ## `getBatchSearchDetail()` ```php -getBatchSearchDetail($avalara_version, $id, $x_avalara_client, $x_correlation_id): \AvalaraSDK\ModelEInvoicingV1\BatchSearch +getBatchSearchDetail($avalara_version, $id, $x_avalara_client, $x_correlation_id): \Avalara\SDK\Model\EInvoicing\V1\BatchSearch ``` Returns the batch search details using ID. @@ -379,7 +379,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used. $id = 2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99; // string | The ID of the batch search that was submitted earlier. @@ -405,7 +405,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\BatchSearch**](../Model/BatchSearch.md) +[**\Avalara\SDK\Model\EInvoicing\V1\BatchSearch**](../Model/BatchSearch.md) ### Authorization @@ -423,7 +423,7 @@ Name | Type | Description | Notes ## `listBatchSearches()` ```php -listBatchSearches($avalara_version, $x_avalara_client, $filter, $count, $top, $skip, $order_by, $x_correlation_id): \AvalaraSDK\ModelEInvoicingV1\BatchSearchListResponse +listBatchSearches($avalara_version, $x_avalara_client, $filter, $count, $top, $skip, $order_by, $x_correlation_id): \Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse ``` Lists all batch searches that were previously submitted. @@ -446,7 +446,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used. $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". @@ -480,7 +480,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\BatchSearchListResponse**](../Model/BatchSearchListResponse.md) +[**\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse**](../Model/BatchSearchListResponse.md) ### Authorization @@ -498,7 +498,7 @@ Name | Type | Description | Notes ## `searchParticipants()` ```php -searchParticipants($avalara_version, $search, $x_avalara_client, $count, $filter, $top, $skip, $order_by, $x_correlation_id): \AvalaraSDK\ModelEInvoicingV1\SearchParticipants200Response +searchParticipants($avalara_version, $search, $x_avalara_client, $count, $filter, $top, $skip, $order_by, $x_correlation_id): \Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response ``` Returns a list of participants matching the input query. @@ -521,7 +521,7 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used. $search = Acme and 7726627177 or BMW; // string | Search by value supports logical AND / OR operators. Search is performed only over the name and identifier value fields. For more information, refer to [Query options overview - OData.](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search). @@ -557,7 +557,7 @@ Name | Type | Description | Notes ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\SearchParticipants200Response**](../Model/SearchParticipants200Response.md) +[**\Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response**](../Model/SearchParticipants200Response.md) ### Authorization @@ -575,7 +575,7 @@ Name | Type | Description | Notes ## `updateTradingPartner()` ```php -updateTradingPartner($avalara_version, $id, $trading_partner, $x_avalara_client, $x_correlation_id): \AvalaraSDK\ModelEInvoicingV1\UpdateTradingPartner200Response +updateTradingPartner($avalara_version, $id, $trading_partner, $x_avalara_client, $x_correlation_id): \Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response ``` Updates a trading partner using ID. @@ -598,11 +598,11 @@ $config = new \Avalara\SDK\Configuration() $client = new \Avalara\SDK\ApiClient($config); -$apiInstance = new AvalaraSDK\Api\TradingPartnersApi($client); +$apiInstance = new Avalara\SDK\Api\TradingPartnersApi($client); $avalara_version = 1.4; // string | The HTTP Header meant to specify the version of the API intended to be used. $id = 'id_example'; // string | The ID of the trading partner which is being updated. -$trading_partner = {"name":"Pineapple Labs ltd","registrationDate":"2024-01-01T00:00:00.000Z","identifiers":[{"name":"urn:avalara:systems:des:directory:participant:identifiers:peppolparticipantid","displayName":"","value":"9930:de112233445"}],"address":[{"line1":"Line 1","line2":"Line 2","city":"Brisbane","state":"Queensland","country":"Australia","postalCode":"4000"}],"supportedDocumentTypes":[{"name":"","value":"busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1","supportedByTradingPartner":true,"supportedByAvalara":true,"extensions":[]}],"consents":{"listInAvalaraDirectory":true},"extensions":[]}; // \AvalaraSDK\ModelEInvoicingV1\TradingPartner +$trading_partner = {"name":"Pineapple Labs ltd","registrationDate":"2024-01-01T00:00:00.000Z","identifiers":[{"name":"urn:avalara:systems:des:directory:participant:identifiers:peppolparticipantid","displayName":"","value":"9930:de112233445"}],"address":[{"line1":"Line 1","line2":"Line 2","city":"Brisbane","state":"Queensland","country":"Australia","postalCode":"4000"}],"supportedDocumentTypes":[{"name":"","value":"busdox-docid-qns::urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1","supportedByTradingPartner":true,"supportedByAvalara":true,"extensions":[]}],"consents":{"listInAvalaraDirectory":true},"extensions":[]}; // \Avalara\SDK\Model\EInvoicing\V1\TradingPartner $x_avalara_client = John's E-Invoicing-API Client; // string | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". $x_correlation_id = f3f0d19a-01a1-4748-8a58-f000d0424f43; // string | The caller can use this as an identifier to use as a correlation id to trace the call. @@ -620,13 +620,13 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalara_version** | **string**| The HTTP Header meant to specify the version of the API intended to be used. | **id** | **string**| The ID of the trading partner which is being updated. | - **trading_partner** | [**\AvalaraSDK\ModelEInvoicingV1\TradingPartner**](../Model/TradingPartner.md)| | + **trading_partner** | [**\Avalara\SDK\Model\EInvoicing\V1\TradingPartner**](../Model/TradingPartner.md)| | **x_avalara_client** | **string**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] **x_correlation_id** | **string**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type -[**\AvalaraSDK\ModelEInvoicingV1\UpdateTradingPartner200Response**](../Model/UpdateTradingPartner200Response.md) +[**\Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response**](../Model/UpdateTradingPartner200Response.md) ### Authorization diff --git a/docs/EInvoicing/WebhookInvocation.md b/docs/EInvoicing/WebhookInvocation.md index 51bc363..4557577 100644 --- a/docs/EInvoicing/WebhookInvocation.md +++ b/docs/EInvoicing/WebhookInvocation.md @@ -9,6 +9,6 @@ Name | Type | Description | Notes **retry_max** | **int** | The maximum retries that may be attempted in total. | [optional] **invocation_timestamp** | **\DateTime** | Initial timestamp of the first invocation attempt. | **retry_timestamp** | **\DateTime** | Timestamp of this invocation attempt. | [optional] -**items** | [**\AvalaraSDK\ModelEInvoicingV1\EventMessage[]**](EventMessage.md) | Array of events being delivered in the webhook | +**items** | [**\Avalara\SDK\Model\EInvoicing\V1\EventMessage[]**](EventMessage.md) | Array of events being delivered in the webhook | [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/docs/EInvoicing/WebhooksErrorResponse.md b/docs/EInvoicing/WebhooksErrorResponse.md index 4cac7a7..b49b237 100644 --- a/docs/EInvoicing/WebhooksErrorResponse.md +++ b/docs/EInvoicing/WebhooksErrorResponse.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | [**\AvalaraSDK\ModelEInvoicingV1\WebhooksErrorInfo**](WebhooksErrorInfo.md) | | [optional] +**error** | [**\Avalara\SDK\Model\EInvoicing\V1\WebhooksErrorInfo**](WebhooksErrorInfo.md) | | [optional] [[Back to Model list]](../../../README.md#models) [[Back to API list]](../../../README.md#endpoints) [[Back to README]](../../../README.md) diff --git a/lib/API/A1099/V2/CompaniesW9Api.php b/lib/API/A1099/V2/CompaniesW9Api.php index 93bb747..c4c7042 100644 --- a/lib/API/A1099/V2/CompaniesW9Api.php +++ b/lib/API/A1099/V2/CompaniesW9Api.php @@ -79,7 +79,7 @@ public function __construct(ApiClient $client ) private function setConfiguration($client): void { $this->verifyAPIClient($client); - $client->setSdkVersion("25.8.1"); + $client->setSdkVersion("25.8.3"); $this->headerSelector = new HeaderSelector(); $this->client = $client; } @@ -124,7 +124,7 @@ public function getConfig() * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\A1099\V2\CompanyResponseModel|\Avalara\SDK\Model\A1099\V2\ErrorModel|string + * @return \Avalara\SDK\Model\A1099\V2\CompanyResponse|\Avalara\SDK\Model\A1099\V2\ErrorModel|string */ public function createCompany($request_parameters) { @@ -141,7 +141,7 @@ public function createCompany($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\A1099\V2\CompanyResponseModel|\Avalara\SDK\Model\A1099\V2\ErrorModel|string, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\A1099\V2\CompanyResponse|\Avalara\SDK\Model\A1099\V2\ErrorModel|string, HTTP status code, HTTP response headers (array of strings) */ public function createCompanyWithHttpInfo($request_parameters, $isRetry = false) { @@ -197,7 +197,7 @@ public function createCompanyWithHttpInfo($request_parameters, $isRetry = false) switch($statusCode) { case 201: - if ('\Avalara\SDK\Model\A1099\V2\CompanyResponseModel' === '\SplFileObject') { + if ('\Avalara\SDK\Model\A1099\V2\CompanyResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -205,7 +205,7 @@ public function createCompanyWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\CompanyResponseModel', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\CompanyResponse', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -237,7 +237,7 @@ public function createCompanyWithHttpInfo($request_parameters, $isRetry = false) ]; } - $returnType = '\Avalara\SDK\Model\A1099\V2\CompanyResponseModel'; + $returnType = '\Avalara\SDK\Model\A1099\V2\CompanyResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -256,7 +256,7 @@ public function createCompanyWithHttpInfo($request_parameters, $isRetry = false) case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\A1099\V2\CompanyResponseModel', + '\Avalara\SDK\Model\A1099\V2\CompanyResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -315,7 +315,7 @@ function ($response) { public function createCompanyAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\A1099\V2\CompanyResponseModel'; + $returnType = '\Avalara\SDK\Model\A1099\V2\CompanyResponse'; $request = $this->createCompanyRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -381,7 +381,7 @@ public function createCompanyRequest($request_parameters) $avalara_version = $request_parameters->getAvalaraVersion(); $x_correlation_id = $request_parameters->getXCorrelationId(); $x_avalara_client = $request_parameters->getXAvalaraClient(); - $company_create_update_request_model = $request_parameters->getCompanyCreateUpdateRequestModel(); + $create_company_request = $request_parameters->getCreateCompanyRequest(); // verify the required parameter 'avalara_version' is set if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { @@ -423,16 +423,16 @@ public function createCompanyRequest($request_parameters) ['application/json', 'text/json', 'application/*+json'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; // for model (json/xml) - if (isset($company_create_update_request_model)) { + if (isset($create_company_request)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($company_create_update_request_model)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($create_company_request)); } else { - $httpBody = $company_create_update_request_model; + $httpBody = $create_company_request; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -742,7 +742,7 @@ public function deleteCompanyRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1212,7 +1212,7 @@ public function getCompaniesRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1625,7 +1625,7 @@ public function getCompanyRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1683,7 +1683,7 @@ public function getCompanyRequest($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\A1099\V2\CompanyResponseModel|\Avalara\SDK\Model\A1099\V2\ErrorModel|string|\Avalara\SDK\Model\A1099\V2\ErrorModel + * @return \Avalara\SDK\Model\A1099\V2\CompanyResponse|\Avalara\SDK\Model\A1099\V2\ErrorModel|string|\Avalara\SDK\Model\A1099\V2\ErrorModel */ public function updateCompany($request_parameters) { @@ -1700,7 +1700,7 @@ public function updateCompany($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\A1099\V2\CompanyResponseModel|\Avalara\SDK\Model\A1099\V2\ErrorModel|string|\Avalara\SDK\Model\A1099\V2\ErrorModel, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\A1099\V2\CompanyResponse|\Avalara\SDK\Model\A1099\V2\ErrorModel|string|\Avalara\SDK\Model\A1099\V2\ErrorModel, HTTP status code, HTTP response headers (array of strings) */ public function updateCompanyWithHttpInfo($request_parameters, $isRetry = false) { @@ -1756,7 +1756,7 @@ public function updateCompanyWithHttpInfo($request_parameters, $isRetry = false) switch($statusCode) { case 200: - if ('\Avalara\SDK\Model\A1099\V2\CompanyResponseModel' === '\SplFileObject') { + if ('\Avalara\SDK\Model\A1099\V2\CompanyResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1764,7 +1764,7 @@ public function updateCompanyWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\CompanyResponseModel', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\CompanyResponse', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1809,7 +1809,7 @@ public function updateCompanyWithHttpInfo($request_parameters, $isRetry = false) ]; } - $returnType = '\Avalara\SDK\Model\A1099\V2\CompanyResponseModel'; + $returnType = '\Avalara\SDK\Model\A1099\V2\CompanyResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1828,7 +1828,7 @@ public function updateCompanyWithHttpInfo($request_parameters, $isRetry = false) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\A1099\V2\CompanyResponseModel', + '\Avalara\SDK\Model\A1099\V2\CompanyResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1895,7 +1895,7 @@ function ($response) { public function updateCompanyAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\A1099\V2\CompanyResponseModel'; + $returnType = '\Avalara\SDK\Model\A1099\V2\CompanyResponse'; $request = $this->updateCompanyRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -1962,7 +1962,7 @@ public function updateCompanyRequest($request_parameters) $avalara_version = $request_parameters->getAvalaraVersion(); $x_correlation_id = $request_parameters->getXCorrelationId(); $x_avalara_client = $request_parameters->getXAvalaraClient(); - $company_create_update_request_model = $request_parameters->getCompanyCreateUpdateRequestModel(); + $create_company_request = $request_parameters->getCreateCompanyRequest(); // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { @@ -2018,16 +2018,16 @@ public function updateCompanyRequest($request_parameters) ['application/json', 'text/json', 'application/*+json'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; // for model (json/xml) - if (isset($company_create_update_request_model)) { + if (isset($create_company_request)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($company_create_update_request_model)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($create_company_request)); } else { - $httpBody = $company_create_update_request_model; + $httpBody = $create_company_request; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -2080,13 +2080,13 @@ public function updateCompanyRequest($request_parameters) * @param string $avalara_version API version (required) * @param string $x_correlation_id Unique correlation Id in a GUID format (optional) * @param string $x_avalara_client Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param \Avalara\SDK\Model\A1099\V2\CompanyCreateUpdateRequestModel $company_create_update_request_model The company to create (optional) + * @param \Avalara\SDK\Model\A1099\V2\CreateCompanyRequest $create_company_request The company to create (optional) */ class CreateCompanyRequestSdk { private $avalara_version; private $x_correlation_id; private $x_avalara_client; - private $company_create_update_request_model; + private $create_company_request; public function __construct() { } @@ -2111,12 +2111,12 @@ public function getXAvalaraClient() { public function setXAvalaraClient($x_avalara_client) { $this->x_avalara_client = $x_avalara_client; } - public function getCompanyCreateUpdateRequestModel() { - return $this->company_create_update_request_model; + public function getCreateCompanyRequest() { + return $this->create_company_request; } - public function setCompanyCreateUpdateRequestModel($company_create_update_request_model) { - $this->company_create_update_request_model = $company_create_update_request_model; + public function setCreateCompanyRequest($create_company_request) { + $this->create_company_request = $create_company_request; } } @@ -2310,14 +2310,14 @@ public function setXAvalaraClient($x_avalara_client) { * @param string $avalara_version API version (required) * @param string $x_correlation_id Unique correlation Id in a GUID format (optional) * @param string $x_avalara_client Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param \Avalara\SDK\Model\A1099\V2\CompanyCreateUpdateRequestModel $company_create_update_request_model The updated company data (optional) + * @param \Avalara\SDK\Model\A1099\V2\CreateCompanyRequest $create_company_request The updated company data (optional) */ class UpdateCompanyRequestSdk { private $id; private $avalara_version; private $x_correlation_id; private $x_avalara_client; - private $company_create_update_request_model; + private $create_company_request; public function __construct() { } @@ -2349,12 +2349,12 @@ public function getXAvalaraClient() { public function setXAvalaraClient($x_avalara_client) { $this->x_avalara_client = $x_avalara_client; } - public function getCompanyCreateUpdateRequestModel() { - return $this->company_create_update_request_model; + public function getCreateCompanyRequest() { + return $this->create_company_request; } - public function setCompanyCreateUpdateRequestModel($company_create_update_request_model) { - $this->company_create_update_request_model = $company_create_update_request_model; + public function setCreateCompanyRequest($create_company_request) { + $this->create_company_request = $create_company_request; } } diff --git a/lib/API/A1099/V2/Forms1099Api.php b/lib/API/A1099/V2/Forms1099Api.php index a9c7bfd..624e630 100644 --- a/lib/API/A1099/V2/Forms1099Api.php +++ b/lib/API/A1099/V2/Forms1099Api.php @@ -79,7 +79,7 @@ public function __construct(ApiClient $client ) private function setConfiguration($client): void { $this->verifyAPIClient($client); - $client->setSdkVersion("25.8.1"); + $client->setSdkVersion("25.8.3"); $this->headerSelector = new HeaderSelector(); $this->client = $client; } @@ -124,7 +124,7 @@ public function getConfig() * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\A1099\V2\Form1099ProccessResult|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse + * @return \Avalara\SDK\Model\A1099\V2\JobResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse */ public function bulkUpsert1099Forms($request_parameters) { @@ -141,7 +141,7 @@ public function bulkUpsert1099Forms($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\A1099\V2\Form1099ProccessResult|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\A1099\V2\JobResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function bulkUpsert1099FormsWithHttpInfo($request_parameters, $isRetry = false) { @@ -197,7 +197,7 @@ public function bulkUpsert1099FormsWithHttpInfo($request_parameters, $isRetry = switch($statusCode) { case 200: - if ('\Avalara\SDK\Model\A1099\V2\Form1099ProccessResult' === '\SplFileObject') { + if ('\Avalara\SDK\Model\A1099\V2\JobResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -205,7 +205,7 @@ public function bulkUpsert1099FormsWithHttpInfo($request_parameters, $isRetry = $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\Form1099ProccessResult', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\JobResponse', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -250,7 +250,7 @@ public function bulkUpsert1099FormsWithHttpInfo($request_parameters, $isRetry = ]; } - $returnType = '\Avalara\SDK\Model\A1099\V2\Form1099ProccessResult'; + $returnType = '\Avalara\SDK\Model\A1099\V2\JobResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -269,7 +269,7 @@ public function bulkUpsert1099FormsWithHttpInfo($request_parameters, $isRetry = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\A1099\V2\Form1099ProccessResult', + '\Avalara\SDK\Model\A1099\V2\JobResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -336,7 +336,7 @@ function ($response) { public function bulkUpsert1099FormsAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\A1099\V2\Form1099ProccessResult'; + $returnType = '\Avalara\SDK\Model\A1099\V2\JobResponse'; $request = $this->bulkUpsert1099FormsRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -403,7 +403,7 @@ public function bulkUpsert1099FormsRequest($request_parameters) $dry_run = $request_parameters->getDryRun(); $x_correlation_id = $request_parameters->getXCorrelationId(); $x_avalara_client = $request_parameters->getXAvalaraClient(); - $bulk_upsert1099_forms_request = $request_parameters->getBulkUpsert1099FormsRequest(); + $form1099_list_request = $request_parameters->getForm1099ListRequest(); // verify the required parameter 'avalara_version' is set if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { @@ -456,16 +456,16 @@ public function bulkUpsert1099FormsRequest($request_parameters) ['application/json', 'text/json', 'application/*+json'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; // for model (json/xml) - if (isset($bulk_upsert1099_forms_request)) { + if (isset($form1099_list_request)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($bulk_upsert1099_forms_request)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($form1099_list_request)); } else { - $httpBody = $bulk_upsert1099_forms_request; + $httpBody = $form1099_list_request; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -520,7 +520,7 @@ public function bulkUpsert1099FormsRequest($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\A1099\V2\Create1099Form201Response|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse + * @return \Avalara\SDK\Model\A1099\V2\Get1099Form200Response|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse */ public function create1099Form($request_parameters) { @@ -537,7 +537,7 @@ public function create1099Form($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\A1099\V2\Create1099Form201Response|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\A1099\V2\Get1099Form200Response|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function create1099FormWithHttpInfo($request_parameters, $isRetry = false) { @@ -593,7 +593,7 @@ public function create1099FormWithHttpInfo($request_parameters, $isRetry = false switch($statusCode) { case 201: - if ('\Avalara\SDK\Model\A1099\V2\Create1099Form201Response' === '\SplFileObject') { + if ('\Avalara\SDK\Model\A1099\V2\Get1099Form200Response' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -601,7 +601,7 @@ public function create1099FormWithHttpInfo($request_parameters, $isRetry = false $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\Create1099Form201Response', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\Get1099Form200Response', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -633,7 +633,7 @@ public function create1099FormWithHttpInfo($request_parameters, $isRetry = false ]; } - $returnType = '\Avalara\SDK\Model\A1099\V2\Create1099Form201Response'; + $returnType = '\Avalara\SDK\Model\A1099\V2\Get1099Form200Response'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -652,7 +652,7 @@ public function create1099FormWithHttpInfo($request_parameters, $isRetry = false case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\A1099\V2\Create1099Form201Response', + '\Avalara\SDK\Model\A1099\V2\Get1099Form200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -711,7 +711,7 @@ function ($response) { public function create1099FormAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\A1099\V2\Create1099Form201Response'; + $returnType = '\Avalara\SDK\Model\A1099\V2\Get1099Form200Response'; $request = $this->create1099FormRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -777,7 +777,7 @@ public function create1099FormRequest($request_parameters) $avalara_version = $request_parameters->getAvalaraVersion(); $x_correlation_id = $request_parameters->getXCorrelationId(); $x_avalara_client = $request_parameters->getXAvalaraClient(); - $i_create_form1099_request = $request_parameters->getICreateForm1099Request(); + $get1099_form200_response = $request_parameters->getGet1099Form200Response(); // verify the required parameter 'avalara_version' is set if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { @@ -819,16 +819,16 @@ public function create1099FormRequest($request_parameters) ['application/json', 'text/json', 'application/*+json'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; // for model (json/xml) - if (isset($i_create_form1099_request)) { + if (isset($get1099_form200_response)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($i_create_form1099_request)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($get1099_form200_response)); } else { - $httpBody = $i_create_form1099_request; + $httpBody = $get1099_form200_response; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -1138,7 +1138,7 @@ public function delete1099FormRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1530,7 +1530,7 @@ public function get1099FormRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1934,7 +1934,7 @@ public function get1099FormPdfRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1992,7 +1992,7 @@ public function get1099FormPdfRequest($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\A1099\V2\Form1099ListResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse + * @return \Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelForm1099Base|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse */ public function list1099Forms($request_parameters) { @@ -2009,7 +2009,7 @@ public function list1099Forms($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\A1099\V2\Form1099ListResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelForm1099Base|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function list1099FormsWithHttpInfo($request_parameters, $isRetry = false) { @@ -2065,7 +2065,7 @@ public function list1099FormsWithHttpInfo($request_parameters, $isRetry = false) switch($statusCode) { case 200: - if ('\Avalara\SDK\Model\A1099\V2\Form1099ListResponse' === '\SplFileObject') { + if ('\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelForm1099Base' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -2073,7 +2073,7 @@ public function list1099FormsWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\Form1099ListResponse', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelForm1099Base', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -2118,7 +2118,7 @@ public function list1099FormsWithHttpInfo($request_parameters, $isRetry = false) ]; } - $returnType = '\Avalara\SDK\Model\A1099\V2\Form1099ListResponse'; + $returnType = '\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelForm1099Base'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -2137,7 +2137,7 @@ public function list1099FormsWithHttpInfo($request_parameters, $isRetry = false) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\A1099\V2\Form1099ListResponse', + '\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelForm1099Base', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2204,7 +2204,7 @@ function ($response) { public function list1099FormsAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\A1099\V2\Form1099ListResponse'; + $returnType = '\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelForm1099Base'; $request = $this->list1099FormsRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -2272,6 +2272,8 @@ public function list1099FormsRequest($request_parameters) $top = $request_parameters->getTop(); $skip = $request_parameters->getSkip(); $order_by = $request_parameters->getOrderBy(); + $count = $request_parameters->getCount(); + $count_only = $request_parameters->getCountOnly(); $x_correlation_id = $request_parameters->getXCorrelationId(); $x_avalara_client = $request_parameters->getXAvalaraClient(); @@ -2333,6 +2335,28 @@ public function list1099FormsRequest($request_parameters) $queryParams['$orderBy'] = $order_by; } } + // query params + if ($count !== null) { + if('form' === 'form' && is_array($count)) { + foreach($count as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['count'] = $count; + } + } + // query params + if ($count_only !== null) { + if('form' === 'form' && is_array($count_only)) { + foreach($count_only as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['countOnly'] = $count_only; + } + } // header params if ($avalara_version !== null) { @@ -2359,7 +2383,7 @@ public function list1099FormsRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -2417,7 +2441,7 @@ public function list1099FormsRequest($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\A1099\V2\Update1099Form200Response|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse + * @return \Avalara\SDK\Model\A1099\V2\Get1099Form200Response|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse */ public function update1099Form($request_parameters) { @@ -2434,7 +2458,7 @@ public function update1099Form($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\A1099\V2\Update1099Form200Response|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\A1099\V2\Get1099Form200Response|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function update1099FormWithHttpInfo($request_parameters, $isRetry = false) { @@ -2490,7 +2514,7 @@ public function update1099FormWithHttpInfo($request_parameters, $isRetry = false switch($statusCode) { case 200: - if ('\Avalara\SDK\Model\A1099\V2\Update1099Form200Response' === '\SplFileObject') { + if ('\Avalara\SDK\Model\A1099\V2\Get1099Form200Response' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -2498,7 +2522,7 @@ public function update1099FormWithHttpInfo($request_parameters, $isRetry = false $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\Update1099Form200Response', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\Get1099Form200Response', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -2543,7 +2567,7 @@ public function update1099FormWithHttpInfo($request_parameters, $isRetry = false ]; } - $returnType = '\Avalara\SDK\Model\A1099\V2\Update1099Form200Response'; + $returnType = '\Avalara\SDK\Model\A1099\V2\Get1099Form200Response'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -2562,7 +2586,7 @@ public function update1099FormWithHttpInfo($request_parameters, $isRetry = false case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\A1099\V2\Update1099Form200Response', + '\Avalara\SDK\Model\A1099\V2\Get1099Form200Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2629,7 +2653,7 @@ function ($response) { public function update1099FormAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\A1099\V2\Update1099Form200Response'; + $returnType = '\Avalara\SDK\Model\A1099\V2\Get1099Form200Response'; $request = $this->update1099FormRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -2696,7 +2720,7 @@ public function update1099FormRequest($request_parameters) $avalara_version = $request_parameters->getAvalaraVersion(); $x_correlation_id = $request_parameters->getXCorrelationId(); $x_avalara_client = $request_parameters->getXAvalaraClient(); - $i_update_form1099_request = $request_parameters->getIUpdateForm1099Request(); + $get1099_form200_response = $request_parameters->getGet1099Form200Response(); // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { @@ -2752,16 +2776,16 @@ public function update1099FormRequest($request_parameters) ['application/json', 'text/json', 'application/*+json'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; // for model (json/xml) - if (isset($i_update_form1099_request)) { + if (isset($get1099_form200_response)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($i_update_form1099_request)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($get1099_form200_response)); } else { - $httpBody = $i_update_form1099_request; + $httpBody = $get1099_form200_response; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -2812,17 +2836,17 @@ public function update1099FormRequest($request_parameters) * Represents the Request object for the BulkUpsert1099Forms API * * @param string $avalara_version API version (required) - * @param bool $dry_run (optional, default to false) + * @param bool $dry_run defaults to false. If true, it will NOT change the DB. It will just return a report of what would've have been changed in the DB (optional, default to false) * @param string $x_correlation_id Unique correlation Id in a GUID format (optional) * @param string $x_avalara_client Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param \Avalara\SDK\Model\A1099\V2\BulkUpsert1099FormsRequest $bulk_upsert1099_forms_request (optional) + * @param \Avalara\SDK\Model\A1099\V2\Form1099ListRequest $form1099_list_request (optional) */ class BulkUpsert1099FormsRequestSdk { private $avalara_version; private $dry_run; private $x_correlation_id; private $x_avalara_client; - private $bulk_upsert1099_forms_request; + private $form1099_list_request; public function __construct() { } @@ -2854,12 +2878,12 @@ public function getXAvalaraClient() { public function setXAvalaraClient($x_avalara_client) { $this->x_avalara_client = $x_avalara_client; } - public function getBulkUpsert1099FormsRequest() { - return $this->bulk_upsert1099_forms_request; + public function getForm1099ListRequest() { + return $this->form1099_list_request; } - public function setBulkUpsert1099FormsRequest($bulk_upsert1099_forms_request) { - $this->bulk_upsert1099_forms_request = $bulk_upsert1099_forms_request; + public function setForm1099ListRequest($form1099_list_request) { + $this->form1099_list_request = $form1099_list_request; } } @@ -2869,13 +2893,13 @@ public function setBulkUpsert1099FormsRequest($bulk_upsert1099_forms_request) { * @param string $avalara_version API version (required) * @param string $x_correlation_id Unique correlation Id in a GUID format (optional) * @param string $x_avalara_client Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param \Avalara\SDK\Model\A1099\V2\ICreateForm1099Request $i_create_form1099_request i_create_form1099_request (optional) + * @param \Avalara\SDK\Model\A1099\V2\Get1099Form200Response $get1099_form200_response get1099_form200_response (optional) */ class Create1099FormRequestSdk { private $avalara_version; private $x_correlation_id; private $x_avalara_client; - private $i_create_form1099_request; + private $get1099_form200_response; public function __construct() { } @@ -2900,12 +2924,12 @@ public function getXAvalaraClient() { public function setXAvalaraClient($x_avalara_client) { $this->x_avalara_client = $x_avalara_client; } - public function getICreateForm1099Request() { - return $this->i_create_form1099_request; + public function getGet1099Form200Response() { + return $this->get1099_form200_response; } - public function setICreateForm1099Request($i_create_form1099_request) { - $this->i_create_form1099_request = $i_create_form1099_request; + public function setGet1099Form200Response($get1099_form200_response) { + $this->get1099_form200_response = $get1099_form200_response; } } @@ -3060,10 +3084,12 @@ public function setXAvalaraClient($x_avalara_client) { * Represents the Request object for the List1099Forms API * * @param string $avalara_version API version (required) - * @param string $filter A filter statement to identify specific records to retrieve. For more information on filtering, see <a href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</a>. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: issuerId issuerReferenceId taxYear addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified createdAt edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted email federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held recipientName mailStatus - possible values are: sent, unscheduled, pending, delivered referenceId tinMatchStatus - possible values are: none, pending, matched, failed type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC updatedAt validity - possible values are: true, false (optional) - * @param int $top If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. (optional, default to 10) - * @param int $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional, default to 0) - * @param string $order_by A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example issuerReferenceId ASC. Supported sorting fields are: issuerReferenceId taxYear createdAt recipientName updatedAt (optional) + * @param string $filter A filter statement to identify specific records to retrieve. For more information on filtering, see <a href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</a>. (optional) + * @param int $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) + * @param int $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) + * @param string $order_by A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) + * @param bool $count If true, return the global count of elements in the collection. (optional) + * @param bool $count_only If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) * @param string $x_correlation_id Unique correlation Id in a GUID format (optional) * @param string $x_avalara_client Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) */ @@ -3073,6 +3099,8 @@ class List1099FormsRequestSdk { private $top; private $skip; private $order_by; + private $count; + private $count_only; private $x_correlation_id; private $x_avalara_client; @@ -3113,6 +3141,20 @@ public function getOrderBy() { public function setOrderBy($order_by) { $this->order_by = $order_by; } + public function getCount() { + return $this->count; + } + + public function setCount($count) { + $this->count = $count; + } + public function getCountOnly() { + return $this->count_only; + } + + public function setCountOnly($count_only) { + $this->count_only = $count_only; + } public function getXCorrelationId() { return $this->x_correlation_id; } @@ -3136,14 +3178,14 @@ public function setXAvalaraClient($x_avalara_client) { * @param string $avalara_version API version (required) * @param string $x_correlation_id Unique correlation Id in a GUID format (optional) * @param string $x_avalara_client Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param \Avalara\SDK\Model\A1099\V2\IUpdateForm1099Request $i_update_form1099_request i_update_form1099_request (optional) + * @param \Avalara\SDK\Model\A1099\V2\Get1099Form200Response $get1099_form200_response get1099_form200_response (optional) */ class Update1099FormRequestSdk { private $id; private $avalara_version; private $x_correlation_id; private $x_avalara_client; - private $i_update_form1099_request; + private $get1099_form200_response; public function __construct() { } @@ -3175,12 +3217,12 @@ public function getXAvalaraClient() { public function setXAvalaraClient($x_avalara_client) { $this->x_avalara_client = $x_avalara_client; } - public function getIUpdateForm1099Request() { - return $this->i_update_form1099_request; + public function getGet1099Form200Response() { + return $this->get1099_form200_response; } - public function setIUpdateForm1099Request($i_update_form1099_request) { - $this->i_update_form1099_request = $i_update_form1099_request; + public function setGet1099Form200Response($get1099_form200_response) { + $this->get1099_form200_response = $get1099_form200_response; } } diff --git a/lib/API/A1099/V2/FormsW9Api.php b/lib/API/A1099/V2/FormsW9Api.php index e53a1fc..8cee364 100644 --- a/lib/API/A1099/V2/FormsW9Api.php +++ b/lib/API/A1099/V2/FormsW9Api.php @@ -79,7 +79,7 @@ public function __construct(ApiClient $client ) private function setConfiguration($client): void { $this->verifyAPIClient($client); - $client->setSdkVersion("25.8.1"); + $client->setSdkVersion("25.8.3"); $this->headerSelector = new HeaderSelector(); $this->client = $client; } @@ -115,6 +115,348 @@ public function getConfig() return $this->client->config; } + /** + * Operation createAndSendW9FormEmail + * + * Create a minimal W9/W4/W8 form and sends the e-mail request + * + * @param CreateAndSendW9FormEmailRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\A1099\V2\CreateW9Form201Response|\Avalara\SDK\Model\A1099\V2\ErrorResponse + */ + public function createAndSendW9FormEmail($request_parameters) + { + list($response) = $this->createAndSendW9FormEmailWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation createAndSendW9FormEmailWithHttpInfo + * + * Create a minimal W9/W4/W8 form and sends the e-mail request + * + * @param CreateAndSendW9FormEmailRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\A1099\V2\CreateW9Form201Response|\Avalara\SDK\Model\A1099\V2\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createAndSendW9FormEmailWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->createAndSendW9FormEmailRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->createAndSendW9FormEmailWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 201: + if ('\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\SDK\Model\A1099\V2\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\A1099\V2\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createAndSendW9FormEmailAsync + * + * Create a minimal W9/W4/W8 form and sends the e-mail request + * + * @param CreateAndSendW9FormEmailRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createAndSendW9FormEmailAsync($request_parameters) + { + return $this->createAndSendW9FormEmailAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createAndSendW9FormEmailAsyncWithHttpInfo + * + * Create a minimal W9/W4/W8 form and sends the e-mail request + * + * @param CreateAndSendW9FormEmailRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createAndSendW9FormEmailAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response'; + $request = $this->createAndSendW9FormEmailRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->createAndSendW9FormEmailAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createAndSendW9FormEmail' + * + * @param CreateAndSendW9FormEmailRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createAndSendW9FormEmailRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $create_and_send_w9_form_email_request = $request_parameters->getCreateAndSendW9FormEmailRequest(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling createAndSendW9FormEmail' + ); + } + + $resourcePath = '/w9/forms/$create-and-send-email'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-Id'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json', 'text/json', 'application/*+json'] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (isset($create_and_send_w9_form_email_request)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($create_and_send_w9_form_email_request)); + } else { + $httpBody = $create_and_send_w9_form_email_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('A1099'); + return new Request( + 'POST', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation createW9Form * @@ -402,7 +744,7 @@ public function createW9FormRequest($request_parameters) ['application/json', 'text/json', 'application/*+json'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -705,7 +1047,7 @@ public function deleteW9FormRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1055,7 +1397,7 @@ public function getW9FormRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1113,7 +1455,7 @@ public function getW9FormRequest($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\A1099\V2\PaginatedW9FormsModel|\Avalara\SDK\Model\A1099\V2\ErrorModel|string + * @return \Avalara\SDK\Model\A1099\V2\ErrorModel|string|\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelW9FormBaseResponse */ public function listW9Forms($request_parameters) { @@ -1130,7 +1472,7 @@ public function listW9Forms($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\A1099\V2\PaginatedW9FormsModel|\Avalara\SDK\Model\A1099\V2\ErrorModel|string, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\A1099\V2\ErrorModel|string|\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelW9FormBaseResponse, HTTP status code, HTTP response headers (array of strings) */ public function listW9FormsWithHttpInfo($request_parameters, $isRetry = false) { @@ -1185,8 +1527,8 @@ public function listW9FormsWithHttpInfo($request_parameters, $isRetry = false) } switch($statusCode) { - case 200: - if ('\Avalara\SDK\Model\A1099\V2\PaginatedW9FormsModel' === '\SplFileObject') { + case 400: + if ('\Avalara\SDK\Model\A1099\V2\ErrorModel' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1194,12 +1536,12 @@ public function listW9FormsWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\PaginatedW9FormsModel', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\ErrorModel', []), $response->getStatusCode(), $response->getHeaders() ]; - case 400: - if ('\Avalara\SDK\Model\A1099\V2\ErrorModel' === '\SplFileObject') { + case 401: + if ('string' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1207,12 +1549,12 @@ public function listW9FormsWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\ErrorModel', []), + ObjectSerializer::deserialize($content, 'string', []), $response->getStatusCode(), $response->getHeaders() ]; - case 401: - if ('string' === '\SplFileObject') { + case 200: + if ('\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelW9FormBaseResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1220,13 +1562,13 @@ public function listW9FormsWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, 'string', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelW9FormBaseResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Avalara\SDK\Model\A1099\V2\PaginatedW9FormsModel'; + $returnType = '\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelW9FormBaseResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1242,26 +1584,26 @@ public function listW9FormsWithHttpInfo($request_parameters, $isRetry = false) } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\A1099\V2\PaginatedW9FormsModel', + '\Avalara\SDK\Model\A1099\V2\ErrorModel', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 400: + case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\A1099\V2\ErrorModel', + 'string', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 401: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'string', + '\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelW9FormBaseResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1304,7 +1646,7 @@ function ($response) { public function listW9FormsAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\A1099\V2\PaginatedW9FormsModel'; + $returnType = '\Avalara\SDK\Model\A1099\V2\PaginatedQueryResultModelW9FormBaseResponse'; $request = $this->listW9FormsRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -1373,6 +1715,7 @@ public function listW9FormsRequest($request_parameters) $skip = $request_parameters->getSkip(); $order_by = $request_parameters->getOrderBy(); $count = $request_parameters->getCount(); + $count_only = $request_parameters->getCountOnly(); $x_correlation_id = $request_parameters->getXCorrelationId(); $x_avalara_client = $request_parameters->getXAvalaraClient(); @@ -1445,6 +1788,17 @@ public function listW9FormsRequest($request_parameters) $queryParams['count'] = $count; } } + // query params + if ($count_only !== null) { + if('form' === 'form' && is_array($count_only)) { + foreach($count_only as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['countOnly'] = $count_only; + } + } // header params if ($avalara_version !== null) { @@ -1471,7 +1825,7 @@ public function listW9FormsRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1529,7 +1883,7 @@ public function listW9FormsRequest($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf|\Avalara\SDK\Model\A1099\V2\ErrorModel|string + * @return \Avalara\SDK\Model\A1099\V2\CreateW9Form201Response|\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response|\Avalara\SDK\Model\A1099\V2\ErrorResponse|string */ public function sendW9FormEmail($request_parameters) { @@ -1546,7 +1900,7 @@ public function sendW9FormEmail($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf|\Avalara\SDK\Model\A1099\V2\ErrorModel|string, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\A1099\V2\CreateW9Form201Response|\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response|\Avalara\SDK\Model\A1099\V2\ErrorResponse|string, HTTP status code, HTTP response headers (array of strings) */ public function sendW9FormEmailWithHttpInfo($request_parameters, $isRetry = false) { @@ -1602,7 +1956,7 @@ public function sendW9FormEmailWithHttpInfo($request_parameters, $isRetry = fals switch($statusCode) { case 200: - if ('\Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf' === '\SplFileObject') { + if ('\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1610,12 +1964,25 @@ public function sendW9FormEmailWithHttpInfo($request_parameters, $isRetry = fals $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 201: + if ('\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response', []), $response->getStatusCode(), $response->getHeaders() ]; case 400: - if ('\Avalara\SDK\Model\A1099\V2\ErrorModel' === '\SplFileObject') { + if ('\Avalara\SDK\Model\A1099\V2\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1623,7 +1990,7 @@ public function sendW9FormEmailWithHttpInfo($request_parameters, $isRetry = fals $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\ErrorModel', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1642,7 +2009,7 @@ public function sendW9FormEmailWithHttpInfo($request_parameters, $isRetry = fals ]; } - $returnType = '\Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf'; + $returnType = '\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1661,7 +2028,15 @@ public function sendW9FormEmailWithHttpInfo($request_parameters, $isRetry = fals case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf', + '\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1669,7 +2044,7 @@ public function sendW9FormEmailWithHttpInfo($request_parameters, $isRetry = fals case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\A1099\V2\ErrorModel', + '\Avalara\SDK\Model\A1099\V2\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1720,7 +2095,7 @@ function ($response) { public function sendW9FormEmailAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf'; + $returnType = '\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response'; $request = $this->sendW9FormEmailRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -1842,7 +2217,7 @@ public function sendW9FormEmailRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1900,7 +2275,7 @@ public function sendW9FormEmailRequest($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf|\Avalara\SDK\Model\A1099\V2\ErrorModel|string + * @return \Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse */ public function updateW9Form($request_parameters) { @@ -1917,7 +2292,7 @@ public function updateW9Form($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf|\Avalara\SDK\Model\A1099\V2\ErrorModel|string, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function updateW9FormWithHttpInfo($request_parameters, $isRetry = false) { @@ -1986,7 +2361,7 @@ public function updateW9FormWithHttpInfo($request_parameters, $isRetry = false) $response->getHeaders() ]; case 400: - if ('\Avalara\SDK\Model\A1099\V2\ErrorModel' === '\SplFileObject') { + if ('\Avalara\SDK\Model\A1099\V2\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -1994,12 +2369,12 @@ public function updateW9FormWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\ErrorModel', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; - case 401: - if ('string' === '\SplFileObject') { + case 404: + if ('\Avalara\SDK\Model\A1099\V2\ErrorResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -2007,7 +2382,7 @@ public function updateW9FormWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, 'string', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -2040,15 +2415,15 @@ public function updateW9FormWithHttpInfo($request_parameters, $isRetry = false) case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\A1099\V2\ErrorModel', + '\Avalara\SDK\Model\A1099\V2\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 401: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'string', + '\Avalara\SDK\Model\A1099\V2\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2214,7 +2589,7 @@ public function updateW9FormRequest($request_parameters) ['application/json', 'text/json', 'application/*+json'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -2538,7 +2913,7 @@ public function uploadW9FilesRequest($request_parameters) ['multipart/form-data'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -2588,6 +2963,52 @@ public function uploadW9FilesRequest($request_parameters) } } + /** + * Represents the Request object for the CreateAndSendW9FormEmail API + * + * @param string $avalara_version API version (required) + * @param string $x_correlation_id Unique correlation Id in a GUID format (optional) + * @param string $x_avalara_client Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + * @param \Avalara\SDK\Model\A1099\V2\CreateAndSendW9FormEmailRequest $create_and_send_w9_form_email_request Form to be created (optional) + */ +class CreateAndSendW9FormEmailRequestSdk { + private $avalara_version; + private $x_correlation_id; + private $x_avalara_client; + private $create_and_send_w9_form_email_request; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '2.0'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getCreateAndSendW9FormEmailRequest() { + return $this->create_and_send_w9_form_email_request; + } + + public function setCreateAndSendW9FormEmailRequest($create_and_send_w9_form_email_request) { + $this->create_and_send_w9_form_email_request = $create_and_send_w9_form_email_request; + } +} + /** * Represents the Request object for the CreateW9Form API * @@ -2730,11 +3151,12 @@ public function setXAvalaraClient($x_avalara_client) { * Represents the Request object for the ListW9Forms API * * @param string $avalara_version API version (required) - * @param string $filter A filter statement to identify specific records to retrieve. For more information on filtering, see <a href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</a>. (optional) - * @param int $top If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. (optional, default to 10) - * @param int $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional, default to 0) + * @param string $filter A filter statement to identify specific records to retrieve. For more information on filtering, see <a href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</a>. (optional) + * @param int $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) + * @param int $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) * @param string $order_by A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) - * @param bool $count When true, returns a @recordSetCount in the result set (optional) + * @param bool $count If true, return the global count of elements in the collection. (optional) + * @param bool $count_only If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) * @param string $x_correlation_id Unique correlation Id in a GUID format (optional) * @param string $x_avalara_client Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) */ @@ -2745,6 +3167,7 @@ class ListW9FormsRequestSdk { private $skip; private $order_by; private $count; + private $count_only; private $x_correlation_id; private $x_avalara_client; @@ -2792,6 +3215,13 @@ public function getCount() { public function setCount($count) { $this->count = $count; } + public function getCountOnly() { + return $this->count_only; + } + + public function setCountOnly($count_only) { + $this->count_only = $count_only; + } public function getXCorrelationId() { return $this->x_correlation_id; } diff --git a/lib/API/A1099/V2/Issuers1099Api.php b/lib/API/A1099/V2/Issuers1099Api.php index 1f6d82a..1de6a25 100644 --- a/lib/API/A1099/V2/Issuers1099Api.php +++ b/lib/API/A1099/V2/Issuers1099Api.php @@ -79,7 +79,7 @@ public function __construct(ApiClient $client ) private function setConfiguration($client): void { $this->verifyAPIClient($client); - $client->setSdkVersion("25.8.1"); + $client->setSdkVersion("25.8.3"); $this->headerSelector = new HeaderSelector(); $this->client = $client; } @@ -381,7 +381,7 @@ public function createIssuerRequest($request_parameters) $avalara_version = $request_parameters->getAvalaraVersion(); $x_correlation_id = $request_parameters->getXCorrelationId(); $x_avalara_client = $request_parameters->getXAvalaraClient(); - $issuer_command = $request_parameters->getIssuerCommand(); + $create_issuer_request = $request_parameters->getCreateIssuerRequest(); // verify the required parameter 'avalara_version' is set if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { @@ -423,16 +423,16 @@ public function createIssuerRequest($request_parameters) ['application/json', 'text/json', 'application/*+json'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; // for model (json/xml) - if (isset($issuer_command)) { + if (isset($create_issuer_request)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($issuer_command)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($create_issuer_request)); } else { - $httpBody = $issuer_command; + $httpBody = $create_issuer_request; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -726,7 +726,7 @@ public function deleteIssuerRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1097,7 +1097,7 @@ public function getIssuerRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1567,7 +1567,7 @@ public function getIssuersRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1809,7 +1809,7 @@ public function updateIssuerRequest($request_parameters) $avalara_version = $request_parameters->getAvalaraVersion(); $x_correlation_id = $request_parameters->getXCorrelationId(); $x_avalara_client = $request_parameters->getXAvalaraClient(); - $issuer_command = $request_parameters->getIssuerCommand(); + $create_issuer_request = $request_parameters->getCreateIssuerRequest(); // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { @@ -1865,16 +1865,16 @@ public function updateIssuerRequest($request_parameters) ['application/json', 'text/json', 'application/*+json'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; // for model (json/xml) - if (isset($issuer_command)) { + if (isset($create_issuer_request)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($issuer_command)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($create_issuer_request)); } else { - $httpBody = $issuer_command; + $httpBody = $create_issuer_request; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -1927,13 +1927,13 @@ public function updateIssuerRequest($request_parameters) * @param string $avalara_version API version (required) * @param string $x_correlation_id Unique correlation Id in a GUID format (optional) * @param string $x_avalara_client Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param \Avalara\SDK\Model\A1099\V2\IssuerCommand $issuer_command The issuer to create (optional) + * @param \Avalara\SDK\Model\A1099\V2\CreateIssuerRequest $create_issuer_request The issuer to create (optional) */ class CreateIssuerRequestSdk { private $avalara_version; private $x_correlation_id; private $x_avalara_client; - private $issuer_command; + private $create_issuer_request; public function __construct() { } @@ -1958,12 +1958,12 @@ public function getXAvalaraClient() { public function setXAvalaraClient($x_avalara_client) { $this->x_avalara_client = $x_avalara_client; } - public function getIssuerCommand() { - return $this->issuer_command; + public function getCreateIssuerRequest() { + return $this->create_issuer_request; } - public function setIssuerCommand($issuer_command) { - $this->issuer_command = $issuer_command; + public function setCreateIssuerRequest($create_issuer_request) { + $this->create_issuer_request = $create_issuer_request; } } @@ -2157,14 +2157,14 @@ public function setXAvalaraClient($x_avalara_client) { * @param string $avalara_version API version (required) * @param string $x_correlation_id Unique correlation Id in a GUID format (optional) * @param string $x_avalara_client Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param \Avalara\SDK\Model\A1099\V2\IssuerCommand $issuer_command The issuer to update (optional) + * @param \Avalara\SDK\Model\A1099\V2\CreateIssuerRequest $create_issuer_request The issuer to update (optional) */ class UpdateIssuerRequestSdk { private $id; private $avalara_version; private $x_correlation_id; private $x_avalara_client; - private $issuer_command; + private $create_issuer_request; public function __construct() { } @@ -2196,12 +2196,12 @@ public function getXAvalaraClient() { public function setXAvalaraClient($x_avalara_client) { $this->x_avalara_client = $x_avalara_client; } - public function getIssuerCommand() { - return $this->issuer_command; + public function getCreateIssuerRequest() { + return $this->create_issuer_request; } - public function setIssuerCommand($issuer_command) { - $this->issuer_command = $issuer_command; + public function setCreateIssuerRequest($create_issuer_request) { + $this->create_issuer_request = $create_issuer_request; } } diff --git a/lib/API/A1099/V2/Jobs1099Api.php b/lib/API/A1099/V2/JobsApi.php similarity index 95% rename from lib/API/A1099/V2/Jobs1099Api.php rename to lib/API/A1099/V2/JobsApi.php index ec17a36..1a79c47 100644 --- a/lib/API/A1099/V2/Jobs1099Api.php +++ b/lib/API/A1099/V2/JobsApi.php @@ -1,6 +1,6 @@ verifyAPIClient($client); - $client->setSdkVersion("25.8.1"); + $client->setSdkVersion("25.8.3"); $this->headerSelector = new HeaderSelector(); $this->client = $client; } @@ -124,7 +124,7 @@ public function getConfig() * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\A1099\V2\JobResult|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse + * @return \Avalara\SDK\Model\A1099\V2\JobResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse */ public function getJob($request_parameters) { @@ -141,7 +141,7 @@ public function getJob($request_parameters) * * @throws \Avalara\SDK\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\A1099\V2\JobResult|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Avalara\SDK\Model\A1099\V2\JobResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse|\Avalara\SDK\Model\A1099\V2\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function getJobWithHttpInfo($request_parameters, $isRetry = false) { @@ -197,7 +197,7 @@ public function getJobWithHttpInfo($request_parameters, $isRetry = false) switch($statusCode) { case 200: - if ('\Avalara\SDK\Model\A1099\V2\JobResult' === '\SplFileObject') { + if ('\Avalara\SDK\Model\A1099\V2\JobResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); @@ -205,7 +205,7 @@ public function getJobWithHttpInfo($request_parameters, $isRetry = false) $logObject->populateResponseInfo($content, $response); $this->client->logger->info(json_encode($logObject)); return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\JobResult', []), + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\A1099\V2\JobResponse', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -250,7 +250,7 @@ public function getJobWithHttpInfo($request_parameters, $isRetry = false) ]; } - $returnType = '\Avalara\SDK\Model\A1099\V2\JobResult'; + $returnType = '\Avalara\SDK\Model\A1099\V2\JobResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -269,7 +269,7 @@ public function getJobWithHttpInfo($request_parameters, $isRetry = false) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Avalara\SDK\Model\A1099\V2\JobResult', + '\Avalara\SDK\Model\A1099\V2\JobResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -336,7 +336,7 @@ function ($response) { public function getJobAsyncWithHttpInfo($request_parameters, $isRetry = false) { $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\A1099\V2\JobResult'; + $returnType = '\Avalara\SDK\Model\A1099\V2\JobResponse'; $request = $this->getJobRequest($request_parameters); $logObject->populateRequestInfo($request); return $this->client @@ -417,7 +417,7 @@ public function getJobRequest($request_parameters) ); } - $resourcePath = '/1099/jobs/{id}'; + $resourcePath = '/jobs/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -458,7 +458,7 @@ public function getJobRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; diff --git a/lib/API/EInvoicing/V1/DataInputFieldsApi.php b/lib/API/EInvoicing/V1/DataInputFieldsApi.php index 72db277..8058713 100644 --- a/lib/API/EInvoicing/V1/DataInputFieldsApi.php +++ b/lib/API/EInvoicing/V1/DataInputFieldsApi.php @@ -1,602 +1,602 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - - - -namespace Avalara\SDK\API\EInvoicing\V1; - -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Exception\ConnectException; -use GuzzleHttp\Psr7\MultipartStream; -use GuzzleHttp\Psr7\Request; -use GuzzleHttp\RequestOptions; -use Avalara\SDK\ApiClient; -use Avalara\SDK\ApiException; -use Avalara\SDK\Configuration; -use Avalara\SDK\HeaderSelector; -use Avalara\SDK\ObjectSerializer; -use Avalara\SDK\Utils\LogObject; - -class DataInputFieldsApi -{ - /** - * @var ApiClient - */ - protected $client; - - /** - * @var Configuration - */ - protected $config; - - /** - * @var HeaderSelector - */ - protected $headerSelector; - - /** - * @param ApiClient $client - */ - public function __construct(ApiClient $client ) - { - $this->setConfiguration($client); - } - - /** - * Set APIClient Configuration - * - * @param APIClient $client - */ - private function setConfiguration($client): void - { - $this->verifyAPIClient($client); - $client->setSdkVersion("25.8.1"); - $this->headerSelector = new HeaderSelector(); - $this->client = $client; - } - - /** - * Verify APIClient object - * - * @param int $client - */ - private function verifyAPIClient($client): void - { - if (is_null($client)){ - throw new ApiException("APIClient not defined"); - } - } - - - /** - * Set the HeaderSelector - * - * @param HeaderSelector $selector (required) - */ - public function setHeaderSelector($selector): void - { - $this->headerSelector = $selector ?: new HeaderSelector(); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->client->config; - } - - /** - * Operation getDataInputFields - * - * Returns the optionality of document fields for different country mandates - * - * @param GetDataInputFieldsRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError - */ - public function getDataInputFields($request_parameters) - { - list($response) = $this->getDataInputFieldsWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation getDataInputFieldsWithHttpInfo - * - * Returns the optionality of document fields for different country mandates - * - * @param GetDataInputFieldsRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) - */ - public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->getDataInputFieldsRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->getDataInputFieldsWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getDataInputFieldsAsync - * - * Returns the optionality of document fields for different country mandates - * - * @param GetDataInputFieldsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getDataInputFieldsAsync($request_parameters) - { - return $this->getDataInputFieldsAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getDataInputFieldsAsyncWithHttpInfo - * - * Returns the optionality of document fields for different country mandates - * - * @param GetDataInputFieldsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getDataInputFieldsAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse'; - $request = $this->getDataInputFieldsRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->getDataInputFieldsAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getDataInputFields' - * - * @param GetDataInputFieldsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function getDataInputFieldsRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $filter = $request_parameters->getFilter(); - $top = $request_parameters->getTop(); - $skip = $request_parameters->getSkip(); - $count = $request_parameters->getCount(); - $count_only = $request_parameters->getCountOnly(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling getDataInputFields' - ); - } - - $resourcePath = '/einvoicing/data-input-fields'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($filter !== null) { - if('form' === 'form' && is_array($filter)) { - foreach($filter as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$filter'] = $filter; - } - } - // query params - if ($top !== null) { - if('form' === 'form' && is_array($top)) { - foreach($top as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$top'] = $top; - } - } - // query params - if ($skip !== null) { - if('form' === 'form' && is_array($skip)) { - foreach($skip as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$skip'] = $skip; - } - } - // query params - if ($count !== null) { - if('form' === 'form' && is_array($count)) { - foreach($count as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$count'] = $count; - } - } - // query params - if ($count_only !== null) { - if('form' === 'form' && is_array($count_only)) { - foreach($count_only as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$countOnly'] = $count_only; - } - } - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'GET', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - -} - /** - * Represents the Request object for the GetDataInputFields API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) - * @param string $filter Filter by field name and value. This filter only supports <code>eq</code> and <code>contains</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. (optional) - * @param int $top The number of items to include in the result. (optional) - * @param int $skip The number of items to skip in the result. (optional) - * @param bool $count When set to true, the count of the collection is also returned in the response body (optional) - * @param bool $count_only When set to true, only the count of the collection is returned (optional) - */ -class GetDataInputFieldsRequestSdk { - private $avalara_version; - private $x_avalara_client; - private $filter; - private $top; - private $skip; - private $count; - private $count_only; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getFilter() { - return $this->filter; - } - - public function setFilter($filter) { - $this->filter = $filter; - } - public function getTop() { - return $this->top; - } - - public function setTop($top) { - $this->top = $top; - } - public function getSkip() { - return $this->skip; - } - - public function setSkip($skip) { - $this->skip = $skip; - } - public function getCount() { - return $this->count; - } - - public function setCount($count) { - $this->count = $count; - } - public function getCountOnly() { - return $this->count_only; - } - - public function setCountOnly($count_only) { - $this->count_only = $count_only; - } -} - + + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + + + +namespace Avalara\SDK\API\EInvoicing\V1; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Exception\ConnectException; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Avalara\SDK\ApiClient; +use Avalara\SDK\ApiException; +use Avalara\SDK\Configuration; +use Avalara\SDK\HeaderSelector; +use Avalara\SDK\ObjectSerializer; +use Avalara\SDK\Utils\LogObject; + +class DataInputFieldsApi +{ + /** + * @var ApiClient + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @param ApiClient $client + */ + public function __construct(ApiClient $client ) + { + $this->setConfiguration($client); + } + + /** + * Set APIClient Configuration + * + * @param APIClient $client + */ + private function setConfiguration($client): void + { + $this->verifyAPIClient($client); + $client->setSdkVersion("25.8.3"); + $this->headerSelector = new HeaderSelector(); + $this->client = $client; + } + + /** + * Verify APIClient object + * + * @param int $client + */ + private function verifyAPIClient($client): void + { + if (is_null($client)){ + throw new ApiException("APIClient not defined"); + } + } + + + /** + * Set the HeaderSelector + * + * @param HeaderSelector $selector (required) + */ + public function setHeaderSelector($selector): void + { + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->client->config; + } + + /** + * Operation getDataInputFields + * + * Returns the optionality of document fields for different country mandates + * + * @param GetDataInputFieldsRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError + */ + public function getDataInputFields($request_parameters) + { + list($response) = $this->getDataInputFieldsWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation getDataInputFieldsWithHttpInfo + * + * Returns the optionality of document fields for different country mandates + * + * @param GetDataInputFieldsRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) + */ + public function getDataInputFieldsWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->getDataInputFieldsRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->getDataInputFieldsWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getDataInputFieldsAsync + * + * Returns the optionality of document fields for different country mandates + * + * @param GetDataInputFieldsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDataInputFieldsAsync($request_parameters) + { + return $this->getDataInputFieldsAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getDataInputFieldsAsyncWithHttpInfo + * + * Returns the optionality of document fields for different country mandates + * + * @param GetDataInputFieldsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDataInputFieldsAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DataInputFieldsResponse'; + $request = $this->getDataInputFieldsRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->getDataInputFieldsAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getDataInputFields' + * + * @param GetDataInputFieldsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getDataInputFieldsRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $filter = $request_parameters->getFilter(); + $top = $request_parameters->getTop(); + $skip = $request_parameters->getSkip(); + $count = $request_parameters->getCount(); + $count_only = $request_parameters->getCountOnly(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling getDataInputFields' + ); + } + + $resourcePath = '/einvoicing/data-input-fields'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($filter !== null) { + if('form' === 'form' && is_array($filter)) { + foreach($filter as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$filter'] = $filter; + } + } + // query params + if ($top !== null) { + if('form' === 'form' && is_array($top)) { + foreach($top as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$top'] = $top; + } + } + // query params + if ($skip !== null) { + if('form' === 'form' && is_array($skip)) { + foreach($skip as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$skip'] = $skip; + } + } + // query params + if ($count !== null) { + if('form' === 'form' && is_array($count)) { + foreach($count as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$count'] = $count; + } + } + // query params + if ($count_only !== null) { + if('form' === 'form' && is_array($count_only)) { + foreach($count_only as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$countOnly'] = $count_only; + } + } + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'GET', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + +} + /** + * Represents the Request object for the GetDataInputFields API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) + * @param string $filter Filter by field name and value. This filter only supports <code>eq</code> and <code>contains</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. (optional) + * @param int $top The number of items to include in the result. (optional) + * @param int $skip The number of items to skip in the result. (optional) + * @param bool $count When set to true, the count of the collection is also returned in the response body (optional) + * @param bool $count_only When set to true, only the count of the collection is returned (optional) + */ +class GetDataInputFieldsRequestSdk { + private $avalara_version; + private $x_avalara_client; + private $filter; + private $top; + private $skip; + private $count; + private $count_only; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getFilter() { + return $this->filter; + } + + public function setFilter($filter) { + $this->filter = $filter; + } + public function getTop() { + return $this->top; + } + + public function setTop($top) { + $this->top = $top; + } + public function getSkip() { + return $this->skip; + } + + public function setSkip($skip) { + $this->skip = $skip; + } + public function getCount() { + return $this->count; + } + + public function setCount($count) { + $this->count = $count; + } + public function getCountOnly() { + return $this->count_only; + } + + public function setCountOnly($count_only) { + $this->count_only = $count_only; + } +} + diff --git a/lib/API/EInvoicing/V1/DocumentsApi.php b/lib/API/EInvoicing/V1/DocumentsApi.php index 25988c6..3aa098a 100644 --- a/lib/API/EInvoicing/V1/DocumentsApi.php +++ b/lib/API/EInvoicing/V1/DocumentsApi.php @@ -1,2332 +1,2332 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - - - -namespace Avalara\SDK\API\EInvoicing\V1; - -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Exception\ConnectException; -use GuzzleHttp\Psr7\MultipartStream; -use GuzzleHttp\Psr7\Request; -use GuzzleHttp\RequestOptions; -use Avalara\SDK\ApiClient; -use Avalara\SDK\ApiException; -use Avalara\SDK\Configuration; -use Avalara\SDK\HeaderSelector; -use Avalara\SDK\ObjectSerializer; -use Avalara\SDK\Utils\LogObject; - -class DocumentsApi -{ - /** - * @var ApiClient - */ - protected $client; - - /** - * @var Configuration - */ - protected $config; - - /** - * @var HeaderSelector - */ - protected $headerSelector; - - /** - * @param ApiClient $client - */ - public function __construct(ApiClient $client ) - { - $this->setConfiguration($client); - } - - /** - * Set APIClient Configuration - * - * @param APIClient $client - */ - private function setConfiguration($client): void - { - $this->verifyAPIClient($client); - $client->setSdkVersion("25.8.1"); - $this->headerSelector = new HeaderSelector(); - $this->client = $client; - } - - /** - * Verify APIClient object - * - * @param int $client - */ - private function verifyAPIClient($client): void - { - if (is_null($client)){ - throw new ApiException("APIClient not defined"); - } - } - - - /** - * Set the HeaderSelector - * - * @param HeaderSelector $selector (required) - */ - public function setHeaderSelector($selector): void - { - $this->headerSelector = $selector ?: new HeaderSelector(); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->client->config; - } - - /** - * Operation downloadDocument - * - * Returns a copy of the document - * - * @param DownloadDocumentRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest - */ - public function downloadDocument($request_parameters) - { - list($response) = $this->downloadDocumentWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation downloadDocumentWithHttpInfo - * - * Returns a copy of the document - * - * @param DownloadDocumentRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest, HTTP status code, HTTP response headers (array of strings) - */ - public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->downloadDocumentRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->downloadDocumentWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\SplFileObject' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 406: - if ('\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\SplFileObject'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SplFileObject', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 406: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation downloadDocumentAsync - * - * Returns a copy of the document - * - * @param DownloadDocumentRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function downloadDocumentAsync($request_parameters) - { - return $this->downloadDocumentAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation downloadDocumentAsyncWithHttpInfo - * - * Returns a copy of the document - * - * @param DownloadDocumentRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function downloadDocumentAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\SplFileObject'; - $request = $this->downloadDocumentRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->downloadDocumentAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'downloadDocument' - * - * @param DownloadDocumentRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function downloadDocumentRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $accept = $request_parameters->getAccept(); - $document_id = $request_parameters->getDocumentId(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling downloadDocument' - ); - } - // verify the required parameter 'accept' is set - if ($accept === null || (is_array($accept) && count($accept) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $accept when calling downloadDocument' - ); - } - // verify the required parameter 'document_id' is set - if ($document_id === null || (is_array($document_id) && count($document_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $document_id when calling downloadDocument' - ); - } - - $resourcePath = '/einvoicing/documents/{documentId}/$download'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($accept !== null) { - $headerParams['Accept'] = ObjectSerializer::toHeaderValue($accept); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - - // path params - if ($document_id !== null) { - $resourcePath = str_replace( - '{' . 'documentId' . '}', - ObjectSerializer::toPathValue($document_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/pdf', 'application/xml', 'application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/pdf', 'application/xml', 'application/json'], - [] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'GET', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation fetchDocuments - * - * Fetch the inbound document from a tax authority - * - * @param FetchDocumentsRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentFetch|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError - */ - public function fetchDocuments($request_parameters) - { - list($response) = $this->fetchDocumentsWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation fetchDocumentsWithHttpInfo - * - * Fetch the inbound document from a tax authority - * - * @param FetchDocumentsRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentFetch|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) - */ - public function fetchDocumentsWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->fetchDocumentsRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->fetchDocumentsWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation fetchDocumentsAsync - * - * Fetch the inbound document from a tax authority - * - * @param FetchDocumentsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function fetchDocumentsAsync($request_parameters) - { - return $this->fetchDocumentsAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation fetchDocumentsAsyncWithHttpInfo - * - * Fetch the inbound document from a tax authority - * - * @param FetchDocumentsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function fetchDocumentsAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch'; - $request = $this->fetchDocumentsRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->fetchDocumentsAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'fetchDocuments' - * - * @param FetchDocumentsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function fetchDocumentsRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $fetch_documents_request = $request_parameters->getFetchDocumentsRequest(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling fetchDocuments' - ); - } - // verify the required parameter 'fetch_documents_request' is set - if ($fetch_documents_request === null || (is_array($fetch_documents_request) && count($fetch_documents_request) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $fetch_documents_request when calling fetchDocuments' - ); - } - - $resourcePath = '/einvoicing/documents/$fetch'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (isset($fetch_documents_request)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($fetch_documents_request)); - } else { - $httpBody = $fetch_documents_request; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'POST', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getDocumentList - * - * Returns a summary of documents for a date range - * - * @param GetDocumentListRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError - */ - public function getDocumentList($request_parameters) - { - list($response) = $this->getDocumentListWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation getDocumentListWithHttpInfo - * - * Returns a summary of documents for a date range - * - * @param GetDocumentListRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError, HTTP status code, HTTP response headers (array of strings) - */ - public function getDocumentListWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->getDocumentListRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->getDocumentListWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Avalara\SDK\Model\EInvoicing\V1\BadRequest' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getDocumentListAsync - * - * Returns a summary of documents for a date range - * - * @param GetDocumentListRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getDocumentListAsync($request_parameters) - { - return $this->getDocumentListAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getDocumentListAsyncWithHttpInfo - * - * Returns a summary of documents for a date range - * - * @param GetDocumentListRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getDocumentListAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse'; - $request = $this->getDocumentListRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->getDocumentListAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getDocumentList' - * - * @param GetDocumentListRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function getDocumentListRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $start_date = $request_parameters->getStartDate(); - $end_date = $request_parameters->getEndDate(); - $flow = $request_parameters->getFlow(); - $count = $request_parameters->getCount(); - $count_only = $request_parameters->getCountOnly(); - $filter = $request_parameters->getFilter(); - $top = $request_parameters->getTop(); - $skip = $request_parameters->getSkip(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling getDocumentList' - ); - } - - $resourcePath = '/einvoicing/documents'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($start_date !== null) { - if('form' === 'form' && is_array($start_date)) { - foreach($start_date as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['startDate'] = $start_date; - } - } - // query params - if ($end_date !== null) { - if('form' === 'form' && is_array($end_date)) { - foreach($end_date as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['endDate'] = $end_date; - } - } - // query params - if ($flow !== null) { - if('form' === 'form' && is_array($flow)) { - foreach($flow as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['flow'] = $flow; - } - } - // query params - if ($count !== null) { - if('form' === 'form' && is_array($count)) { - foreach($count as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$count'] = $count; - } - } - // query params - if ($count_only !== null) { - if('form' === 'form' && is_array($count_only)) { - foreach($count_only as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$countOnly'] = $count_only; - } - } - // query params - if ($filter !== null) { - if('form' === 'form' && is_array($filter)) { - foreach($filter as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$filter'] = $filter; - } - } - // query params - if ($top !== null) { - if('form' === 'form' && is_array($top)) { - foreach($top as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$top'] = $top; - } - } - // query params - if ($skip !== null) { - if('form' === 'form' && is_array($skip)) { - foreach($skip as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$skip'] = $skip; - } - } - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'GET', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getDocumentStatus - * - * Checks the status of a document - * - * @param GetDocumentStatusRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError - */ - public function getDocumentStatus($request_parameters) - { - list($response) = $this->getDocumentStatusWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation getDocumentStatusWithHttpInfo - * - * Checks the status of a document - * - * @param GetDocumentStatusRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError, HTTP status code, HTTP response headers (array of strings) - */ - public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->getDocumentStatusRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->getDocumentStatusWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getDocumentStatusAsync - * - * Checks the status of a document - * - * @param GetDocumentStatusRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getDocumentStatusAsync($request_parameters) - { - return $this->getDocumentStatusAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getDocumentStatusAsyncWithHttpInfo - * - * Checks the status of a document - * - * @param GetDocumentStatusRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getDocumentStatusAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse'; - $request = $this->getDocumentStatusRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->getDocumentStatusAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getDocumentStatus' - * - * @param GetDocumentStatusRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function getDocumentStatusRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $document_id = $request_parameters->getDocumentId(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling getDocumentStatus' - ); - } - // verify the required parameter 'document_id' is set - if ($document_id === null || (is_array($document_id) && count($document_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $document_id when calling getDocumentStatus' - ); - } - - $resourcePath = '/einvoicing/documents/{documentId}/status'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - - // path params - if ($document_id !== null) { - $resourcePath = str_replace( - '{' . 'documentId' . '}', - ObjectSerializer::toPathValue($document_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'GET', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation submitDocument - * - * Submits a document to Avalara E-Invoicing API - * - * @param SubmitDocumentRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse|\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError - */ - public function submitDocument($request_parameters) - { - list($response) = $this->submitDocumentWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation submitDocumentWithHttpInfo - * - * Submits a document to Avalara E-Invoicing API - * - * @param SubmitDocumentRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse|\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError, HTTP status code, HTTP response headers (array of strings) - */ - public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->submitDocumentRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->submitDocumentWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 201: - if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation submitDocumentAsync - * - * Submits a document to Avalara E-Invoicing API - * - * @param SubmitDocumentRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function submitDocumentAsync($request_parameters) - { - return $this->submitDocumentAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation submitDocumentAsyncWithHttpInfo - * - * Submits a document to Avalara E-Invoicing API - * - * @param SubmitDocumentRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function submitDocumentAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse'; - $request = $this->submitDocumentRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->submitDocumentAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'submitDocument' - * - * @param SubmitDocumentRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function submitDocumentRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $metadata = $request_parameters->getMetadata(); - $data = $request_parameters->getData(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling submitDocument' - ); - } - // verify the required parameter 'metadata' is set - if ($metadata === null || (is_array($metadata) && count($metadata) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $metadata when calling submitDocument' - ); - } - // verify the required parameter 'data' is set - if ($data === null || (is_array($data) && count($data) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $data when calling submitDocument' - ); - } - - $resourcePath = '/einvoicing/documents'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - - - // form params - if ($metadata !== null) { - $formParams['metadata'] = ObjectSerializer::toFormValue($metadata); - } - // form params - if ($data !== null) { - $formParams['data'] = ObjectSerializer::toFormValue($data); - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'text/xml'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/xml'], - ['multipart/form-data'] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'POST', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - -} - /** - * Represents the Request object for the DownloadDocument API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param string $accept This header indicates the MIME type of the document (required) - * @param string $document_id The unique ID for this document that was returned in the POST /einvoicing/document response body (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) - */ -class DownloadDocumentRequestSdk { - private $avalara_version; - private $accept; - private $document_id; - private $x_avalara_client; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getAccept() { - return $this->accept; - } - - public function setAccept($accept) { - $this->accept = $accept; - } - public function getDocumentId() { - return $this->document_id; - } - - public function setDocumentId($document_id) { - $this->document_id = $document_id; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } -} - - /** - * Represents the Request object for the FetchDocuments API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param \Avalara\SDK\Model\EInvoicing\V1\FetchDocumentsRequest $fetch_documents_request fetch_documents_request (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) - */ -class FetchDocumentsRequestSdk { - private $avalara_version; - private $fetch_documents_request; - private $x_avalara_client; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getFetchDocumentsRequest() { - return $this->fetch_documents_request; - } - - public function setFetchDocumentsRequest($fetch_documents_request) { - $this->fetch_documents_request = $fetch_documents_request; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } -} - - /** - * Represents the Request object for the GetDocumentList API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) - * @param \DateTime $start_date Start date of documents to return. This defaults to the previous month. (optional) - * @param \DateTime $end_date End date of documents to return. This defaults to the current date. (optional) - * @param string $flow Optionally filter by document direction, where issued = `out` and received = `in` (optional) - * @param string $count When set to true, the count of the collection is also returned in the response body (optional) - * @param string $count_only When set to true, only the count of the collection is returned (optional) - * @param string $filter Filter by field name and value. This filter only supports <code>eq</code> . Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided startDate and endDate. If no startDate or endDate is provided, defaults will be assumed. (optional) - * @param int $top The number of items to include in the result. (optional) - * @param int $skip The number of items to skip in the result. (optional) - */ -class GetDocumentListRequestSdk { - private $avalara_version; - private $x_avalara_client; - private $start_date; - private $end_date; - private $flow; - private $count; - private $count_only; - private $filter; - private $top; - private $skip; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getStartDate() { - return $this->start_date; - } - - public function setStartDate($start_date) { - $this->start_date = $start_date; - } - public function getEndDate() { - return $this->end_date; - } - - public function setEndDate($end_date) { - $this->end_date = $end_date; - } - public function getFlow() { - return $this->flow; - } - - public function setFlow($flow) { - $this->flow = $flow; - } - public function getCount() { - return $this->count; - } - - public function setCount($count) { - $this->count = $count; - } - public function getCountOnly() { - return $this->count_only; - } - - public function setCountOnly($count_only) { - $this->count_only = $count_only; - } - public function getFilter() { - return $this->filter; - } - - public function setFilter($filter) { - $this->filter = $filter; - } - public function getTop() { - return $this->top; - } - - public function setTop($top) { - $this->top = $top; - } - public function getSkip() { - return $this->skip; - } - - public function setSkip($skip) { - $this->skip = $skip; - } -} - - /** - * Represents the Request object for the GetDocumentStatus API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param string $document_id The unique ID for this document that was returned in the POST /einvoicing/documents response body (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) - */ -class GetDocumentStatusRequestSdk { - private $avalara_version; - private $document_id; - private $x_avalara_client; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getDocumentId() { - return $this->document_id; - } - - public function setDocumentId($document_id) { - $this->document_id = $document_id; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } -} - - /** - * Represents the Request object for the SubmitDocument API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata $metadata metadata (required) - * @param object $data The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) - */ -class SubmitDocumentRequestSdk { - private $avalara_version; - private $metadata; - private $data; - private $x_avalara_client; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getMetadata() { - return $this->metadata; - } - - public function setMetadata($metadata) { - $this->metadata = $metadata; - } - public function getData() { - return $this->data; - } - - public function setData($data) { - $this->data = $data; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } -} - + + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + + + +namespace Avalara\SDK\API\EInvoicing\V1; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Exception\ConnectException; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Avalara\SDK\ApiClient; +use Avalara\SDK\ApiException; +use Avalara\SDK\Configuration; +use Avalara\SDK\HeaderSelector; +use Avalara\SDK\ObjectSerializer; +use Avalara\SDK\Utils\LogObject; + +class DocumentsApi +{ + /** + * @var ApiClient + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @param ApiClient $client + */ + public function __construct(ApiClient $client ) + { + $this->setConfiguration($client); + } + + /** + * Set APIClient Configuration + * + * @param APIClient $client + */ + private function setConfiguration($client): void + { + $this->verifyAPIClient($client); + $client->setSdkVersion("25.8.3"); + $this->headerSelector = new HeaderSelector(); + $this->client = $client; + } + + /** + * Verify APIClient object + * + * @param int $client + */ + private function verifyAPIClient($client): void + { + if (is_null($client)){ + throw new ApiException("APIClient not defined"); + } + } + + + /** + * Set the HeaderSelector + * + * @param HeaderSelector $selector (required) + */ + public function setHeaderSelector($selector): void + { + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->client->config; + } + + /** + * Operation downloadDocument + * + * Returns a copy of the document + * + * @param DownloadDocumentRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest + */ + public function downloadDocument($request_parameters) + { + list($response) = $this->downloadDocumentWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation downloadDocumentWithHttpInfo + * + * Returns a copy of the document + * + * @param DownloadDocumentRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest, HTTP status code, HTTP response headers (array of strings) + */ + public function downloadDocumentWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->downloadDocumentRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->downloadDocumentWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\SplFileObject' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\SplFileObject', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 406: + if ('\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\SplFileObject'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SplFileObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 406: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\BadDownloadRequest', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation downloadDocumentAsync + * + * Returns a copy of the document + * + * @param DownloadDocumentRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function downloadDocumentAsync($request_parameters) + { + return $this->downloadDocumentAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation downloadDocumentAsyncWithHttpInfo + * + * Returns a copy of the document + * + * @param DownloadDocumentRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function downloadDocumentAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\SplFileObject'; + $request = $this->downloadDocumentRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->downloadDocumentAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'downloadDocument' + * + * @param DownloadDocumentRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function downloadDocumentRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $accept = $request_parameters->getAccept(); + $document_id = $request_parameters->getDocumentId(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling downloadDocument' + ); + } + // verify the required parameter 'accept' is set + if ($accept === null || (is_array($accept) && count($accept) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $accept when calling downloadDocument' + ); + } + // verify the required parameter 'document_id' is set + if ($document_id === null || (is_array($document_id) && count($document_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $document_id when calling downloadDocument' + ); + } + + $resourcePath = '/einvoicing/documents/{documentId}/$download'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($accept !== null) { + $headerParams['Accept'] = ObjectSerializer::toHeaderValue($accept); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + + // path params + if ($document_id !== null) { + $resourcePath = str_replace( + '{' . 'documentId' . '}', + ObjectSerializer::toPathValue($document_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/pdf', 'application/xml', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/pdf', 'application/xml', 'application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'GET', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation fetchDocuments + * + * Fetch the inbound document from a tax authority + * + * @param FetchDocumentsRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentFetch|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError + */ + public function fetchDocuments($request_parameters) + { + list($response) = $this->fetchDocumentsWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation fetchDocumentsWithHttpInfo + * + * Fetch the inbound document from a tax authority + * + * @param FetchDocumentsRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentFetch|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) + */ + public function fetchDocumentsWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->fetchDocumentsRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->fetchDocumentsWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation fetchDocumentsAsync + * + * Fetch the inbound document from a tax authority + * + * @param FetchDocumentsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function fetchDocumentsAsync($request_parameters) + { + return $this->fetchDocumentsAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation fetchDocumentsAsyncWithHttpInfo + * + * Fetch the inbound document from a tax authority + * + * @param FetchDocumentsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function fetchDocumentsAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentFetch'; + $request = $this->fetchDocumentsRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->fetchDocumentsAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'fetchDocuments' + * + * @param FetchDocumentsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function fetchDocumentsRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $fetch_documents_request = $request_parameters->getFetchDocumentsRequest(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling fetchDocuments' + ); + } + // verify the required parameter 'fetch_documents_request' is set + if ($fetch_documents_request === null || (is_array($fetch_documents_request) && count($fetch_documents_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $fetch_documents_request when calling fetchDocuments' + ); + } + + $resourcePath = '/einvoicing/documents/$fetch'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (isset($fetch_documents_request)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($fetch_documents_request)); + } else { + $httpBody = $fetch_documents_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'POST', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getDocumentList + * + * Returns a summary of documents for a date range + * + * @param GetDocumentListRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError + */ + public function getDocumentList($request_parameters) + { + list($response) = $this->getDocumentListWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation getDocumentListWithHttpInfo + * + * Returns a summary of documents for a date range + * + * @param GetDocumentListRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError, HTTP status code, HTTP response headers (array of strings) + */ + public function getDocumentListWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->getDocumentListRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->getDocumentListWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\SDK\Model\EInvoicing\V1\BadRequest' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getDocumentListAsync + * + * Returns a summary of documents for a date range + * + * @param GetDocumentListRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDocumentListAsync($request_parameters) + { + return $this->getDocumentListAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getDocumentListAsyncWithHttpInfo + * + * Returns a summary of documents for a date range + * + * @param GetDocumentListRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDocumentListAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentListResponse'; + $request = $this->getDocumentListRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->getDocumentListAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getDocumentList' + * + * @param GetDocumentListRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getDocumentListRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $start_date = $request_parameters->getStartDate(); + $end_date = $request_parameters->getEndDate(); + $flow = $request_parameters->getFlow(); + $count = $request_parameters->getCount(); + $count_only = $request_parameters->getCountOnly(); + $filter = $request_parameters->getFilter(); + $top = $request_parameters->getTop(); + $skip = $request_parameters->getSkip(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling getDocumentList' + ); + } + + $resourcePath = '/einvoicing/documents'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($start_date !== null) { + if('form' === 'form' && is_array($start_date)) { + foreach($start_date as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['startDate'] = $start_date; + } + } + // query params + if ($end_date !== null) { + if('form' === 'form' && is_array($end_date)) { + foreach($end_date as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['endDate'] = $end_date; + } + } + // query params + if ($flow !== null) { + if('form' === 'form' && is_array($flow)) { + foreach($flow as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['flow'] = $flow; + } + } + // query params + if ($count !== null) { + if('form' === 'form' && is_array($count)) { + foreach($count as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$count'] = $count; + } + } + // query params + if ($count_only !== null) { + if('form' === 'form' && is_array($count_only)) { + foreach($count_only as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$countOnly'] = $count_only; + } + } + // query params + if ($filter !== null) { + if('form' === 'form' && is_array($filter)) { + foreach($filter as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$filter'] = $filter; + } + } + // query params + if ($top !== null) { + if('form' === 'form' && is_array($top)) { + foreach($top as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$top'] = $top; + } + } + // query params + if ($skip !== null) { + if('form' === 'form' && is_array($skip)) { + foreach($skip as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$skip'] = $skip; + } + } + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'GET', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getDocumentStatus + * + * Checks the status of a document + * + * @param GetDocumentStatusRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError + */ + public function getDocumentStatus($request_parameters) + { + list($response) = $this->getDocumentStatusWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation getDocumentStatusWithHttpInfo + * + * Checks the status of a document + * + * @param GetDocumentStatusRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError, HTTP status code, HTTP response headers (array of strings) + */ + public function getDocumentStatusWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->getDocumentStatusRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->getDocumentStatusWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getDocumentStatusAsync + * + * Checks the status of a document + * + * @param GetDocumentStatusRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDocumentStatusAsync($request_parameters) + { + return $this->getDocumentStatusAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getDocumentStatusAsyncWithHttpInfo + * + * Checks the status of a document + * + * @param GetDocumentStatusRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDocumentStatusAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentStatusResponse'; + $request = $this->getDocumentStatusRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->getDocumentStatusAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getDocumentStatus' + * + * @param GetDocumentStatusRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getDocumentStatusRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $document_id = $request_parameters->getDocumentId(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling getDocumentStatus' + ); + } + // verify the required parameter 'document_id' is set + if ($document_id === null || (is_array($document_id) && count($document_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $document_id when calling getDocumentStatus' + ); + } + + $resourcePath = '/einvoicing/documents/{documentId}/status'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + + // path params + if ($document_id !== null) { + $resourcePath = str_replace( + '{' . 'documentId' . '}', + ObjectSerializer::toPathValue($document_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'GET', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation submitDocument + * + * Submits a document to Avalara E-Invoicing API + * + * @param SubmitDocumentRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse|\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError + */ + public function submitDocument($request_parameters) + { + list($response) = $this->submitDocumentWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation submitDocumentWithHttpInfo + * + * Submits a document to Avalara E-Invoicing API + * + * @param SubmitDocumentRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse|\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError, HTTP status code, HTTP response headers (array of strings) + */ + public function submitDocumentWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->submitDocumentRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->submitDocumentWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 201: + if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmissionError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation submitDocumentAsync + * + * Submits a document to Avalara E-Invoicing API + * + * @param SubmitDocumentRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function submitDocumentAsync($request_parameters) + { + return $this->submitDocumentAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation submitDocumentAsyncWithHttpInfo + * + * Submits a document to Avalara E-Invoicing API + * + * @param SubmitDocumentRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function submitDocumentAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\DocumentSubmitResponse'; + $request = $this->submitDocumentRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->submitDocumentAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'submitDocument' + * + * @param SubmitDocumentRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function submitDocumentRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $metadata = $request_parameters->getMetadata(); + $data = $request_parameters->getData(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling submitDocument' + ); + } + // verify the required parameter 'metadata' is set + if ($metadata === null || (is_array($metadata) && count($metadata) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $metadata when calling submitDocument' + ); + } + // verify the required parameter 'data' is set + if ($data === null || (is_array($data) && count($data) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $data when calling submitDocument' + ); + } + + $resourcePath = '/einvoicing/documents'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + + + // form params + if ($metadata !== null) { + $formParams['metadata'] = ObjectSerializer::toFormValue($metadata); + } + // form params + if ($data !== null) { + $formParams['data'] = ObjectSerializer::toFormValue($data); + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/xml'], + ['multipart/form-data'] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'POST', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + +} + /** + * Represents the Request object for the DownloadDocument API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $accept This header indicates the MIME type of the document (required) + * @param string $document_id The unique ID for this document that was returned in the POST /einvoicing/document response body (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) + */ +class DownloadDocumentRequestSdk { + private $avalara_version; + private $accept; + private $document_id; + private $x_avalara_client; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getAccept() { + return $this->accept; + } + + public function setAccept($accept) { + $this->accept = $accept; + } + public function getDocumentId() { + return $this->document_id; + } + + public function setDocumentId($document_id) { + $this->document_id = $document_id; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } +} + + /** + * Represents the Request object for the FetchDocuments API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param \Avalara\SDK\Model\EInvoicing\V1\FetchDocumentsRequest $fetch_documents_request fetch_documents_request (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) + */ +class FetchDocumentsRequestSdk { + private $avalara_version; + private $fetch_documents_request; + private $x_avalara_client; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getFetchDocumentsRequest() { + return $this->fetch_documents_request; + } + + public function setFetchDocumentsRequest($fetch_documents_request) { + $this->fetch_documents_request = $fetch_documents_request; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } +} + + /** + * Represents the Request object for the GetDocumentList API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) + * @param \DateTime $start_date Start date of documents to return. This defaults to the previous month. (optional) + * @param \DateTime $end_date End date of documents to return. This defaults to the current date. (optional) + * @param string $flow Optionally filter by document direction, where issued = `out` and received = `in` (optional) + * @param string $count When set to true, the count of the collection is also returned in the response body (optional) + * @param string $count_only When set to true, only the count of the collection is returned (optional) + * @param string $filter Filter by field name and value. This filter only supports <code>eq</code> . Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided startDate and endDate. If no startDate or endDate is provided, defaults will be assumed. (optional) + * @param int $top The number of items to include in the result. (optional) + * @param int $skip The number of items to skip in the result. (optional) + */ +class GetDocumentListRequestSdk { + private $avalara_version; + private $x_avalara_client; + private $start_date; + private $end_date; + private $flow; + private $count; + private $count_only; + private $filter; + private $top; + private $skip; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getStartDate() { + return $this->start_date; + } + + public function setStartDate($start_date) { + $this->start_date = $start_date; + } + public function getEndDate() { + return $this->end_date; + } + + public function setEndDate($end_date) { + $this->end_date = $end_date; + } + public function getFlow() { + return $this->flow; + } + + public function setFlow($flow) { + $this->flow = $flow; + } + public function getCount() { + return $this->count; + } + + public function setCount($count) { + $this->count = $count; + } + public function getCountOnly() { + return $this->count_only; + } + + public function setCountOnly($count_only) { + $this->count_only = $count_only; + } + public function getFilter() { + return $this->filter; + } + + public function setFilter($filter) { + $this->filter = $filter; + } + public function getTop() { + return $this->top; + } + + public function setTop($top) { + $this->top = $top; + } + public function getSkip() { + return $this->skip; + } + + public function setSkip($skip) { + $this->skip = $skip; + } +} + + /** + * Represents the Request object for the GetDocumentStatus API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $document_id The unique ID for this document that was returned in the POST /einvoicing/documents response body (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) + */ +class GetDocumentStatusRequestSdk { + private $avalara_version; + private $document_id; + private $x_avalara_client; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getDocumentId() { + return $this->document_id; + } + + public function setDocumentId($document_id) { + $this->document_id = $document_id; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } +} + + /** + * Represents the Request object for the SubmitDocument API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param \Avalara\SDK\Model\EInvoicing\V1\SubmitDocumentMetadata $metadata metadata (required) + * @param object $data The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) + */ +class SubmitDocumentRequestSdk { + private $avalara_version; + private $metadata; + private $data; + private $x_avalara_client; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getMetadata() { + return $this->metadata; + } + + public function setMetadata($metadata) { + $this->metadata = $metadata; + } + public function getData() { + return $this->data; + } + + public function setData($data) { + $this->data = $data; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } +} + diff --git a/lib/API/EInvoicing/V1/InteropApi.php b/lib/API/EInvoicing/V1/InteropApi.php index a30b381..a0f9bdf 100644 --- a/lib/API/EInvoicing/V1/InteropApi.php +++ b/lib/API/EInvoicing/V1/InteropApi.php @@ -1,629 +1,629 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - - - -namespace Avalara\SDK\API\EInvoicing\V1; - -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Exception\ConnectException; -use GuzzleHttp\Psr7\MultipartStream; -use GuzzleHttp\Psr7\Request; -use GuzzleHttp\RequestOptions; -use Avalara\SDK\ApiClient; -use Avalara\SDK\ApiException; -use Avalara\SDK\Configuration; -use Avalara\SDK\HeaderSelector; -use Avalara\SDK\ObjectSerializer; -use Avalara\SDK\Utils\LogObject; - -class InteropApi -{ - /** - * @var ApiClient - */ - protected $client; - - /** - * @var Configuration - */ - protected $config; - - /** - * @var HeaderSelector - */ - protected $headerSelector; - - /** - * @param ApiClient $client - */ - public function __construct(ApiClient $client ) - { - $this->setConfiguration($client); - } - - /** - * Set APIClient Configuration - * - * @param APIClient $client - */ - private function setConfiguration($client): void - { - $this->verifyAPIClient($client); - $client->setSdkVersion("25.8.1"); - $this->headerSelector = new HeaderSelector(); - $this->client = $client; - } - - /** - * Verify APIClient object - * - * @param int $client - */ - private function verifyAPIClient($client): void - { - if (is_null($client)){ - throw new ApiException("APIClient not defined"); - } - } - - - /** - * Set the HeaderSelector - * - * @param HeaderSelector $selector (required) - */ - public function setHeaderSelector($selector): void - { - $this->headerSelector = $selector ?: new HeaderSelector(); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->client->config; - } - - /** - * Operation submitInteropDocument - * - * Submit a document - * - * @param SubmitInteropDocumentRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse - */ - public function submitInteropDocument($request_parameters) - { - list($response) = $this->submitInteropDocumentWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation submitInteropDocumentWithHttpInfo - * - * Submit a document - * - * @param SubmitInteropDocumentRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->submitInteropDocumentRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->submitInteropDocumentWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 202: - if ('\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 202: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation submitInteropDocumentAsync - * - * Submit a document - * - * @param SubmitInteropDocumentRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function submitInteropDocumentAsync($request_parameters) - { - return $this->submitInteropDocumentAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation submitInteropDocumentAsyncWithHttpInfo - * - * Submit a document - * - * @param SubmitInteropDocumentRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function submitInteropDocumentAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response'; - $request = $this->submitInteropDocumentRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->submitInteropDocumentAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'submitInteropDocument' - * - * @param SubmitInteropDocumentRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function submitInteropDocumentRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $document_type = $request_parameters->getDocumentType(); - $interchange_type = $request_parameters->getInterchangeType(); - $avalara_version = $request_parameters->getAvalaraVersion(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $x_correlation_id = $request_parameters->getXCorrelationId(); - $file_name = $request_parameters->getFileName(); - - // verify the required parameter 'document_type' is set - if ($document_type === null || (is_array($document_type) && count($document_type) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $document_type when calling submitInteropDocument' - ); - } - // verify the required parameter 'interchange_type' is set - if ($interchange_type === null || (is_array($interchange_type) && count($interchange_type) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $interchange_type when calling submitInteropDocument' - ); - } - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling submitInteropDocument' - ); - } - - $resourcePath = '/einvoicing/interop/documents'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($document_type !== null) { - if('form' === 'form' && is_array($document_type)) { - foreach($document_type as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['documentType'] = $document_type; - } - } - // query params - if ($interchange_type !== null) { - if('form' === 'form' && is_array($interchange_type)) { - foreach($interchange_type as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['interchangeType'] = $interchange_type; - } - } - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - // header params - if ($x_correlation_id !== null) { - $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); - } - - - // form params - if ($file_name !== null) { - $multipart = true; - $formParams['fileName'] = []; - $paramFiles = is_array($file_name) ? $file_name : [$file_name]; - foreach ($paramFiles as $paramFile) { - $formParams['fileName'][] = \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['multipart/form-data'] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'POST', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - -} - /** - * Represents the Request object for the SubmitInteropDocument API - * - * @param string $document_type Type of the document being uploaded. Partners will be configured in Avalara system to send only certain types of documents. (required) - * @param string $interchange_type Type of interchange (codes in Avalara system that uniquely identifies a type of interchange). Partners will be configured in Avalara system to send documents belonging to certain types of interchanges. (required) - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) - * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) - * @param \SplFileObject $file_name The file to be uploaded (e.g., UBL XML, CII XML). (optional) - */ -class SubmitInteropDocumentRequestSdk { - private $document_type; - private $interchange_type; - private $avalara_version; - private $x_avalara_client; - private $x_correlation_id; - private $file_name; - - public function __construct() { - } - public function getDocumentType() { - return $this->document_type; - } - - public function setDocumentType($document_type) { - $this->document_type = $document_type; - } - public function getInterchangeType() { - return $this->interchange_type; - } - - public function setInterchangeType($interchange_type) { - $this->interchange_type = $interchange_type; - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getXCorrelationId() { - return $this->x_correlation_id; - } - - public function setXCorrelationId($x_correlation_id) { - $this->x_correlation_id = $x_correlation_id; - } - public function getFileName() { - return $this->file_name; - } - - public function setFileName($file_name) { - $this->file_name = $file_name; - } -} - + + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + + + +namespace Avalara\SDK\API\EInvoicing\V1; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Exception\ConnectException; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Avalara\SDK\ApiClient; +use Avalara\SDK\ApiException; +use Avalara\SDK\Configuration; +use Avalara\SDK\HeaderSelector; +use Avalara\SDK\ObjectSerializer; +use Avalara\SDK\Utils\LogObject; + +class InteropApi +{ + /** + * @var ApiClient + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @param ApiClient $client + */ + public function __construct(ApiClient $client ) + { + $this->setConfiguration($client); + } + + /** + * Set APIClient Configuration + * + * @param APIClient $client + */ + private function setConfiguration($client): void + { + $this->verifyAPIClient($client); + $client->setSdkVersion("25.8.3"); + $this->headerSelector = new HeaderSelector(); + $this->client = $client; + } + + /** + * Verify APIClient object + * + * @param int $client + */ + private function verifyAPIClient($client): void + { + if (is_null($client)){ + throw new ApiException("APIClient not defined"); + } + } + + + /** + * Set the HeaderSelector + * + * @param HeaderSelector $selector (required) + */ + public function setHeaderSelector($selector): void + { + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->client->config; + } + + /** + * Operation submitInteropDocument + * + * Submit a document + * + * @param SubmitInteropDocumentRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse + */ + public function submitInteropDocument($request_parameters) + { + list($response) = $this->submitInteropDocumentWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation submitInteropDocumentWithHttpInfo + * + * Submit a document + * + * @param SubmitInteropDocumentRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function submitInteropDocumentWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->submitInteropDocumentRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->submitInteropDocumentWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 202: + if ('\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation submitInteropDocumentAsync + * + * Submit a document + * + * @param SubmitInteropDocumentRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function submitInteropDocumentAsync($request_parameters) + { + return $this->submitInteropDocumentAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation submitInteropDocumentAsyncWithHttpInfo + * + * Submit a document + * + * @param SubmitInteropDocumentRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function submitInteropDocumentAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\SubmitInteropDocument202Response'; + $request = $this->submitInteropDocumentRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->submitInteropDocumentAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'submitInteropDocument' + * + * @param SubmitInteropDocumentRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function submitInteropDocumentRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $document_type = $request_parameters->getDocumentType(); + $interchange_type = $request_parameters->getInterchangeType(); + $avalara_version = $request_parameters->getAvalaraVersion(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + $file_name = $request_parameters->getFileName(); + + // verify the required parameter 'document_type' is set + if ($document_type === null || (is_array($document_type) && count($document_type) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $document_type when calling submitInteropDocument' + ); + } + // verify the required parameter 'interchange_type' is set + if ($interchange_type === null || (is_array($interchange_type) && count($interchange_type) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $interchange_type when calling submitInteropDocument' + ); + } + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling submitInteropDocument' + ); + } + + $resourcePath = '/einvoicing/interop/documents'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($document_type !== null) { + if('form' === 'form' && is_array($document_type)) { + foreach($document_type as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['documentType'] = $document_type; + } + } + // query params + if ($interchange_type !== null) { + if('form' === 'form' && is_array($interchange_type)) { + foreach($interchange_type as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['interchangeType'] = $interchange_type; + } + } + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + + // form params + if ($file_name !== null) { + $multipart = true; + $formParams['fileName'] = []; + $paramFiles = is_array($file_name) ? $file_name : [$file_name]; + foreach ($paramFiles as $paramFile) { + $formParams['fileName'][] = \GuzzleHttp\Psr7\Utils::tryFopen( + ObjectSerializer::toFormValue($paramFile), + 'rb' + ); + } + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'POST', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + +} + /** + * Represents the Request object for the SubmitInteropDocument API + * + * @param string $document_type Type of the document being uploaded. Partners will be configured in Avalara system to send only certain types of documents. (required) + * @param string $interchange_type Type of interchange (codes in Avalara system that uniquely identifies a type of interchange). Partners will be configured in Avalara system to send documents belonging to certain types of interchanges. (required) + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + * @param \SplFileObject $file_name The file to be uploaded (e.g., UBL XML, CII XML). (optional) + */ +class SubmitInteropDocumentRequestSdk { + private $document_type; + private $interchange_type; + private $avalara_version; + private $x_avalara_client; + private $x_correlation_id; + private $file_name; + + public function __construct() { + } + public function getDocumentType() { + return $this->document_type; + } + + public function setDocumentType($document_type) { + $this->document_type = $document_type; + } + public function getInterchangeType() { + return $this->interchange_type; + } + + public function setInterchangeType($interchange_type) { + $this->interchange_type = $interchange_type; + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } + public function getFileName() { + return $this->file_name; + } + + public function setFileName($file_name) { + $this->file_name = $file_name; + } +} + diff --git a/lib/API/EInvoicing/V1/MandatesApi.php b/lib/API/EInvoicing/V1/MandatesApi.php index 4bc330f..a11b2a2 100644 --- a/lib/API/EInvoicing/V1/MandatesApi.php +++ b/lib/API/EInvoicing/V1/MandatesApi.php @@ -1,1122 +1,1122 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - - - -namespace Avalara\SDK\API\EInvoicing\V1; - -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Exception\ConnectException; -use GuzzleHttp\Psr7\MultipartStream; -use GuzzleHttp\Psr7\Request; -use GuzzleHttp\RequestOptions; -use Avalara\SDK\ApiClient; -use Avalara\SDK\ApiException; -use Avalara\SDK\Configuration; -use Avalara\SDK\HeaderSelector; -use Avalara\SDK\ObjectSerializer; -use Avalara\SDK\Utils\LogObject; - -class MandatesApi -{ - /** - * @var ApiClient - */ - protected $client; - - /** - * @var Configuration - */ - protected $config; - - /** - * @var HeaderSelector - */ - protected $headerSelector; - - /** - * @param ApiClient $client - */ - public function __construct(ApiClient $client ) - { - $this->setConfiguration($client); - } - - /** - * Set APIClient Configuration - * - * @param APIClient $client - */ - private function setConfiguration($client): void - { - $this->verifyAPIClient($client); - $client->setSdkVersion("25.8.1"); - $this->headerSelector = new HeaderSelector(); - $this->client = $client; - } - - /** - * Verify APIClient object - * - * @param int $client - */ - private function verifyAPIClient($client): void - { - if (is_null($client)){ - throw new ApiException("APIClient not defined"); - } - } - - - /** - * Set the HeaderSelector - * - * @param HeaderSelector $selector (required) - */ - public function setHeaderSelector($selector): void - { - $this->headerSelector = $selector ?: new HeaderSelector(); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->client->config; - } - - /** - * Operation getMandateDataInputFields - * - * Returns document field information for a country mandate, a selected document type, and its version - * - * @param GetMandateDataInputFieldsRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError - */ - public function getMandateDataInputFields($request_parameters) - { - list($response) = $this->getMandateDataInputFieldsWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation getMandateDataInputFieldsWithHttpInfo - * - * Returns document field information for a country mandate, a selected document type, and its version - * - * @param GetMandateDataInputFieldsRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) - */ - public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->getMandateDataInputFieldsRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->getMandateDataInputFieldsWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Avalara\SDK\Model\EInvoicing\V1\BadRequest' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getMandateDataInputFieldsAsync - * - * Returns document field information for a country mandate, a selected document type, and its version - * - * @param GetMandateDataInputFieldsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getMandateDataInputFieldsAsync($request_parameters) - { - return $this->getMandateDataInputFieldsAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getMandateDataInputFieldsAsyncWithHttpInfo - * - * Returns document field information for a country mandate, a selected document type, and its version - * - * @param GetMandateDataInputFieldsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getMandateDataInputFieldsAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]'; - $request = $this->getMandateDataInputFieldsRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->getMandateDataInputFieldsAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getMandateDataInputFields' - * - * @param GetMandateDataInputFieldsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function getMandateDataInputFieldsRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $mandate_id = $request_parameters->getMandateId(); - $document_type = $request_parameters->getDocumentType(); - $document_version = $request_parameters->getDocumentVersion(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling getMandateDataInputFields' - ); - } - // verify the required parameter 'mandate_id' is set - if ($mandate_id === null || (is_array($mandate_id) && count($mandate_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $mandate_id when calling getMandateDataInputFields' - ); - } - // verify the required parameter 'document_type' is set - if ($document_type === null || (is_array($document_type) && count($document_type) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $document_type when calling getMandateDataInputFields' - ); - } - // verify the required parameter 'document_version' is set - if ($document_version === null || (is_array($document_version) && count($document_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $document_version when calling getMandateDataInputFields' - ); - } - - $resourcePath = '/einvoicing/mandates/{mandateId}/data-input-fields'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($document_type !== null) { - if('form' === 'form' && is_array($document_type)) { - foreach($document_type as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['documentType'] = $document_type; - } - } - // query params - if ($document_version !== null) { - if('form' === 'form' && is_array($document_version)) { - foreach($document_version as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['documentVersion'] = $document_version; - } - } - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - - // path params - if ($mandate_id !== null) { - $resourcePath = str_replace( - '{' . 'mandateId' . '}', - ObjectSerializer::toPathValue($mandate_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'GET', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getMandates - * - * List country mandates that are supported by the Avalara E-Invoicing platform - * - * @param GetMandatesRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\MandatesResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError - */ - public function getMandates($request_parameters) - { - list($response) = $this->getMandatesWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation getMandatesWithHttpInfo - * - * List country mandates that are supported by the Avalara E-Invoicing platform - * - * @param GetMandatesRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\MandatesResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) - */ - public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->getMandatesRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->getMandatesWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getMandatesAsync - * - * List country mandates that are supported by the Avalara E-Invoicing platform - * - * @param GetMandatesRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getMandatesAsync($request_parameters) - { - return $this->getMandatesAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getMandatesAsyncWithHttpInfo - * - * List country mandates that are supported by the Avalara E-Invoicing platform - * - * @param GetMandatesRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getMandatesAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse'; - $request = $this->getMandatesRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->getMandatesAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getMandates' - * - * @param GetMandatesRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function getMandatesRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $filter = $request_parameters->getFilter(); - $top = $request_parameters->getTop(); - $skip = $request_parameters->getSkip(); - $count = $request_parameters->getCount(); - $count_only = $request_parameters->getCountOnly(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling getMandates' - ); - } - - $resourcePath = '/einvoicing/mandates'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($filter !== null) { - if('form' === 'form' && is_array($filter)) { - foreach($filter as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$filter'] = $filter; - } - } - // query params - if ($top !== null) { - if('form' === 'form' && is_array($top)) { - foreach($top as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$top'] = $top; - } - } - // query params - if ($skip !== null) { - if('form' === 'form' && is_array($skip)) { - foreach($skip as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$skip'] = $skip; - } - } - // query params - if ($count !== null) { - if('form' === 'form' && is_array($count)) { - foreach($count as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$count'] = $count; - } - } - // query params - if ($count_only !== null) { - if('form' === 'form' && is_array($count_only)) { - foreach($count_only as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$countOnly'] = $count_only; - } - } - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'GET', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - -} - /** - * Represents the Request object for the GetMandateDataInputFields API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param string $mandate_id The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body (required) - * @param string $document_type Select the documentType for which you wish to view the data-input-fields (You may obtain the supported documentTypes from the GET /mandates endpoint) (required) - * @param string $document_version Select the document version of the documentType (You may obtain the supported documentVersion from the GET /mandates endpoint) (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) - */ -class GetMandateDataInputFieldsRequestSdk { - private $avalara_version; - private $mandate_id; - private $document_type; - private $document_version; - private $x_avalara_client; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getMandateId() { - return $this->mandate_id; - } - - public function setMandateId($mandate_id) { - $this->mandate_id = $mandate_id; - } - public function getDocumentType() { - return $this->document_type; - } - - public function setDocumentType($document_type) { - $this->document_type = $document_type; - } - public function getDocumentVersion() { - return $this->document_version; - } - - public function setDocumentVersion($document_version) { - $this->document_version = $document_version; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } -} - - /** - * Represents the Request object for the GetMandates API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) - * @param string $filter Filter by field name and value. This filter only supports <code>eq</code> and <code>contains</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. (optional) - * @param int $top The number of items to include in the result. (optional) - * @param int $skip The number of items to skip in the result. (optional) - * @param bool $count When set to true, the count of the collection is also returned in the response body. (optional) - * @param bool $count_only When set to true, only the count of the collection is returned (optional) - */ -class GetMandatesRequestSdk { - private $avalara_version; - private $x_avalara_client; - private $filter; - private $top; - private $skip; - private $count; - private $count_only; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getFilter() { - return $this->filter; - } - - public function setFilter($filter) { - $this->filter = $filter; - } - public function getTop() { - return $this->top; - } - - public function setTop($top) { - $this->top = $top; - } - public function getSkip() { - return $this->skip; - } - - public function setSkip($skip) { - $this->skip = $skip; - } - public function getCount() { - return $this->count; - } - - public function setCount($count) { - $this->count = $count; - } - public function getCountOnly() { - return $this->count_only; - } - - public function setCountOnly($count_only) { - $this->count_only = $count_only; - } -} - + + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + + + +namespace Avalara\SDK\API\EInvoicing\V1; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Exception\ConnectException; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Avalara\SDK\ApiClient; +use Avalara\SDK\ApiException; +use Avalara\SDK\Configuration; +use Avalara\SDK\HeaderSelector; +use Avalara\SDK\ObjectSerializer; +use Avalara\SDK\Utils\LogObject; + +class MandatesApi +{ + /** + * @var ApiClient + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @param ApiClient $client + */ + public function __construct(ApiClient $client ) + { + $this->setConfiguration($client); + } + + /** + * Set APIClient Configuration + * + * @param APIClient $client + */ + private function setConfiguration($client): void + { + $this->verifyAPIClient($client); + $client->setSdkVersion("25.8.3"); + $this->headerSelector = new HeaderSelector(); + $this->client = $client; + } + + /** + * Verify APIClient object + * + * @param int $client + */ + private function verifyAPIClient($client): void + { + if (is_null($client)){ + throw new ApiException("APIClient not defined"); + } + } + + + /** + * Set the HeaderSelector + * + * @param HeaderSelector $selector (required) + */ + public function setHeaderSelector($selector): void + { + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->client->config; + } + + /** + * Operation getMandateDataInputFields + * + * Returns document field information for a country mandate, a selected document type, and its version + * + * @param GetMandateDataInputFieldsRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError + */ + public function getMandateDataInputFields($request_parameters) + { + list($response) = $this->getMandateDataInputFieldsWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation getMandateDataInputFieldsWithHttpInfo + * + * Returns document field information for a country mandate, a selected document type, and its version + * + * @param GetMandateDataInputFieldsRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]|\Avalara\SDK\Model\EInvoicing\V1\BadRequest|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) + */ + public function getMandateDataInputFieldsWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->getMandateDataInputFieldsRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->getMandateDataInputFieldsWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\SDK\Model\EInvoicing\V1\BadRequest' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\BadRequest', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getMandateDataInputFieldsAsync + * + * Returns document field information for a country mandate, a selected document type, and its version + * + * @param GetMandateDataInputFieldsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMandateDataInputFieldsAsync($request_parameters) + { + return $this->getMandateDataInputFieldsAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getMandateDataInputFieldsAsyncWithHttpInfo + * + * Returns document field information for a country mandate, a selected document type, and its version + * + * @param GetMandateDataInputFieldsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMandateDataInputFieldsAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandateDataInputField[]'; + $request = $this->getMandateDataInputFieldsRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->getMandateDataInputFieldsAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getMandateDataInputFields' + * + * @param GetMandateDataInputFieldsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getMandateDataInputFieldsRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $mandate_id = $request_parameters->getMandateId(); + $document_type = $request_parameters->getDocumentType(); + $document_version = $request_parameters->getDocumentVersion(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling getMandateDataInputFields' + ); + } + // verify the required parameter 'mandate_id' is set + if ($mandate_id === null || (is_array($mandate_id) && count($mandate_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $mandate_id when calling getMandateDataInputFields' + ); + } + // verify the required parameter 'document_type' is set + if ($document_type === null || (is_array($document_type) && count($document_type) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $document_type when calling getMandateDataInputFields' + ); + } + // verify the required parameter 'document_version' is set + if ($document_version === null || (is_array($document_version) && count($document_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $document_version when calling getMandateDataInputFields' + ); + } + + $resourcePath = '/einvoicing/mandates/{mandateId}/data-input-fields'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($document_type !== null) { + if('form' === 'form' && is_array($document_type)) { + foreach($document_type as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['documentType'] = $document_type; + } + } + // query params + if ($document_version !== null) { + if('form' === 'form' && is_array($document_version)) { + foreach($document_version as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['documentVersion'] = $document_version; + } + } + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + + // path params + if ($mandate_id !== null) { + $resourcePath = str_replace( + '{' . 'mandateId' . '}', + ObjectSerializer::toPathValue($mandate_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'GET', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getMandates + * + * List country mandates that are supported by the Avalara E-Invoicing platform + * + * @param GetMandatesRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\MandatesResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError + */ + public function getMandates($request_parameters) + { + list($response) = $this->getMandatesWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation getMandatesWithHttpInfo + * + * List country mandates that are supported by the Avalara E-Invoicing platform + * + * @param GetMandatesRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\MandatesResponse|\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError|\Avalara\SDK\Model\EInvoicing\V1\NotFoundError|\Avalara\SDK\Model\EInvoicing\V1\InternalServerError, HTTP status code, HTTP response headers (array of strings) + */ + public function getMandatesWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->getMandatesRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->getMandatesWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\Avalara\SDK\Model\EInvoicing\V1\NotFoundError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\InternalServerError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ForbiddenError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\NotFoundError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\InternalServerError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getMandatesAsync + * + * List country mandates that are supported by the Avalara E-Invoicing platform + * + * @param GetMandatesRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMandatesAsync($request_parameters) + { + return $this->getMandatesAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getMandatesAsyncWithHttpInfo + * + * List country mandates that are supported by the Avalara E-Invoicing platform + * + * @param GetMandatesRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMandatesAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\MandatesResponse'; + $request = $this->getMandatesRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->getMandatesAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getMandates' + * + * @param GetMandatesRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getMandatesRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $filter = $request_parameters->getFilter(); + $top = $request_parameters->getTop(); + $skip = $request_parameters->getSkip(); + $count = $request_parameters->getCount(); + $count_only = $request_parameters->getCountOnly(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling getMandates' + ); + } + + $resourcePath = '/einvoicing/mandates'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($filter !== null) { + if('form' === 'form' && is_array($filter)) { + foreach($filter as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$filter'] = $filter; + } + } + // query params + if ($top !== null) { + if('form' === 'form' && is_array($top)) { + foreach($top as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$top'] = $top; + } + } + // query params + if ($skip !== null) { + if('form' === 'form' && is_array($skip)) { + foreach($skip as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$skip'] = $skip; + } + } + // query params + if ($count !== null) { + if('form' === 'form' && is_array($count)) { + foreach($count as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$count'] = $count; + } + } + // query params + if ($count_only !== null) { + if('form' === 'form' && is_array($count_only)) { + foreach($count_only as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$countOnly'] = $count_only; + } + } + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'GET', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + +} + /** + * Represents the Request object for the GetMandateDataInputFields API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $mandate_id The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body (required) + * @param string $document_type Select the documentType for which you wish to view the data-input-fields (You may obtain the supported documentTypes from the GET /mandates endpoint) (required) + * @param string $document_version Select the document version of the documentType (You may obtain the supported documentVersion from the GET /mandates endpoint) (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) + */ +class GetMandateDataInputFieldsRequestSdk { + private $avalara_version; + private $mandate_id; + private $document_type; + private $document_version; + private $x_avalara_client; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getMandateId() { + return $this->mandate_id; + } + + public function setMandateId($mandate_id) { + $this->mandate_id = $mandate_id; + } + public function getDocumentType() { + return $this->document_type; + } + + public function setDocumentType($document_type) { + $this->document_type = $document_type; + } + public function getDocumentVersion() { + return $this->document_version; + } + + public function setDocumentVersion($document_version) { + $this->document_version = $document_version; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } +} + + /** + * Represents the Request object for the GetMandates API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) + * @param string $filter Filter by field name and value. This filter only supports <code>eq</code> and <code>contains</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. (optional) + * @param int $top The number of items to include in the result. (optional) + * @param int $skip The number of items to skip in the result. (optional) + * @param bool $count When set to true, the count of the collection is also returned in the response body. (optional) + * @param bool $count_only When set to true, only the count of the collection is returned (optional) + */ +class GetMandatesRequestSdk { + private $avalara_version; + private $x_avalara_client; + private $filter; + private $top; + private $skip; + private $count; + private $count_only; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getFilter() { + return $this->filter; + } + + public function setFilter($filter) { + $this->filter = $filter; + } + public function getTop() { + return $this->top; + } + + public function setTop($top) { + $this->top = $top; + } + public function getSkip() { + return $this->skip; + } + + public function setSkip($skip) { + $this->skip = $skip; + } + public function getCount() { + return $this->count; + } + + public function setCount($count) { + $this->count = $count; + } + public function getCountOnly() { + return $this->count_only; + } + + public function setCountOnly($count_only) { + $this->count_only = $count_only; + } +} + diff --git a/lib/API/EInvoicing/V1/SubscriptionsApi.php b/lib/API/EInvoicing/V1/SubscriptionsApi.php index 71efe8e..01721cf 100644 --- a/lib/API/EInvoicing/V1/SubscriptionsApi.php +++ b/lib/API/EInvoicing/V1/SubscriptionsApi.php @@ -79,7 +79,7 @@ public function __construct(ApiClient $client ) private function setConfiguration($client): void { $this->verifyAPIClient($client); - $client->setSdkVersion("25.8.1"); + $client->setSdkVersion("25.8.3"); $this->headerSelector = new HeaderSelector(); $this->client = $client; } @@ -450,7 +450,7 @@ public function createWebhookSubscriptionRequest($request_parameters) ['application/json'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -761,7 +761,7 @@ public function deleteWebhookSubscriptionRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1153,7 +1153,7 @@ public function getWebhookSubscriptionRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -1578,7 +1578,7 @@ public function listWebhookSubscriptionsRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; diff --git a/lib/API/EInvoicing/V1/TaxIdentifiersApi.php b/lib/API/EInvoicing/V1/TaxIdentifiersApi.php index 34b4b7c..b8d93da 100644 --- a/lib/API/EInvoicing/V1/TaxIdentifiersApi.php +++ b/lib/API/EInvoicing/V1/TaxIdentifiersApi.php @@ -79,7 +79,7 @@ public function __construct(ApiClient $client ) private function setConfiguration($client): void { $this->verifyAPIClient($client); - $client->setSdkVersion("25.8.1"); + $client->setSdkVersion("25.8.3"); $this->headerSelector = new HeaderSelector(); $this->client = $client; } @@ -494,7 +494,7 @@ public function taxIdentifierSchemaByCountryRequest($request_parameters) [] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; @@ -920,7 +920,7 @@ public function validateTaxIdentifierRequest($request_parameters) ['application/json'] ); } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; $headers['X-Avalara-Client']=$clientId; diff --git a/lib/API/EInvoicing/V1/TradingPartnersApi.php b/lib/API/EInvoicing/V1/TradingPartnersApi.php index 8c8b056..52b6edd 100644 --- a/lib/API/EInvoicing/V1/TradingPartnersApi.php +++ b/lib/API/EInvoicing/V1/TradingPartnersApi.php @@ -1,4519 +1,4519 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - - - -namespace Avalara\SDK\API\EInvoicing\V1; - -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Exception\ConnectException; -use GuzzleHttp\Psr7\MultipartStream; -use GuzzleHttp\Psr7\Request; -use GuzzleHttp\RequestOptions; -use Avalara\SDK\ApiClient; -use Avalara\SDK\ApiException; -use Avalara\SDK\Configuration; -use Avalara\SDK\HeaderSelector; -use Avalara\SDK\ObjectSerializer; -use Avalara\SDK\Utils\LogObject; - -class TradingPartnersApi -{ - /** - * @var ApiClient - */ - protected $client; - - /** - * @var Configuration - */ - protected $config; - - /** - * @var HeaderSelector - */ - protected $headerSelector; - - /** - * @param ApiClient $client - */ - public function __construct(ApiClient $client ) - { - $this->setConfiguration($client); - } - - /** - * Set APIClient Configuration - * - * @param APIClient $client - */ - private function setConfiguration($client): void - { - $this->verifyAPIClient($client); - $client->setSdkVersion("25.8.1"); - $this->headerSelector = new HeaderSelector(); - $this->client = $client; - } - - /** - * Verify APIClient object - * - * @param int $client - */ - private function verifyAPIClient($client): void - { - if (is_null($client)){ - throw new ApiException("APIClient not defined"); - } - } - - - /** - * Set the HeaderSelector - * - * @param HeaderSelector $selector (required) - */ - public function setHeaderSelector($selector): void - { - $this->headerSelector = $selector ?: new HeaderSelector(); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->client->config; - } - - /** - * Operation batchSearchParticipants - * - * Handles batch search requests by uploading a file containing search parameters. - * - * @param BatchSearchParticipantsRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse - */ - public function batchSearchParticipants($request_parameters) - { - list($response) = $this->batchSearchParticipantsWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation batchSearchParticipantsWithHttpInfo - * - * Handles batch search requests by uploading a file containing search parameters. - * - * @param BatchSearchParticipantsRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function batchSearchParticipantsWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->batchSearchParticipantsRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->batchSearchParticipantsWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 202: - if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 202: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation batchSearchParticipantsAsync - * - * Handles batch search requests by uploading a file containing search parameters. - * - * @param BatchSearchParticipantsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function batchSearchParticipantsAsync($request_parameters) - { - return $this->batchSearchParticipantsAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation batchSearchParticipantsAsyncWithHttpInfo - * - * Handles batch search requests by uploading a file containing search parameters. - * - * @param BatchSearchParticipantsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function batchSearchParticipantsAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response'; - $request = $this->batchSearchParticipantsRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->batchSearchParticipantsAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'batchSearchParticipants' - * - * @param BatchSearchParticipantsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function batchSearchParticipantsRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $name = $request_parameters->getName(); - $notification_email = $request_parameters->getNotificationEmail(); - $file = $request_parameters->getFile(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $x_correlation_id = $request_parameters->getXCorrelationId(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling batchSearchParticipants' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling batchSearchParticipants' - ); - } - // verify the required parameter 'notification_email' is set - if ($notification_email === null || (is_array($notification_email) && count($notification_email) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $notification_email when calling batchSearchParticipants' - ); - } - // verify the required parameter 'file' is set - if ($file === null || (is_array($file) && count($file) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $file when calling batchSearchParticipants' - ); - } - - $resourcePath = '/einvoicing/trading-partners/batch-searches'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($name !== null) { - if('form' === 'form' && is_array($name)) { - foreach($name as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['name'] = $name; - } - } - // query params - if ($notification_email !== null) { - if('form' === 'form' && is_array($notification_email)) { - foreach($notification_email as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['notificationEmail'] = $notification_email; - } - } - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - // header params - if ($x_correlation_id !== null) { - $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); - } - - - // form params - if ($file !== null) { - $multipart = true; - $formParams['file'] = []; - $paramFiles = is_array($file) ? $file : [$file]; - foreach ($paramFiles as $paramFile) { - $formParams['file'][] = \GuzzleHttp\Psr7\Utils::tryFopen( - ObjectSerializer::toFormValue($paramFile), - 'rb' - ); - } - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['multipart/form-data'] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'POST', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation createTradingPartner - * - * Creates a new trading partner. - * - * @param CreateTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse - */ - public function createTradingPartner($request_parameters) - { - list($response) = $this->createTradingPartnerWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation createTradingPartnerWithHttpInfo - * - * Creates a new trading partner. - * - * @param CreateTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function createTradingPartnerWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->createTradingPartnerRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->createTradingPartnerWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 201: - if ('\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 409: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 409: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation createTradingPartnerAsync - * - * Creates a new trading partner. - * - * @param CreateTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function createTradingPartnerAsync($request_parameters) - { - return $this->createTradingPartnerAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation createTradingPartnerAsyncWithHttpInfo - * - * Creates a new trading partner. - * - * @param CreateTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function createTradingPartnerAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response'; - $request = $this->createTradingPartnerRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->createTradingPartnerAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'createTradingPartner' - * - * @param CreateTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function createTradingPartnerRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $trading_partner = $request_parameters->getTradingPartner(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $x_correlation_id = $request_parameters->getXCorrelationId(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling createTradingPartner' - ); - } - // verify the required parameter 'trading_partner' is set - if ($trading_partner === null || (is_array($trading_partner) && count($trading_partner) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $trading_partner when calling createTradingPartner' - ); - } - - $resourcePath = '/einvoicing/trading-partners'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - // header params - if ($x_correlation_id !== null) { - $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); - } - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (isset($trading_partner)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($trading_partner)); - } else { - $httpBody = $trading_partner; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'POST', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation createTradingPartnersBatch - * - * Creates a batch of multiple trading partners. - * - * @param CreateTradingPartnersBatchRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse - */ - public function createTradingPartnersBatch($request_parameters) - { - list($response) = $this->createTradingPartnersBatchWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation createTradingPartnersBatchWithHttpInfo - * - * Creates a batch of multiple trading partners. - * - * @param CreateTradingPartnersBatchRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function createTradingPartnersBatchWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->createTradingPartnersBatchRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->createTradingPartnersBatchWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 409: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 413: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 409: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 413: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation createTradingPartnersBatchAsync - * - * Creates a batch of multiple trading partners. - * - * @param CreateTradingPartnersBatchRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function createTradingPartnersBatchAsync($request_parameters) - { - return $this->createTradingPartnersBatchAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation createTradingPartnersBatchAsyncWithHttpInfo - * - * Creates a batch of multiple trading partners. - * - * @param CreateTradingPartnersBatchRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function createTradingPartnersBatchAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response'; - $request = $this->createTradingPartnersBatchRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->createTradingPartnersBatchAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'createTradingPartnersBatch' - * - * @param CreateTradingPartnersBatchRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function createTradingPartnersBatchRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $create_trading_partners_batch_request = $request_parameters->getCreateTradingPartnersBatchRequest(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $x_correlation_id = $request_parameters->getXCorrelationId(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling createTradingPartnersBatch' - ); - } - // verify the required parameter 'create_trading_partners_batch_request' is set - if ($create_trading_partners_batch_request === null || (is_array($create_trading_partners_batch_request) && count($create_trading_partners_batch_request) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $create_trading_partners_batch_request when calling createTradingPartnersBatch' - ); - } - - $resourcePath = '/einvoicing/trading-partners/batch'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - // header params - if ($x_correlation_id !== null) { - $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); - } - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (isset($create_trading_partners_batch_request)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($create_trading_partners_batch_request)); - } else { - $httpBody = $create_trading_partners_batch_request; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'POST', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation deleteTradingPartner - * - * Deletes a trading partner using ID. - * - * @param DeleteTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function deleteTradingPartner($request_parameters) - { - $this->deleteTradingPartnerWithHttpInfo($request_parameters); - } - - /** - * Operation deleteTradingPartnerWithHttpInfo - * - * Deletes a trading partner using ID. - * - * @param DeleteTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteTradingPartnerWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->deleteTradingPartnerRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - $this->deleteTradingPartnerWithHttpInfo($request_parameters, true); - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation deleteTradingPartnerAsync - * - * Deletes a trading partner using ID. - * - * @param DeleteTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteTradingPartnerAsync($request_parameters) - { - return $this->deleteTradingPartnerAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation deleteTradingPartnerAsyncWithHttpInfo - * - * Deletes a trading partner using ID. - * - * @param DeleteTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteTradingPartnerAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = ''; - $request = $this->deleteTradingPartnerRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - $this->client->logger->info(json_encode($logObject)); - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->deleteTradingPartnerAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'deleteTradingPartner' - * - * @param DeleteTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function deleteTradingPartnerRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $id = $request_parameters->getId(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $x_correlation_id = $request_parameters->getXCorrelationId(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling deleteTradingPartner' - ); - } - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling deleteTradingPartner' - ); - } - - $resourcePath = '/einvoicing/trading-partners/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - // header params - if ($x_correlation_id !== null) { - $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); - } - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'DELETE', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation downloadBatchSearchReport - * - * Downloads batch search results in a csv file. - * - * @param DownloadBatchSearchReportRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse - */ - public function downloadBatchSearchReport($request_parameters) - { - list($response) = $this->downloadBatchSearchReportWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation downloadBatchSearchReportWithHttpInfo - * - * Downloads batch search results in a csv file. - * - * @param DownloadBatchSearchReportRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->downloadBatchSearchReportRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->downloadBatchSearchReportWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\SplFileObject' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\SplFileObject'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\SplFileObject', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation downloadBatchSearchReportAsync - * - * Downloads batch search results in a csv file. - * - * @param DownloadBatchSearchReportRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function downloadBatchSearchReportAsync($request_parameters) - { - return $this->downloadBatchSearchReportAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation downloadBatchSearchReportAsyncWithHttpInfo - * - * Downloads batch search results in a csv file. - * - * @param DownloadBatchSearchReportRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function downloadBatchSearchReportAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\SplFileObject'; - $request = $this->downloadBatchSearchReportRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->downloadBatchSearchReportAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'downloadBatchSearchReport' - * - * @param DownloadBatchSearchReportRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function downloadBatchSearchReportRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $id = $request_parameters->getId(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $x_correlation_id = $request_parameters->getXCorrelationId(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling downloadBatchSearchReport' - ); - } - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling downloadBatchSearchReport' - ); - } - - $resourcePath = '/einvoicing/trading-partners/batch-searches/{id}/$download-results'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - // header params - if ($x_correlation_id !== null) { - $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); - } - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['text/csv', 'application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['text/csv', 'application/json'], - [] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'GET', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getBatchSearchDetail - * - * Returns the batch search details using ID. - * - * @param GetBatchSearchDetailRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\BatchSearch|\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse - */ - public function getBatchSearchDetail($request_parameters) - { - list($response) = $this->getBatchSearchDetailWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation getBatchSearchDetailWithHttpInfo - * - * Returns the batch search details using ID. - * - * @param GetBatchSearchDetailRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\BatchSearch|\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->getBatchSearchDetailRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->getBatchSearchDetailWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearch' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getBatchSearchDetailAsync - * - * Returns the batch search details using ID. - * - * @param GetBatchSearchDetailRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getBatchSearchDetailAsync($request_parameters) - { - return $this->getBatchSearchDetailAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getBatchSearchDetailAsyncWithHttpInfo - * - * Returns the batch search details using ID. - * - * @param GetBatchSearchDetailRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getBatchSearchDetailAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch'; - $request = $this->getBatchSearchDetailRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->getBatchSearchDetailAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getBatchSearchDetail' - * - * @param GetBatchSearchDetailRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function getBatchSearchDetailRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $id = $request_parameters->getId(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $x_correlation_id = $request_parameters->getXCorrelationId(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling getBatchSearchDetail' - ); - } - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling getBatchSearchDetail' - ); - } - - $resourcePath = '/einvoicing/trading-partners/batch-searches/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - // header params - if ($x_correlation_id !== null) { - $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); - } - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'GET', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listBatchSearches - * - * Lists all batch searches that were previously submitted. - * - * @param ListBatchSearchesRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse - */ - public function listBatchSearches($request_parameters) - { - list($response) = $this->listBatchSearchesWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation listBatchSearchesWithHttpInfo - * - * Lists all batch searches that were previously submitted. - * - * @param ListBatchSearchesRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->listBatchSearchesRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->listBatchSearchesWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listBatchSearchesAsync - * - * Lists all batch searches that were previously submitted. - * - * @param ListBatchSearchesRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function listBatchSearchesAsync($request_parameters) - { - return $this->listBatchSearchesAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listBatchSearchesAsyncWithHttpInfo - * - * Lists all batch searches that were previously submitted. - * - * @param ListBatchSearchesRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function listBatchSearchesAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse'; - $request = $this->listBatchSearchesRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->listBatchSearchesAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listBatchSearches' - * - * @param ListBatchSearchesRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function listBatchSearchesRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $filter = $request_parameters->getFilter(); - $count = $request_parameters->getCount(); - $top = $request_parameters->getTop(); - $skip = $request_parameters->getSkip(); - $order_by = $request_parameters->getOrderBy(); - $x_correlation_id = $request_parameters->getXCorrelationId(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling listBatchSearches' - ); - } - - $resourcePath = '/einvoicing/trading-partners/batch-searches'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($filter !== null) { - if('form' === 'form' && is_array($filter)) { - foreach($filter as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$filter'] = $filter; - } - } - // query params - if ($count !== null) { - if('form' === 'form' && is_array($count)) { - foreach($count as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['count'] = $count; - } - } - // query params - if ($top !== null) { - if('form' === 'form' && is_array($top)) { - foreach($top as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$top'] = $top; - } - } - // query params - if ($skip !== null) { - if('form' === 'form' && is_array($skip)) { - foreach($skip as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$skip'] = $skip; - } - } - // query params - if ($order_by !== null) { - if('form' === 'form' && is_array($order_by)) { - foreach($order_by as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$orderBy'] = $order_by; - } - } - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - // header params - if ($x_correlation_id !== null) { - $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); - } - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'GET', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation searchParticipants - * - * Returns a list of participants matching the input query. - * - * @param SearchParticipantsRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse - */ - public function searchParticipants($request_parameters) - { - list($response) = $this->searchParticipantsWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation searchParticipantsWithHttpInfo - * - * Returns a list of participants matching the input query. - * - * @param SearchParticipantsRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->searchParticipantsRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->searchParticipantsWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation searchParticipantsAsync - * - * Returns a list of participants matching the input query. - * - * @param SearchParticipantsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function searchParticipantsAsync($request_parameters) - { - return $this->searchParticipantsAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation searchParticipantsAsyncWithHttpInfo - * - * Returns a list of participants matching the input query. - * - * @param SearchParticipantsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function searchParticipantsAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response'; - $request = $this->searchParticipantsRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->searchParticipantsAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'searchParticipants' - * - * @param SearchParticipantsRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function searchParticipantsRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $search = $request_parameters->getSearch(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $count = $request_parameters->getCount(); - $filter = $request_parameters->getFilter(); - $top = $request_parameters->getTop(); - $skip = $request_parameters->getSkip(); - $order_by = $request_parameters->getOrderBy(); - $x_correlation_id = $request_parameters->getXCorrelationId(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling searchParticipants' - ); - } - // verify the required parameter 'search' is set - if ($search === null || (is_array($search) && count($search) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $search when calling searchParticipants' - ); - } - - $resourcePath = '/einvoicing/trading-partners'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($count !== null) { - if('form' === 'form' && is_array($count)) { - foreach($count as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['count'] = $count; - } - } - // query params - if ($search !== null) { - if('form' === 'form' && is_array($search)) { - foreach($search as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$search'] = $search; - } - } - // query params - if ($filter !== null) { - if('form' === 'form' && is_array($filter)) { - foreach($filter as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$filter'] = $filter; - } - } - // query params - if ($top !== null) { - if('form' === 'form' && is_array($top)) { - foreach($top as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$top'] = $top; - } - } - // query params - if ($skip !== null) { - if('form' === 'form' && is_array($skip)) { - foreach($skip as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$skip'] = $skip; - } - } - // query params - if ($order_by !== null) { - if('form' === 'form' && is_array($order_by)) { - foreach($order_by as $key => $value) { - $queryParams[$key] = $value; - } - } - else { - $queryParams['$orderBy'] = $order_by; - } - } - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - // header params - if ($x_correlation_id !== null) { - $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); - } - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'GET', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation updateTradingPartner - * - * Updates a trading partner using ID. - * - * @param UpdateTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse - */ - public function updateTradingPartner($request_parameters) - { - list($response) = $this->updateTradingPartnerWithHttpInfo($request_parameters); - return $response; - } - - /** - * Operation updateTradingPartnerWithHttpInfo - * - * Updates a trading partner using ID. - * - * @param UpdateTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \Avalara\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function updateTradingPartnerWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - //OAuth2 Scopes - $requiredScopes = ""; - $request = $this->updateTradingPartnerRequest($request_parameters); - $logObject->populateRequestInfo($request); - - try { - try { - $response = $this->client->send_sync($request, []); - } catch (RequestException $e) { - $statusCode = $e->getCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); - list($response) = $this->updateTradingPartnerWithHttpInfo($request_parameters, true); - return $response; - } - $logObject->populateErrorInfo($e->getResponse()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 409: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 409: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation updateTradingPartnerAsync - * - * Updates a trading partner using ID. - * - * @param UpdateTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function updateTradingPartnerAsync($request_parameters) - { - return $this->updateTradingPartnerAsyncWithHttpInfo($request_parameters) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation updateTradingPartnerAsyncWithHttpInfo - * - * Updates a trading partner using ID. - * - * @param UpdateTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function updateTradingPartnerAsyncWithHttpInfo($request_parameters, $isRetry = false) - { - $logObject = new LogObject($this->client->logRequestAndResponse); - $returnType = '\Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response'; - $request = $this->updateTradingPartnerRequest($request_parameters); - $logObject->populateRequestInfo($request); - return $this->client - ->send_async($request, []) - ->then( - function ($response) use ($returnType, $logObject) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - $logObject->populateResponseInfo($content, $response); - $this->client->logger->info(json_encode($logObject)); - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { - //OAuth2 Scopes - $requiredScopes = ""; - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { - $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); - return $this->updateTradingPartnerAsyncWithHttpInfo($request_parameters, true) - ->then( - function ($response) { - return $response[0]; - } - ); - } - $logObject->populateErrorInfo($response); - $this->client->logger->error(json_encode($logObject)); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'updateTradingPartner' - * - * @param UpdateTradingPartnerRequestSdk The request parameters for the API call. - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function updateTradingPartnerRequest($request_parameters) - { - //OAuth2 Scopes - $requiredScopes = ""; - - $avalara_version = $request_parameters->getAvalaraVersion(); - $id = $request_parameters->getId(); - $trading_partner = $request_parameters->getTradingPartner(); - $x_avalara_client = $request_parameters->getXAvalaraClient(); - $x_correlation_id = $request_parameters->getXCorrelationId(); - - // verify the required parameter 'avalara_version' is set - if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $avalara_version when calling updateTradingPartner' - ); - } - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling updateTradingPartner' - ); - } - // verify the required parameter 'trading_partner' is set - if ($trading_partner === null || (is_array($trading_partner) && count($trading_partner) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $trading_partner when calling updateTradingPartner' - ); - } - - $resourcePath = '/einvoicing/trading-partners/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // header params - if ($avalara_version !== null) { - $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); - } - // header params - if ($x_avalara_client !== null) { - $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); - } - // header params - if ($x_correlation_id !== null) { - $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); - } - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.1; {$this->client->config->getMachineName()}"; - - $headers['X-Avalara-Client']=$clientId; - - // for model (json/xml) - if (isset($trading_partner)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($trading_partner)); - } else { - $httpBody = $trading_partner; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); - - $defaultHeaders = []; - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - $baseUrl = $this->client->config->getBasePath('EInvoicing'); - return new Request( - 'PUT', - $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - -} - /** - * Represents the Request object for the BatchSearchParticipants API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) - * @param string $name A <b>human-readable</b> name for the batch search. (required) - * @param string $notification_email The email address to which a notification will be sent once the batch search is complete. (required) - * @param \SplFileObject $file CSV file containing search parameters. Input Constraints: - Maximum file size: 1 MB - File Header: Must be less than 500 KB - Total number of lines (including header): Must be 101 or fewer (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) - * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) - */ -class BatchSearchParticipantsRequestSdk { - private $avalara_version; - private $name; - private $notification_email; - private $file; - private $x_avalara_client; - private $x_correlation_id; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getName() { - return $this->name; - } - - public function setName($name) { - $this->name = $name; - } - public function getNotificationEmail() { - return $this->notification_email; - } - - public function setNotificationEmail($notification_email) { - $this->notification_email = $notification_email; - } - public function getFile() { - return $this->file; - } - - public function setFile($file) { - $this->file = $file; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getXCorrelationId() { - return $this->x_correlation_id; - } - - public function setXCorrelationId($x_correlation_id) { - $this->x_correlation_id = $x_correlation_id; - } -} - - /** - * Represents the Request object for the CreateTradingPartner API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) - * @param \Avalara\SDK\Model\EInvoicing\V1\TradingPartner $trading_partner trading_partner (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) - * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) - */ -class CreateTradingPartnerRequestSdk { - private $avalara_version; - private $trading_partner; - private $x_avalara_client; - private $x_correlation_id; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getTradingPartner() { - return $this->trading_partner; - } - - public function setTradingPartner($trading_partner) { - $this->trading_partner = $trading_partner; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getXCorrelationId() { - return $this->x_correlation_id; - } - - public function setXCorrelationId($x_correlation_id) { - $this->x_correlation_id = $x_correlation_id; - } -} - - /** - * Represents the Request object for the CreateTradingPartnersBatch API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) - * @param \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatchRequest $create_trading_partners_batch_request create_trading_partners_batch_request (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) - * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) - */ -class CreateTradingPartnersBatchRequestSdk { - private $avalara_version; - private $create_trading_partners_batch_request; - private $x_avalara_client; - private $x_correlation_id; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getCreateTradingPartnersBatchRequest() { - return $this->create_trading_partners_batch_request; - } - - public function setCreateTradingPartnersBatchRequest($create_trading_partners_batch_request) { - $this->create_trading_partners_batch_request = $create_trading_partners_batch_request; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getXCorrelationId() { - return $this->x_correlation_id; - } - - public function setXCorrelationId($x_correlation_id) { - $this->x_correlation_id = $x_correlation_id; - } -} - - /** - * Represents the Request object for the DeleteTradingPartner API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) - * @param string $id The ID of the trading partner which is being deleted. (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) - * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) - */ -class DeleteTradingPartnerRequestSdk { - private $avalara_version; - private $id; - private $x_avalara_client; - private $x_correlation_id; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getId() { - return $this->id; - } - - public function setId($id) { - $this->id = $id; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getXCorrelationId() { - return $this->x_correlation_id; - } - - public function setXCorrelationId($x_correlation_id) { - $this->x_correlation_id = $x_correlation_id; - } -} - - /** - * Represents the Request object for the DownloadBatchSearchReport API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) - * @param string $id The ID of the batch search for which the report should be downloaded. (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) - * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) - */ -class DownloadBatchSearchReportRequestSdk { - private $avalara_version; - private $id; - private $x_avalara_client; - private $x_correlation_id; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getId() { - return $this->id; - } - - public function setId($id) { - $this->id = $id; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getXCorrelationId() { - return $this->x_correlation_id; - } - - public function setXCorrelationId($x_correlation_id) { - $this->x_correlation_id = $x_correlation_id; - } -} - - /** - * Represents the Request object for the GetBatchSearchDetail API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) - * @param string $id The ID of the batch search that was submitted earlier. (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) - * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) - */ -class GetBatchSearchDetailRequestSdk { - private $avalara_version; - private $id; - private $x_avalara_client; - private $x_correlation_id; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getId() { - return $this->id; - } - - public function setId($id) { - $this->id = $id; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getXCorrelationId() { - return $this->x_correlation_id; - } - - public function setXCorrelationId($x_correlation_id) { - $this->x_correlation_id = $x_correlation_id; - } -} - - /** - * Represents the Request object for the ListBatchSearches API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) - * @param string $filter Filters the results by field name. Only the <code>eq</code> operator and the name field is supported. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). (optional) - * @param bool $count When set to <code>true</code>, returns the total count of matching records included as <code>@recordSetCount</code> in the response body. (optional) - * @param int $top The number of items to include in the result. (optional) - * @param int $skip The number of items to skip in the result. (optional) - * @param string $order_by The <code>$orderBy</code> query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) - * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) - */ -class ListBatchSearchesRequestSdk { - private $avalara_version; - private $x_avalara_client; - private $filter; - private $count; - private $top; - private $skip; - private $order_by; - private $x_correlation_id; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getFilter() { - return $this->filter; - } - - public function setFilter($filter) { - $this->filter = $filter; - } - public function getCount() { - return $this->count; - } - - public function setCount($count) { - $this->count = $count; - } - public function getTop() { - return $this->top; - } - - public function setTop($top) { - $this->top = $top; - } - public function getSkip() { - return $this->skip; - } - - public function setSkip($skip) { - $this->skip = $skip; - } - public function getOrderBy() { - return $this->order_by; - } - - public function setOrderBy($order_by) { - $this->order_by = $order_by; - } - public function getXCorrelationId() { - return $this->x_correlation_id; - } - - public function setXCorrelationId($x_correlation_id) { - $this->x_correlation_id = $x_correlation_id; - } -} - - /** - * Represents the Request object for the SearchParticipants API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) - * @param string $search Search by value supports logical <code>AND</code> / <code>OR</code> operators. Search is performed only over the name and identifier value fields. For more information, refer to [Query options overview - OData.](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search). (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) - * @param bool $count When set to <code>true</code>, returns the total count of matching records included as <code>@recordSetCount</code> in the response body. (optional) - * @param string $filter Filters the results using the <code>eq</code> operator. Supported fields: <code>network</code>, <code>country</code>, <code>documentType</code>, <code>idType</code>. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). (optional) - * @param int $top The number of items to include in the result. (optional) - * @param int $skip The number of items to skip in the result. (optional) - * @param string $order_by The <code>$orderBy</code> query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) - * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) - */ -class SearchParticipantsRequestSdk { - private $avalara_version; - private $search; - private $x_avalara_client; - private $count; - private $filter; - private $top; - private $skip; - private $order_by; - private $x_correlation_id; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getSearch() { - return $this->search; - } - - public function setSearch($search) { - $this->search = $search; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getCount() { - return $this->count; - } - - public function setCount($count) { - $this->count = $count; - } - public function getFilter() { - return $this->filter; - } - - public function setFilter($filter) { - $this->filter = $filter; - } - public function getTop() { - return $this->top; - } - - public function setTop($top) { - $this->top = $top; - } - public function getSkip() { - return $this->skip; - } - - public function setSkip($skip) { - $this->skip = $skip; - } - public function getOrderBy() { - return $this->order_by; - } - - public function setOrderBy($order_by) { - $this->order_by = $order_by; - } - public function getXCorrelationId() { - return $this->x_correlation_id; - } - - public function setXCorrelationId($x_correlation_id) { - $this->x_correlation_id = $x_correlation_id; - } -} - - /** - * Represents the Request object for the UpdateTradingPartner API - * - * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) - * @param string $id The ID of the trading partner which is being updated. (required) - * @param \Avalara\SDK\Model\EInvoicing\V1\TradingPartner $trading_partner trading_partner (required) - * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) - * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) - */ -class UpdateTradingPartnerRequestSdk { - private $avalara_version; - private $id; - private $trading_partner; - private $x_avalara_client; - private $x_correlation_id; - - public function __construct() { - } - public function getAvalaraVersion() { - return $this->avalara_version ?? '1.4'; - } - - public function setAvalaraVersion($avalara_version) { - $this->avalara_version = $avalara_version; - } - public function getId() { - return $this->id; - } - - public function setId($id) { - $this->id = $id; - } - public function getTradingPartner() { - return $this->trading_partner; - } - - public function setTradingPartner($trading_partner) { - $this->trading_partner = $trading_partner; - } - public function getXAvalaraClient() { - return $this->x_avalara_client; - } - - public function setXAvalaraClient($x_avalara_client) { - $this->x_avalara_client = $x_avalara_client; - } - public function getXCorrelationId() { - return $this->x_correlation_id; - } - - public function setXCorrelationId($x_correlation_id) { - $this->x_correlation_id = $x_correlation_id; - } -} - + + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + + + +namespace Avalara\SDK\API\EInvoicing\V1; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Exception\ConnectException; +use GuzzleHttp\Psr7\MultipartStream; +use GuzzleHttp\Psr7\Request; +use GuzzleHttp\RequestOptions; +use Avalara\SDK\ApiClient; +use Avalara\SDK\ApiException; +use Avalara\SDK\Configuration; +use Avalara\SDK\HeaderSelector; +use Avalara\SDK\ObjectSerializer; +use Avalara\SDK\Utils\LogObject; + +class TradingPartnersApi +{ + /** + * @var ApiClient + */ + protected $client; + + /** + * @var Configuration + */ + protected $config; + + /** + * @var HeaderSelector + */ + protected $headerSelector; + + /** + * @param ApiClient $client + */ + public function __construct(ApiClient $client ) + { + $this->setConfiguration($client); + } + + /** + * Set APIClient Configuration + * + * @param APIClient $client + */ + private function setConfiguration($client): void + { + $this->verifyAPIClient($client); + $client->setSdkVersion("25.8.3"); + $this->headerSelector = new HeaderSelector(); + $this->client = $client; + } + + /** + * Verify APIClient object + * + * @param int $client + */ + private function verifyAPIClient($client): void + { + if (is_null($client)){ + throw new ApiException("APIClient not defined"); + } + } + + + /** + * Set the HeaderSelector + * + * @param HeaderSelector $selector (required) + */ + public function setHeaderSelector($selector): void + { + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->client->config; + } + + /** + * Operation batchSearchParticipants + * + * Handles batch search requests by uploading a file containing search parameters. + * + * @param BatchSearchParticipantsRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse + */ + public function batchSearchParticipants($request_parameters) + { + list($response) = $this->batchSearchParticipantsWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation batchSearchParticipantsWithHttpInfo + * + * Handles batch search requests by uploading a file containing search parameters. + * + * @param BatchSearchParticipantsRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function batchSearchParticipantsWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->batchSearchParticipantsRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->batchSearchParticipantsWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 202: + if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation batchSearchParticipantsAsync + * + * Handles batch search requests by uploading a file containing search parameters. + * + * @param BatchSearchParticipantsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function batchSearchParticipantsAsync($request_parameters) + { + return $this->batchSearchParticipantsAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation batchSearchParticipantsAsyncWithHttpInfo + * + * Handles batch search requests by uploading a file containing search parameters. + * + * @param BatchSearchParticipantsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function batchSearchParticipantsAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchParticipants202Response'; + $request = $this->batchSearchParticipantsRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->batchSearchParticipantsAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'batchSearchParticipants' + * + * @param BatchSearchParticipantsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function batchSearchParticipantsRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $name = $request_parameters->getName(); + $notification_email = $request_parameters->getNotificationEmail(); + $file = $request_parameters->getFile(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling batchSearchParticipants' + ); + } + // verify the required parameter 'name' is set + if ($name === null || (is_array($name) && count($name) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $name when calling batchSearchParticipants' + ); + } + // verify the required parameter 'notification_email' is set + if ($notification_email === null || (is_array($notification_email) && count($notification_email) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $notification_email when calling batchSearchParticipants' + ); + } + // verify the required parameter 'file' is set + if ($file === null || (is_array($file) && count($file) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $file when calling batchSearchParticipants' + ); + } + + $resourcePath = '/einvoicing/trading-partners/batch-searches'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($name !== null) { + if('form' === 'form' && is_array($name)) { + foreach($name as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['name'] = $name; + } + } + // query params + if ($notification_email !== null) { + if('form' === 'form' && is_array($notification_email)) { + foreach($notification_email as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['notificationEmail'] = $notification_email; + } + } + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + + // form params + if ($file !== null) { + $multipart = true; + $formParams['file'] = []; + $paramFiles = is_array($file) ? $file : [$file]; + foreach ($paramFiles as $paramFile) { + $formParams['file'][] = \GuzzleHttp\Psr7\Utils::tryFopen( + ObjectSerializer::toFormValue($paramFile), + 'rb' + ); + } + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'POST', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createTradingPartner + * + * Creates a new trading partner. + * + * @param CreateTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse + */ + public function createTradingPartner($request_parameters) + { + list($response) = $this->createTradingPartnerWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation createTradingPartnerWithHttpInfo + * + * Creates a new trading partner. + * + * @param CreateTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createTradingPartnerWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->createTradingPartnerRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->createTradingPartnerWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 201: + if ('\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 409: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 409: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createTradingPartnerAsync + * + * Creates a new trading partner. + * + * @param CreateTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createTradingPartnerAsync($request_parameters) + { + return $this->createTradingPartnerAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createTradingPartnerAsyncWithHttpInfo + * + * Creates a new trading partner. + * + * @param CreateTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createTradingPartnerAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartner201Response'; + $request = $this->createTradingPartnerRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->createTradingPartnerAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createTradingPartner' + * + * @param CreateTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createTradingPartnerRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $trading_partner = $request_parameters->getTradingPartner(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling createTradingPartner' + ); + } + // verify the required parameter 'trading_partner' is set + if ($trading_partner === null || (is_array($trading_partner) && count($trading_partner) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $trading_partner when calling createTradingPartner' + ); + } + + $resourcePath = '/einvoicing/trading-partners'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (isset($trading_partner)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($trading_partner)); + } else { + $httpBody = $trading_partner; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'POST', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation createTradingPartnersBatch + * + * Creates a batch of multiple trading partners. + * + * @param CreateTradingPartnersBatchRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse + */ + public function createTradingPartnersBatch($request_parameters) + { + list($response) = $this->createTradingPartnersBatchWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation createTradingPartnersBatchWithHttpInfo + * + * Creates a batch of multiple trading partners. + * + * @param CreateTradingPartnersBatchRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createTradingPartnersBatchWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->createTradingPartnersBatchRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->createTradingPartnersBatchWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 409: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 413: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 409: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 413: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createTradingPartnersBatchAsync + * + * Creates a batch of multiple trading partners. + * + * @param CreateTradingPartnersBatchRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createTradingPartnersBatchAsync($request_parameters) + { + return $this->createTradingPartnersBatchAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createTradingPartnersBatchAsyncWithHttpInfo + * + * Creates a batch of multiple trading partners. + * + * @param CreateTradingPartnersBatchRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createTradingPartnersBatchAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatch200Response'; + $request = $this->createTradingPartnersBatchRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->createTradingPartnersBatchAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createTradingPartnersBatch' + * + * @param CreateTradingPartnersBatchRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createTradingPartnersBatchRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $create_trading_partners_batch_request = $request_parameters->getCreateTradingPartnersBatchRequest(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling createTradingPartnersBatch' + ); + } + // verify the required parameter 'create_trading_partners_batch_request' is set + if ($create_trading_partners_batch_request === null || (is_array($create_trading_partners_batch_request) && count($create_trading_partners_batch_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $create_trading_partners_batch_request when calling createTradingPartnersBatch' + ); + } + + $resourcePath = '/einvoicing/trading-partners/batch'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (isset($create_trading_partners_batch_request)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($create_trading_partners_batch_request)); + } else { + $httpBody = $create_trading_partners_batch_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'POST', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteTradingPartner + * + * Deletes a trading partner using ID. + * + * @param DeleteTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteTradingPartner($request_parameters) + { + $this->deleteTradingPartnerWithHttpInfo($request_parameters); + } + + /** + * Operation deleteTradingPartnerWithHttpInfo + * + * Deletes a trading partner using ID. + * + * @param DeleteTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteTradingPartnerWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->deleteTradingPartnerRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + $this->deleteTradingPartnerWithHttpInfo($request_parameters, true); + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteTradingPartnerAsync + * + * Deletes a trading partner using ID. + * + * @param DeleteTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteTradingPartnerAsync($request_parameters) + { + return $this->deleteTradingPartnerAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteTradingPartnerAsyncWithHttpInfo + * + * Deletes a trading partner using ID. + * + * @param DeleteTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteTradingPartnerAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = ''; + $request = $this->deleteTradingPartnerRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + $this->client->logger->info(json_encode($logObject)); + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->deleteTradingPartnerAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteTradingPartner' + * + * @param DeleteTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteTradingPartnerRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $id = $request_parameters->getId(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling deleteTradingPartner' + ); + } + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling deleteTradingPartner' + ); + } + + $resourcePath = '/einvoicing/trading-partners/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'DELETE', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation downloadBatchSearchReport + * + * Downloads batch search results in a csv file. + * + * @param DownloadBatchSearchReportRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse + */ + public function downloadBatchSearchReport($request_parameters) + { + list($response) = $this->downloadBatchSearchReportWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation downloadBatchSearchReportWithHttpInfo + * + * Downloads batch search results in a csv file. + * + * @param DownloadBatchSearchReportRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SplFileObject|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function downloadBatchSearchReportWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->downloadBatchSearchReportRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->downloadBatchSearchReportWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\SplFileObject' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\SplFileObject', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\SplFileObject'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SplFileObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation downloadBatchSearchReportAsync + * + * Downloads batch search results in a csv file. + * + * @param DownloadBatchSearchReportRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function downloadBatchSearchReportAsync($request_parameters) + { + return $this->downloadBatchSearchReportAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation downloadBatchSearchReportAsyncWithHttpInfo + * + * Downloads batch search results in a csv file. + * + * @param DownloadBatchSearchReportRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function downloadBatchSearchReportAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\SplFileObject'; + $request = $this->downloadBatchSearchReportRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->downloadBatchSearchReportAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'downloadBatchSearchReport' + * + * @param DownloadBatchSearchReportRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function downloadBatchSearchReportRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $id = $request_parameters->getId(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling downloadBatchSearchReport' + ); + } + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling downloadBatchSearchReport' + ); + } + + $resourcePath = '/einvoicing/trading-partners/batch-searches/{id}/$download-results'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['text/csv', 'application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['text/csv', 'application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'GET', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getBatchSearchDetail + * + * Returns the batch search details using ID. + * + * @param GetBatchSearchDetailRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\BatchSearch|\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse + */ + public function getBatchSearchDetail($request_parameters) + { + list($response) = $this->getBatchSearchDetailWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation getBatchSearchDetailWithHttpInfo + * + * Returns the batch search details using ID. + * + * @param GetBatchSearchDetailRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\BatchSearch|\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getBatchSearchDetailWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->getBatchSearchDetailRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->getBatchSearchDetailWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearch' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getBatchSearchDetailAsync + * + * Returns the batch search details using ID. + * + * @param GetBatchSearchDetailRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBatchSearchDetailAsync($request_parameters) + { + return $this->getBatchSearchDetailAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getBatchSearchDetailAsyncWithHttpInfo + * + * Returns the batch search details using ID. + * + * @param GetBatchSearchDetailRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getBatchSearchDetailAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearch'; + $request = $this->getBatchSearchDetailRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->getBatchSearchDetailAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getBatchSearchDetail' + * + * @param GetBatchSearchDetailRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getBatchSearchDetailRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $id = $request_parameters->getId(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling getBatchSearchDetail' + ); + } + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getBatchSearchDetail' + ); + } + + $resourcePath = '/einvoicing/trading-partners/batch-searches/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'GET', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listBatchSearches + * + * Lists all batch searches that were previously submitted. + * + * @param ListBatchSearchesRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse + */ + public function listBatchSearches($request_parameters) + { + list($response) = $this->listBatchSearchesWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation listBatchSearchesWithHttpInfo + * + * Lists all batch searches that were previously submitted. + * + * @param ListBatchSearchesRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listBatchSearchesWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->listBatchSearchesRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->listBatchSearchesWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listBatchSearchesAsync + * + * Lists all batch searches that were previously submitted. + * + * @param ListBatchSearchesRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBatchSearchesAsync($request_parameters) + { + return $this->listBatchSearchesAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listBatchSearchesAsyncWithHttpInfo + * + * Lists all batch searches that were previously submitted. + * + * @param ListBatchSearchesRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listBatchSearchesAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\BatchSearchListResponse'; + $request = $this->listBatchSearchesRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->listBatchSearchesAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listBatchSearches' + * + * @param ListBatchSearchesRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listBatchSearchesRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $filter = $request_parameters->getFilter(); + $count = $request_parameters->getCount(); + $top = $request_parameters->getTop(); + $skip = $request_parameters->getSkip(); + $order_by = $request_parameters->getOrderBy(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling listBatchSearches' + ); + } + + $resourcePath = '/einvoicing/trading-partners/batch-searches'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($filter !== null) { + if('form' === 'form' && is_array($filter)) { + foreach($filter as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$filter'] = $filter; + } + } + // query params + if ($count !== null) { + if('form' === 'form' && is_array($count)) { + foreach($count as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['count'] = $count; + } + } + // query params + if ($top !== null) { + if('form' === 'form' && is_array($top)) { + foreach($top as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$top'] = $top; + } + } + // query params + if ($skip !== null) { + if('form' === 'form' && is_array($skip)) { + foreach($skip as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$skip'] = $skip; + } + } + // query params + if ($order_by !== null) { + if('form' === 'form' && is_array($order_by)) { + foreach($order_by as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$orderBy'] = $order_by; + } + } + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'GET', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation searchParticipants + * + * Returns a list of participants matching the input query. + * + * @param SearchParticipantsRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse + */ + public function searchParticipants($request_parameters) + { + list($response) = $this->searchParticipantsWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation searchParticipantsWithHttpInfo + * + * Returns a list of participants matching the input query. + * + * @param SearchParticipantsRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function searchParticipantsWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->searchParticipantsRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->searchParticipantsWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation searchParticipantsAsync + * + * Returns a list of participants matching the input query. + * + * @param SearchParticipantsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function searchParticipantsAsync($request_parameters) + { + return $this->searchParticipantsAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation searchParticipantsAsyncWithHttpInfo + * + * Returns a list of participants matching the input query. + * + * @param SearchParticipantsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function searchParticipantsAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\SearchParticipants200Response'; + $request = $this->searchParticipantsRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->searchParticipantsAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'searchParticipants' + * + * @param SearchParticipantsRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function searchParticipantsRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $search = $request_parameters->getSearch(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $count = $request_parameters->getCount(); + $filter = $request_parameters->getFilter(); + $top = $request_parameters->getTop(); + $skip = $request_parameters->getSkip(); + $order_by = $request_parameters->getOrderBy(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling searchParticipants' + ); + } + // verify the required parameter 'search' is set + if ($search === null || (is_array($search) && count($search) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $search when calling searchParticipants' + ); + } + + $resourcePath = '/einvoicing/trading-partners'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($count !== null) { + if('form' === 'form' && is_array($count)) { + foreach($count as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['count'] = $count; + } + } + // query params + if ($search !== null) { + if('form' === 'form' && is_array($search)) { + foreach($search as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$search'] = $search; + } + } + // query params + if ($filter !== null) { + if('form' === 'form' && is_array($filter)) { + foreach($filter as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$filter'] = $filter; + } + } + // query params + if ($top !== null) { + if('form' === 'form' && is_array($top)) { + foreach($top as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$top'] = $top; + } + } + // query params + if ($skip !== null) { + if('form' === 'form' && is_array($skip)) { + foreach($skip as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$skip'] = $skip; + } + } + // query params + if ($order_by !== null) { + if('form' === 'form' && is_array($order_by)) { + foreach($order_by as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['$orderBy'] = $order_by; + } + } + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'GET', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateTradingPartner + * + * Updates a trading partner using ID. + * + * @param UpdateTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse + */ + public function updateTradingPartner($request_parameters) + { + list($response) = $this->updateTradingPartnerWithHttpInfo($request_parameters); + return $response; + } + + /** + * Operation updateTradingPartnerWithHttpInfo + * + * Updates a trading partner using ID. + * + * @param UpdateTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \Avalara\SDK\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse|\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function updateTradingPartnerWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + //OAuth2 Scopes + $requiredScopes = ""; + $request = $this->updateTradingPartnerRequest($request_parameters); + $logObject->populateRequestInfo($request); + + try { + try { + $response = $this->client->send_sync($request, []); + } catch (RequestException $e) { + $statusCode = $e->getCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($e->getRequest() ? $e->getRequest()->getHeaders() : null, $requiredScopes); + list($response) = $this->updateTradingPartnerWithHttpInfo($request_parameters, true); + return $response; + } + $logObject->populateErrorInfo($e->getResponse()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + $logObject->populateErrorMessage($e->getCode(), $e->getMessage()); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 409: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 409: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Avalara\SDK\Model\EInvoicing\V1\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateTradingPartnerAsync + * + * Updates a trading partner using ID. + * + * @param UpdateTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateTradingPartnerAsync($request_parameters) + { + return $this->updateTradingPartnerAsyncWithHttpInfo($request_parameters) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateTradingPartnerAsyncWithHttpInfo + * + * Updates a trading partner using ID. + * + * @param UpdateTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateTradingPartnerAsyncWithHttpInfo($request_parameters, $isRetry = false) + { + $logObject = new LogObject($this->client->logRequestAndResponse); + $returnType = '\Avalara\SDK\Model\EInvoicing\V1\UpdateTradingPartner200Response'; + $request = $this->updateTradingPartnerRequest($request_parameters); + $logObject->populateRequestInfo($request); + return $this->client + ->send_async($request, []) + ->then( + function ($response) use ($returnType, $logObject) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + $logObject->populateResponseInfo($content, $response); + $this->client->logger->info(json_encode($logObject)); + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) use ($request_parameters, $isRetry, $request, $logObject) { + //OAuth2 Scopes + $requiredScopes = ""; + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + if (($statusCode == 401 || $statusCode == 403) && !$isRetry) { + $this->client->refreshAuthToken($request->getHeaders(), $requiredScopes); + return $this->updateTradingPartnerAsyncWithHttpInfo($request_parameters, true) + ->then( + function ($response) { + return $response[0]; + } + ); + } + $logObject->populateErrorInfo($response); + $this->client->logger->error(json_encode($logObject)); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateTradingPartner' + * + * @param UpdateTradingPartnerRequestSdk The request parameters for the API call. + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateTradingPartnerRequest($request_parameters) + { + //OAuth2 Scopes + $requiredScopes = ""; + + $avalara_version = $request_parameters->getAvalaraVersion(); + $id = $request_parameters->getId(); + $trading_partner = $request_parameters->getTradingPartner(); + $x_avalara_client = $request_parameters->getXAvalaraClient(); + $x_correlation_id = $request_parameters->getXCorrelationId(); + + // verify the required parameter 'avalara_version' is set + if ($avalara_version === null || (is_array($avalara_version) && count($avalara_version) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $avalara_version when calling updateTradingPartner' + ); + } + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling updateTradingPartner' + ); + } + // verify the required parameter 'trading_partner' is set + if ($trading_partner === null || (is_array($trading_partner) && count($trading_partner) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $trading_partner when calling updateTradingPartner' + ); + } + + $resourcePath = '/einvoicing/trading-partners/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($avalara_version !== null) { + $headerParams['avalara-version'] = ObjectSerializer::toHeaderValue($avalara_version); + } + // header params + if ($x_avalara_client !== null) { + $headerParams['X-Avalara-Client'] = ObjectSerializer::toHeaderValue($x_avalara_client); + } + // header params + if ($x_correlation_id !== null) { + $headerParams['X-Correlation-ID'] = ObjectSerializer::toHeaderValue($x_correlation_id); + } + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + $clientId="{$this->client->config->getAppName()}; {$this->client->config->getAppVersion()}; PhpRestClient; 25.8.3; {$this->client->config->getMachineName()}"; + + $headers['X-Avalara-Client']=$clientId; + + // for model (json/xml) + if (isset($trading_partner)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($trading_partner)); + } else { + $httpBody = $trading_partner; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + $headers = $this->client->applyAuthToRequest($headers, $requiredScopes); + + $defaultHeaders = []; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + $baseUrl = $this->client->config->getBasePath('EInvoicing'); + return new Request( + 'PUT', + $baseUrl . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + +} + /** + * Represents the Request object for the BatchSearchParticipants API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) + * @param string $name A <b>human-readable</b> name for the batch search. (required) + * @param string $notification_email The email address to which a notification will be sent once the batch search is complete. (required) + * @param \SplFileObject $file CSV file containing search parameters. Input Constraints: - Maximum file size: 1 MB - File Header: Must be less than 500 KB - Total number of lines (including header): Must be 101 or fewer (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class BatchSearchParticipantsRequestSdk { + private $avalara_version; + private $name; + private $notification_email; + private $file; + private $x_avalara_client; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getName() { + return $this->name; + } + + public function setName($name) { + $this->name = $name; + } + public function getNotificationEmail() { + return $this->notification_email; + } + + public function setNotificationEmail($notification_email) { + $this->notification_email = $notification_email; + } + public function getFile() { + return $this->file; + } + + public function setFile($file) { + $this->file = $file; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + + /** + * Represents the Request object for the CreateTradingPartner API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) + * @param \Avalara\SDK\Model\EInvoicing\V1\TradingPartner $trading_partner trading_partner (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class CreateTradingPartnerRequestSdk { + private $avalara_version; + private $trading_partner; + private $x_avalara_client; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getTradingPartner() { + return $this->trading_partner; + } + + public function setTradingPartner($trading_partner) { + $this->trading_partner = $trading_partner; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + + /** + * Represents the Request object for the CreateTradingPartnersBatch API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) + * @param \Avalara\SDK\Model\EInvoicing\V1\CreateTradingPartnersBatchRequest $create_trading_partners_batch_request create_trading_partners_batch_request (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class CreateTradingPartnersBatchRequestSdk { + private $avalara_version; + private $create_trading_partners_batch_request; + private $x_avalara_client; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getCreateTradingPartnersBatchRequest() { + return $this->create_trading_partners_batch_request; + } + + public function setCreateTradingPartnersBatchRequest($create_trading_partners_batch_request) { + $this->create_trading_partners_batch_request = $create_trading_partners_batch_request; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + + /** + * Represents the Request object for the DeleteTradingPartner API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) + * @param string $id The ID of the trading partner which is being deleted. (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class DeleteTradingPartnerRequestSdk { + private $avalara_version; + private $id; + private $x_avalara_client; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getId() { + return $this->id; + } + + public function setId($id) { + $this->id = $id; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + + /** + * Represents the Request object for the DownloadBatchSearchReport API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) + * @param string $id The ID of the batch search for which the report should be downloaded. (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class DownloadBatchSearchReportRequestSdk { + private $avalara_version; + private $id; + private $x_avalara_client; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getId() { + return $this->id; + } + + public function setId($id) { + $this->id = $id; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + + /** + * Represents the Request object for the GetBatchSearchDetail API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) + * @param string $id The ID of the batch search that was submitted earlier. (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class GetBatchSearchDetailRequestSdk { + private $avalara_version; + private $id; + private $x_avalara_client; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getId() { + return $this->id; + } + + public function setId($id) { + $this->id = $id; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + + /** + * Represents the Request object for the ListBatchSearches API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param string $filter Filters the results by field name. Only the <code>eq</code> operator and the name field is supported. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). (optional) + * @param bool $count When set to <code>true</code>, returns the total count of matching records included as <code>@recordSetCount</code> in the response body. (optional) + * @param int $top The number of items to include in the result. (optional) + * @param int $skip The number of items to skip in the result. (optional) + * @param string $order_by The <code>$orderBy</code> query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class ListBatchSearchesRequestSdk { + private $avalara_version; + private $x_avalara_client; + private $filter; + private $count; + private $top; + private $skip; + private $order_by; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getFilter() { + return $this->filter; + } + + public function setFilter($filter) { + $this->filter = $filter; + } + public function getCount() { + return $this->count; + } + + public function setCount($count) { + $this->count = $count; + } + public function getTop() { + return $this->top; + } + + public function setTop($top) { + $this->top = $top; + } + public function getSkip() { + return $this->skip; + } + + public function setSkip($skip) { + $this->skip = $skip; + } + public function getOrderBy() { + return $this->order_by; + } + + public function setOrderBy($order_by) { + $this->order_by = $order_by; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + + /** + * Represents the Request object for the SearchParticipants API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) + * @param string $search Search by value supports logical <code>AND</code> / <code>OR</code> operators. Search is performed only over the name and identifier value fields. For more information, refer to [Query options overview - OData.](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search). (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param bool $count When set to <code>true</code>, returns the total count of matching records included as <code>@recordSetCount</code> in the response body. (optional) + * @param string $filter Filters the results using the <code>eq</code> operator. Supported fields: <code>network</code>, <code>country</code>, <code>documentType</code>, <code>idType</code>. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). (optional) + * @param int $top The number of items to include in the result. (optional) + * @param int $skip The number of items to skip in the result. (optional) + * @param string $order_by The <code>$orderBy</code> query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class SearchParticipantsRequestSdk { + private $avalara_version; + private $search; + private $x_avalara_client; + private $count; + private $filter; + private $top; + private $skip; + private $order_by; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getSearch() { + return $this->search; + } + + public function setSearch($search) { + $this->search = $search; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getCount() { + return $this->count; + } + + public function setCount($count) { + $this->count = $count; + } + public function getFilter() { + return $this->filter; + } + + public function setFilter($filter) { + $this->filter = $filter; + } + public function getTop() { + return $this->top; + } + + public function setTop($top) { + $this->top = $top; + } + public function getSkip() { + return $this->skip; + } + + public function setSkip($skip) { + $this->skip = $skip; + } + public function getOrderBy() { + return $this->order_by; + } + + public function setOrderBy($order_by) { + $this->order_by = $order_by; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + + /** + * Represents the Request object for the UpdateTradingPartner API + * + * @param string $avalara_version The HTTP Header meant to specify the version of the API intended to be used. (required) + * @param string $id The ID of the trading partner which is being updated. (required) + * @param \Avalara\SDK\Model\EInvoicing\V1\TradingPartner $trading_partner trading_partner (required) + * @param string $x_avalara_client You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param string $x_correlation_id The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ +class UpdateTradingPartnerRequestSdk { + private $avalara_version; + private $id; + private $trading_partner; + private $x_avalara_client; + private $x_correlation_id; + + public function __construct() { + } + public function getAvalaraVersion() { + return $this->avalara_version ?? '1.4'; + } + + public function setAvalaraVersion($avalara_version) { + $this->avalara_version = $avalara_version; + } + public function getId() { + return $this->id; + } + + public function setId($id) { + $this->id = $id; + } + public function getTradingPartner() { + return $this->trading_partner; + } + + public function setTradingPartner($trading_partner) { + $this->trading_partner = $trading_partner; + } + public function getXAvalaraClient() { + return $this->x_avalara_client; + } + + public function setXAvalaraClient($x_avalara_client) { + $this->x_avalara_client = $x_avalara_client; + } + public function getXCorrelationId() { + return $this->x_correlation_id; + } + + public function setXCorrelationId($x_correlation_id) { + $this->x_correlation_id = $x_correlation_id; + } +} + diff --git a/lib/Model/A1099/V2/Attribute.php b/lib/Model/A1099/V2/Attribute.php deleted file mode 100644 index d29579e..0000000 --- a/lib/Model/A1099/V2/Attribute.php +++ /dev/null @@ -1,818 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Attribute Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Attribute implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Attribute'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'dry_run' => 'bool', - 'upsert' => 'bool', - 'status' => 'string', - 'error_message' => 'string', - 'total_processed' => 'int', - 'total_rows' => 'int', - 'updated_valid' => 'int', - 'updated_no_email' => 'int', - 'updated_invalid' => 'int', - 'skipped_duplicate' => 'int', - 'skipped_invalid' => 'int', - 'skipped_multiple_matches' => 'int', - 'not_found' => 'int', - 'created_invalid' => 'int', - 'created_no_email' => 'int', - 'created_valid' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'dry_run' => null, - 'upsert' => null, - 'status' => null, - 'error_message' => null, - 'total_processed' => 'int32', - 'total_rows' => 'int32', - 'updated_valid' => 'int32', - 'updated_no_email' => 'int32', - 'updated_invalid' => 'int32', - 'skipped_duplicate' => 'int32', - 'skipped_invalid' => 'int32', - 'skipped_multiple_matches' => 'int32', - 'not_found' => 'int32', - 'created_invalid' => 'int32', - 'created_no_email' => 'int32', - 'created_valid' => 'int32' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'dry_run' => 'dryRun', - 'upsert' => 'upsert', - 'status' => 'status', - 'error_message' => 'errorMessage', - 'total_processed' => 'totalProcessed', - 'total_rows' => 'totalRows', - 'updated_valid' => 'updatedValid', - 'updated_no_email' => 'updatedNoEmail', - 'updated_invalid' => 'updatedInvalid', - 'skipped_duplicate' => 'skippedDuplicate', - 'skipped_invalid' => 'skippedInvalid', - 'skipped_multiple_matches' => 'skippedMultipleMatches', - 'not_found' => 'notFound', - 'created_invalid' => 'createdInvalid', - 'created_no_email' => 'createdNoEmail', - 'created_valid' => 'createdValid' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'dry_run' => 'setDryRun', - 'upsert' => 'setUpsert', - 'status' => 'setStatus', - 'error_message' => 'setErrorMessage', - 'total_processed' => 'setTotalProcessed', - 'total_rows' => 'setTotalRows', - 'updated_valid' => 'setUpdatedValid', - 'updated_no_email' => 'setUpdatedNoEmail', - 'updated_invalid' => 'setUpdatedInvalid', - 'skipped_duplicate' => 'setSkippedDuplicate', - 'skipped_invalid' => 'setSkippedInvalid', - 'skipped_multiple_matches' => 'setSkippedMultipleMatches', - 'not_found' => 'setNotFound', - 'created_invalid' => 'setCreatedInvalid', - 'created_no_email' => 'setCreatedNoEmail', - 'created_valid' => 'setCreatedValid' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'dry_run' => 'getDryRun', - 'upsert' => 'getUpsert', - 'status' => 'getStatus', - 'error_message' => 'getErrorMessage', - 'total_processed' => 'getTotalProcessed', - 'total_rows' => 'getTotalRows', - 'updated_valid' => 'getUpdatedValid', - 'updated_no_email' => 'getUpdatedNoEmail', - 'updated_invalid' => 'getUpdatedInvalid', - 'skipped_duplicate' => 'getSkippedDuplicate', - 'skipped_invalid' => 'getSkippedInvalid', - 'skipped_multiple_matches' => 'getSkippedMultipleMatches', - 'not_found' => 'getNotFound', - 'created_invalid' => 'getCreatedInvalid', - 'created_no_email' => 'getCreatedNoEmail', - 'created_valid' => 'getCreatedValid' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const STATUS_IN_PROGRESS = 'InProgress'; - const STATUS_SUCCESS = 'Success'; - const STATUS_FAILED = 'Failed'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getStatusAllowableValues() - { - return [ - self::STATUS_IN_PROGRESS, - self::STATUS_SUCCESS, - self::STATUS_FAILED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['dry_run'] = $data['dry_run'] ?? null; - $this->container['upsert'] = $data['upsert'] ?? null; - $this->container['status'] = $data['status'] ?? null; - $this->container['error_message'] = $data['error_message'] ?? null; - $this->container['total_processed'] = $data['total_processed'] ?? null; - $this->container['total_rows'] = $data['total_rows'] ?? null; - $this->container['updated_valid'] = $data['updated_valid'] ?? null; - $this->container['updated_no_email'] = $data['updated_no_email'] ?? null; - $this->container['updated_invalid'] = $data['updated_invalid'] ?? null; - $this->container['skipped_duplicate'] = $data['skipped_duplicate'] ?? null; - $this->container['skipped_invalid'] = $data['skipped_invalid'] ?? null; - $this->container['skipped_multiple_matches'] = $data['skipped_multiple_matches'] ?? null; - $this->container['not_found'] = $data['not_found'] ?? null; - $this->container['created_invalid'] = $data['created_invalid'] ?? null; - $this->container['created_no_email'] = $data['created_no_email'] ?? null; - $this->container['created_valid'] = $data['created_valid'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'status', must be one of '%s'", - $this->container['status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets dry_run - * - * @return bool|null - */ - public function getDryRun() - { - return $this->container['dry_run']; - } - - /** - * Sets dry_run - * - * @param bool|null $dry_run dry_run - * - * @return self - */ - public function setDryRun($dry_run) - { - $this->container['dry_run'] = $dry_run; - - return $this; - } - - /** - * Gets upsert - * - * @return bool|null - */ - public function getUpsert() - { - return $this->container['upsert']; - } - - /** - * Sets upsert - * - * @param bool|null $upsert upsert - * - * @return self - */ - public function setUpsert($upsert) - { - $this->container['upsert'] = $upsert; - - return $this; - } - - /** - * Gets status - * - * @return string|null - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string|null $status status - * - * @return self - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($status) && !in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets error_message - * - * @return string|null - */ - public function getErrorMessage() - { - return $this->container['error_message']; - } - - /** - * Sets error_message - * - * @param string|null $error_message error_message - * - * @return self - */ - public function setErrorMessage($error_message) - { - $this->container['error_message'] = $error_message; - - return $this; - } - - /** - * Gets total_processed - * - * @return int|null - */ - public function getTotalProcessed() - { - return $this->container['total_processed']; - } - - /** - * Sets total_processed - * - * @param int|null $total_processed total_processed - * - * @return self - */ - public function setTotalProcessed($total_processed) - { - $this->container['total_processed'] = $total_processed; - - return $this; - } - - /** - * Gets total_rows - * - * @return int|null - */ - public function getTotalRows() - { - return $this->container['total_rows']; - } - - /** - * Sets total_rows - * - * @param int|null $total_rows total_rows - * - * @return self - */ - public function setTotalRows($total_rows) - { - $this->container['total_rows'] = $total_rows; - - return $this; - } - - /** - * Gets updated_valid - * - * @return int|null - */ - public function getUpdatedValid() - { - return $this->container['updated_valid']; - } - - /** - * Sets updated_valid - * - * @param int|null $updated_valid updated_valid - * - * @return self - */ - public function setUpdatedValid($updated_valid) - { - $this->container['updated_valid'] = $updated_valid; - - return $this; - } - - /** - * Gets updated_no_email - * - * @return int|null - */ - public function getUpdatedNoEmail() - { - return $this->container['updated_no_email']; - } - - /** - * Sets updated_no_email - * - * @param int|null $updated_no_email updated_no_email - * - * @return self - */ - public function setUpdatedNoEmail($updated_no_email) - { - $this->container['updated_no_email'] = $updated_no_email; - - return $this; - } - - /** - * Gets updated_invalid - * - * @return int|null - */ - public function getUpdatedInvalid() - { - return $this->container['updated_invalid']; - } - - /** - * Sets updated_invalid - * - * @param int|null $updated_invalid updated_invalid - * - * @return self - */ - public function setUpdatedInvalid($updated_invalid) - { - $this->container['updated_invalid'] = $updated_invalid; - - return $this; - } - - /** - * Gets skipped_duplicate - * - * @return int|null - */ - public function getSkippedDuplicate() - { - return $this->container['skipped_duplicate']; - } - - /** - * Sets skipped_duplicate - * - * @param int|null $skipped_duplicate skipped_duplicate - * - * @return self - */ - public function setSkippedDuplicate($skipped_duplicate) - { - $this->container['skipped_duplicate'] = $skipped_duplicate; - - return $this; - } - - /** - * Gets skipped_invalid - * - * @return int|null - */ - public function getSkippedInvalid() - { - return $this->container['skipped_invalid']; - } - - /** - * Sets skipped_invalid - * - * @param int|null $skipped_invalid skipped_invalid - * - * @return self - */ - public function setSkippedInvalid($skipped_invalid) - { - $this->container['skipped_invalid'] = $skipped_invalid; - - return $this; - } - - /** - * Gets skipped_multiple_matches - * - * @return int|null - */ - public function getSkippedMultipleMatches() - { - return $this->container['skipped_multiple_matches']; - } - - /** - * Sets skipped_multiple_matches - * - * @param int|null $skipped_multiple_matches skipped_multiple_matches - * - * @return self - */ - public function setSkippedMultipleMatches($skipped_multiple_matches) - { - $this->container['skipped_multiple_matches'] = $skipped_multiple_matches; - - return $this; - } - - /** - * Gets not_found - * - * @return int|null - */ - public function getNotFound() - { - return $this->container['not_found']; - } - - /** - * Sets not_found - * - * @param int|null $not_found not_found - * - * @return self - */ - public function setNotFound($not_found) - { - $this->container['not_found'] = $not_found; - - return $this; - } - - /** - * Gets created_invalid - * - * @return int|null - */ - public function getCreatedInvalid() - { - return $this->container['created_invalid']; - } - - /** - * Sets created_invalid - * - * @param int|null $created_invalid created_invalid - * - * @return self - */ - public function setCreatedInvalid($created_invalid) - { - $this->container['created_invalid'] = $created_invalid; - - return $this; - } - - /** - * Gets created_no_email - * - * @return int|null - */ - public function getCreatedNoEmail() - { - return $this->container['created_no_email']; - } - - /** - * Sets created_no_email - * - * @param int|null $created_no_email created_no_email - * - * @return self - */ - public function setCreatedNoEmail($created_no_email) - { - $this->container['created_no_email'] = $created_no_email; - - return $this; - } - - /** - * Gets created_valid - * - * @return int|null - */ - public function getCreatedValid() - { - return $this->container['created_valid']; - } - - /** - * Sets created_valid - * - * @param int|null $created_valid created_valid - * - * @return self - */ - public function setCreatedValid($created_valid) - { - $this->container['created_valid'] = $created_valid; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/BaseCompanyModel.php b/lib/Model/A1099/V2/BaseCompanyModel.php deleted file mode 100644 index 07a10ea..0000000 --- a/lib/Model/A1099/V2/BaseCompanyModel.php +++ /dev/null @@ -1,812 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * BaseCompanyModel Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class BaseCompanyModel implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'BaseCompanyModel'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'email' => 'string', - 'address' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'telephone' => 'string', - 'tin' => 'string', - 'dba_name' => 'string', - 'reference_id' => 'string', - 'do_tin_match' => 'bool', - 'group_name' => 'string', - 'foreign_province' => 'string', - 'country_code' => 'string', - 'resend_requests' => 'bool', - 'resend_interval_days' => 'int', - 'max_reminder_attempts' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'email' => null, - 'address' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'telephone' => null, - 'tin' => null, - 'dba_name' => null, - 'reference_id' => null, - 'do_tin_match' => null, - 'group_name' => null, - 'foreign_province' => null, - 'country_code' => null, - 'resend_requests' => null, - 'resend_interval_days' => 'int32', - 'max_reminder_attempts' => 'int32' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'email' => 'email', - 'address' => 'address', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'telephone' => 'telephone', - 'tin' => 'tin', - 'dba_name' => 'dbaName', - 'reference_id' => 'referenceId', - 'do_tin_match' => 'doTinMatch', - 'group_name' => 'groupName', - 'foreign_province' => 'foreignProvince', - 'country_code' => 'countryCode', - 'resend_requests' => 'resendRequests', - 'resend_interval_days' => 'resendIntervalDays', - 'max_reminder_attempts' => 'maxReminderAttempts' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'email' => 'setEmail', - 'address' => 'setAddress', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'telephone' => 'setTelephone', - 'tin' => 'setTin', - 'dba_name' => 'setDbaName', - 'reference_id' => 'setReferenceId', - 'do_tin_match' => 'setDoTinMatch', - 'group_name' => 'setGroupName', - 'foreign_province' => 'setForeignProvince', - 'country_code' => 'setCountryCode', - 'resend_requests' => 'setResendRequests', - 'resend_interval_days' => 'setResendIntervalDays', - 'max_reminder_attempts' => 'setMaxReminderAttempts' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'email' => 'getEmail', - 'address' => 'getAddress', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'telephone' => 'getTelephone', - 'tin' => 'getTin', - 'dba_name' => 'getDbaName', - 'reference_id' => 'getReferenceId', - 'do_tin_match' => 'getDoTinMatch', - 'group_name' => 'getGroupName', - 'foreign_province' => 'getForeignProvince', - 'country_code' => 'getCountryCode', - 'resend_requests' => 'getResendRequests', - 'resend_interval_days' => 'getResendIntervalDays', - 'max_reminder_attempts' => 'getMaxReminderAttempts' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['telephone'] = $data['telephone'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['dba_name'] = $data['dba_name'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['do_tin_match'] = $data['do_tin_match'] ?? null; - $this->container['group_name'] = $data['group_name'] ?? null; - $this->container['foreign_province'] = $data['foreign_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['resend_requests'] = $data['resend_requests'] ?? null; - $this->container['resend_interval_days'] = $data['resend_interval_days'] ?? null; - $this->container['max_reminder_attempts'] = $data['max_reminder_attempts'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email email - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city city - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip zip - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets telephone - * - * @return string|null - */ - public function getTelephone() - { - return $this->container['telephone']; - } - - /** - * Sets telephone - * - * @param string|null $telephone telephone - * - * @return self - */ - public function setTelephone($telephone) - { - $this->container['telephone'] = $telephone; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin tin - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets dba_name - * - * @return string|null - */ - public function getDbaName() - { - return $this->container['dba_name']; - } - - /** - * Sets dba_name - * - * @param string|null $dba_name dba_name - * - * @return self - */ - public function setDbaName($dba_name) - { - $this->container['dba_name'] = $dba_name; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id reference_id - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets do_tin_match - * - * @return bool|null - */ - public function getDoTinMatch() - { - return $this->container['do_tin_match']; - } - - /** - * Sets do_tin_match - * - * @param bool|null $do_tin_match do_tin_match - * - * @return self - */ - public function setDoTinMatch($do_tin_match) - { - $this->container['do_tin_match'] = $do_tin_match; - - return $this; - } - - /** - * Gets group_name - * - * @return string|null - */ - public function getGroupName() - { - return $this->container['group_name']; - } - - /** - * Sets group_name - * - * @param string|null $group_name group_name - * - * @return self - */ - public function setGroupName($group_name) - { - $this->container['group_name'] = $group_name; - - return $this; - } - - /** - * Gets foreign_province - * - * @return string|null - */ - public function getForeignProvince() - { - return $this->container['foreign_province']; - } - - /** - * Sets foreign_province - * - * @param string|null $foreign_province foreign_province - * - * @return self - */ - public function setForeignProvince($foreign_province) - { - $this->container['foreign_province'] = $foreign_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code country_code - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets resend_requests - * - * @return bool|null - */ - public function getResendRequests() - { - return $this->container['resend_requests']; - } - - /** - * Sets resend_requests - * - * @param bool|null $resend_requests resend_requests - * - * @return self - */ - public function setResendRequests($resend_requests) - { - $this->container['resend_requests'] = $resend_requests; - - return $this; - } - - /** - * Gets resend_interval_days - * - * @return int|null - */ - public function getResendIntervalDays() - { - return $this->container['resend_interval_days']; - } - - /** - * Sets resend_interval_days - * - * @param int|null $resend_interval_days resend_interval_days - * - * @return self - */ - public function setResendIntervalDays($resend_interval_days) - { - $this->container['resend_interval_days'] = $resend_interval_days; - - return $this; - } - - /** - * Gets max_reminder_attempts - * - * @return int|null - */ - public function getMaxReminderAttempts() - { - return $this->container['max_reminder_attempts']; - } - - /** - * Sets max_reminder_attempts - * - * @param int|null $max_reminder_attempts max_reminder_attempts - * - * @return self - */ - public function setMaxReminderAttempts($max_reminder_attempts) - { - $this->container['max_reminder_attempts'] = $max_reminder_attempts; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/BaseFormListRequest.php b/lib/Model/A1099/V2/BaseFormListRequest.php deleted file mode 100644 index 5c62ad5..0000000 --- a/lib/Model/A1099/V2/BaseFormListRequest.php +++ /dev/null @@ -1,332 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * BaseFormListRequest Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class BaseFormListRequest implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'BaseFormListRequest'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'form_type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'form_type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'form_type' => 'formType' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'form_type' => 'setFormType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'form_type' => 'getFormType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['form_type'] = $data['form_type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets form_type - * - * @return string|null - */ - public function getFormType() - { - return $this->container['form_type']; - } - - /** - * Sets form_type - * - * @param string|null $form_type form_type - * - * @return self - */ - public function setFormType($form_type) - { - $this->container['form_type'] = $form_type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/BulkUpsert1099FormsRequest.php b/lib/Model/A1099/V2/BulkUpsert1099FormsRequest.php deleted file mode 100644 index 03b39f0..0000000 --- a/lib/Model/A1099/V2/BulkUpsert1099FormsRequest.php +++ /dev/null @@ -1,364 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * BulkUpsert1099FormsRequest Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class BulkUpsert1099FormsRequest implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'BulkUpsert1099Forms_request'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'forms' => '\Avalara\SDK\Model\A1099\V2\Form1099RListItem[]', - 'form_type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'forms' => null, - 'form_type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'forms' => 'forms', - 'form_type' => 'formType' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'forms' => 'setForms', - 'form_type' => 'setFormType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'forms' => 'getForms', - 'form_type' => 'getFormType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['forms'] = $data['forms'] ?? null; - $this->container['form_type'] = $data['form_type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets forms - * - * @return \Avalara\SDK\Model\A1099\V2\Form1099RListItem[]|null - */ - public function getForms() - { - return $this->container['forms']; - } - - /** - * Sets forms - * - * @param \Avalara\SDK\Model\A1099\V2\Form1099RListItem[]|null $forms forms - * - * @return self - */ - public function setForms($forms) - { - - - $this->container['forms'] = $forms; - - return $this; - } - - /** - * Gets form_type - * - * @return string|null - */ - public function getFormType() - { - return $this->container['form_type']; - } - - /** - * Sets form_type - * - * @param string|null $form_type form_type - * - * @return self - */ - public function setFormType($form_type) - { - $this->container['form_type'] = $form_type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/CompanyCreateUpdateRequestModel.php b/lib/Model/A1099/V2/CompanyCreateUpdateRequestModel.php index 60ccb0b..5356f67 100644 --- a/lib/Model/A1099/V2/CompanyCreateUpdateRequestModel.php +++ b/lib/Model/A1099/V2/CompanyCreateUpdateRequestModel.php @@ -72,6 +72,7 @@ class CompanyCreateUpdateRequestModel implements ModelInterface, ArrayAccess, \J */ protected static $openAPITypes = [ 'name' => 'string', + 'dba_name' => 'string', 'email' => 'string', 'address' => 'string', 'city' => 'string', @@ -79,7 +80,6 @@ class CompanyCreateUpdateRequestModel implements ModelInterface, ArrayAccess, \J 'zip' => 'string', 'telephone' => 'string', 'tin' => 'string', - 'dba_name' => 'string', 'reference_id' => 'string', 'do_tin_match' => 'bool', 'group_name' => 'string', @@ -99,6 +99,7 @@ class CompanyCreateUpdateRequestModel implements ModelInterface, ArrayAccess, \J */ protected static $openAPIFormats = [ 'name' => null, + 'dba_name' => null, 'email' => null, 'address' => null, 'city' => null, @@ -106,7 +107,6 @@ class CompanyCreateUpdateRequestModel implements ModelInterface, ArrayAccess, \J 'zip' => null, 'telephone' => null, 'tin' => null, - 'dba_name' => null, 'reference_id' => null, 'do_tin_match' => null, 'group_name' => null, @@ -145,6 +145,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'name' => 'name', + 'dba_name' => 'dbaName', 'email' => 'email', 'address' => 'address', 'city' => 'city', @@ -152,7 +153,6 @@ public static function openAPIFormats() 'zip' => 'zip', 'telephone' => 'telephone', 'tin' => 'tin', - 'dba_name' => 'dbaName', 'reference_id' => 'referenceId', 'do_tin_match' => 'doTinMatch', 'group_name' => 'groupName', @@ -170,6 +170,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'name' => 'setName', + 'dba_name' => 'setDbaName', 'email' => 'setEmail', 'address' => 'setAddress', 'city' => 'setCity', @@ -177,7 +178,6 @@ public static function openAPIFormats() 'zip' => 'setZip', 'telephone' => 'setTelephone', 'tin' => 'setTin', - 'dba_name' => 'setDbaName', 'reference_id' => 'setReferenceId', 'do_tin_match' => 'setDoTinMatch', 'group_name' => 'setGroupName', @@ -195,6 +195,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'name' => 'getName', + 'dba_name' => 'getDbaName', 'email' => 'getEmail', 'address' => 'getAddress', 'city' => 'getCity', @@ -202,7 +203,6 @@ public static function openAPIFormats() 'zip' => 'getZip', 'telephone' => 'getTelephone', 'tin' => 'getTin', - 'dba_name' => 'getDbaName', 'reference_id' => 'getReferenceId', 'do_tin_match' => 'getDoTinMatch', 'group_name' => 'getGroupName', @@ -271,6 +271,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['name'] = $data['name'] ?? null; + $this->container['dba_name'] = $data['dba_name'] ?? null; $this->container['email'] = $data['email'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['city'] = $data['city'] ?? null; @@ -278,7 +279,6 @@ public function __construct(array $data = null) $this->container['zip'] = $data['zip'] ?? null; $this->container['telephone'] = $data['telephone'] ?? null; $this->container['tin'] = $data['tin'] ?? null; - $this->container['dba_name'] = $data['dba_name'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['do_tin_match'] = $data['do_tin_match'] ?? null; $this->container['group_name'] = $data['group_name'] ?? null; @@ -298,6 +298,30 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['zip'] === null) { + $invalidProperties[] = "'zip' can't be null"; + } + if ($this->container['telephone'] === null) { + $invalidProperties[] = "'telephone' can't be null"; + } + if ($this->container['tin'] === null) { + $invalidProperties[] = "'tin' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } return $invalidProperties; } @@ -316,7 +340,7 @@ public function valid() /** * Gets name * - * @return string|null + * @return string */ public function getName() { @@ -326,7 +350,7 @@ public function getName() /** * Sets name * - * @param string|null $name name + * @param string $name Legal name. Not the DBA name. * * @return self */ @@ -338,10 +362,34 @@ public function setName($name) } /** - * Gets email + * Gets dba_name * * @return string|null */ + public function getDbaName() + { + return $this->container['dba_name']; + } + + /** + * Sets dba_name + * + * @param string|null $dba_name Doing Business As (DBA) name or continuation of a long legal name. + * + * @return self + */ + public function setDbaName($dba_name) + { + $this->container['dba_name'] = $dba_name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ public function getEmail() { return $this->container['email']; @@ -350,7 +398,7 @@ public function getEmail() /** * Sets email * - * @param string|null $email email + * @param string $email Contact email address. For inquiries by vendors/employees. * * @return self */ @@ -364,7 +412,7 @@ public function setEmail($email) /** * Gets address * - * @return string|null + * @return string */ public function getAddress() { @@ -374,7 +422,7 @@ public function getAddress() /** * Sets address * - * @param string|null $address address + * @param string $address Address. * * @return self */ @@ -388,7 +436,7 @@ public function setAddress($address) /** * Gets city * - * @return string|null + * @return string */ public function getCity() { @@ -398,7 +446,7 @@ public function getCity() /** * Sets city * - * @param string|null $city city + * @param string $city City. * * @return self */ @@ -422,7 +470,7 @@ public function getState() /** * Sets state * - * @param string|null $state state + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ @@ -436,7 +484,7 @@ public function setState($state) /** * Gets zip * - * @return string|null + * @return string */ public function getZip() { @@ -446,7 +494,7 @@ public function getZip() /** * Sets zip * - * @param string|null $zip zip + * @param string $zip ZIP/postal code. * * @return self */ @@ -460,7 +508,7 @@ public function setZip($zip) /** * Gets telephone * - * @return string|null + * @return string */ public function getTelephone() { @@ -470,7 +518,7 @@ public function getTelephone() /** * Sets telephone * - * @param string|null $telephone telephone + * @param string $telephone Contact phone number (must contain at least 10 digits, max 15 characters). * * @return self */ @@ -484,7 +532,7 @@ public function setTelephone($telephone) /** * Gets tin * - * @return string|null + * @return string */ public function getTin() { @@ -494,7 +542,7 @@ public function getTin() /** * Sets tin * - * @param string|null $tin tin + * @param string $tin Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies). * * @return self */ @@ -505,30 +553,6 @@ public function setTin($tin) return $this; } - /** - * Gets dba_name - * - * @return string|null - */ - public function getDbaName() - { - return $this->container['dba_name']; - } - - /** - * Sets dba_name - * - * @param string|null $dba_name dba_name - * - * @return self - */ - public function setDbaName($dba_name) - { - $this->container['dba_name'] = $dba_name; - - return $this; - } - /** * Gets reference_id * @@ -542,7 +566,7 @@ public function getReferenceId() /** * Sets reference_id * - * @param string|null $reference_id reference_id + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ @@ -566,7 +590,7 @@ public function getDoTinMatch() /** * Sets do_tin_match * - * @param bool|null $do_tin_match do_tin_match + * @param bool|null $do_tin_match Indicates whether the company authorizes IRS TIN matching. * * @return self */ @@ -590,7 +614,7 @@ public function getGroupName() /** * Sets group_name * - * @param string|null $group_name group_name + * @param string|null $group_name Group name for organizing companies (creates or finds group by name). * * @return self */ @@ -614,7 +638,7 @@ public function getForeignProvince() /** * Sets foreign_province * - * @param string|null $foreign_province foreign_province + * @param string|null $foreign_province Province or region for non-US/CA addresses. * * @return self */ @@ -628,7 +652,7 @@ public function setForeignProvince($foreign_province) /** * Gets country_code * - * @return string|null + * @return string */ public function getCountryCode() { @@ -638,7 +662,7 @@ public function getCountryCode() /** * Sets country_code * - * @param string|null $country_code country_code + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ @@ -662,7 +686,7 @@ public function getResendRequests() /** * Sets resend_requests * - * @param bool|null $resend_requests resend_requests + * @param bool|null $resend_requests Boolean to enable automatic reminder emails (default: false). * * @return self */ @@ -686,7 +710,7 @@ public function getResendIntervalDays() /** * Sets resend_interval_days * - * @param int|null $resend_interval_days resend_interval_days + * @param int|null $resend_interval_days Days between reminder emails (7-365, required if resendRequests is true). * * @return self */ @@ -710,7 +734,7 @@ public function getMaxReminderAttempts() /** * Sets max_reminder_attempts * - * @param int|null $max_reminder_attempts max_reminder_attempts + * @param int|null $max_reminder_attempts Maximum number of reminder attempts (1-52, required if resendRequests is true). * * @return self */ diff --git a/lib/Model/A1099/V2/CompanyResponse.php b/lib/Model/A1099/V2/CompanyResponse.php index d529ab2..074b60c 100644 --- a/lib/Model/A1099/V2/CompanyResponse.php +++ b/lib/Model/A1099/V2/CompanyResponse.php @@ -72,25 +72,25 @@ class CompanyResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'id' => 'string', - 'reference_id' => 'string', - 'group_name' => 'string', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', 'name' => 'string', 'dba_name' => 'string', + 'email' => 'string', 'address' => 'string', 'city' => 'string', 'state' => 'string', - 'foreign_province' => 'string', 'zip' => 'string', - 'country_code' => 'string', - 'email' => 'string', 'telephone' => 'string', 'tin' => 'string', + 'reference_id' => 'string', 'do_tin_match' => 'bool', + 'group_name' => 'string', + 'foreign_province' => 'string', + 'country_code' => 'string', 'resend_requests' => 'bool', 'resend_interval_days' => 'int', - 'max_reminder_attempts' => 'int', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' + 'max_reminder_attempts' => 'int' ]; /** @@ -102,25 +102,25 @@ class CompanyResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'id' => null, - 'reference_id' => null, - 'group_name' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time', 'name' => null, 'dba_name' => null, + 'email' => null, 'address' => null, 'city' => null, 'state' => null, - 'foreign_province' => null, 'zip' => null, - 'country_code' => null, - 'email' => null, 'telephone' => null, 'tin' => null, + 'reference_id' => null, 'do_tin_match' => null, + 'group_name' => null, + 'foreign_province' => null, + 'country_code' => null, 'resend_requests' => null, 'resend_interval_days' => 'int32', - 'max_reminder_attempts' => 'int32', - 'created_at' => 'date-time', - 'updated_at' => 'date-time' + 'max_reminder_attempts' => 'int32' ]; /** @@ -151,25 +151,25 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'id' => 'id', - 'reference_id' => 'referenceId', - 'group_name' => 'groupName', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', 'name' => 'name', 'dba_name' => 'dbaName', + 'email' => 'email', 'address' => 'address', 'city' => 'city', 'state' => 'state', - 'foreign_province' => 'foreignProvince', 'zip' => 'zip', - 'country_code' => 'countryCode', - 'email' => 'email', 'telephone' => 'telephone', 'tin' => 'tin', + 'reference_id' => 'referenceId', 'do_tin_match' => 'doTinMatch', + 'group_name' => 'groupName', + 'foreign_province' => 'foreignProvince', + 'country_code' => 'countryCode', 'resend_requests' => 'resendRequests', 'resend_interval_days' => 'resendIntervalDays', - 'max_reminder_attempts' => 'maxReminderAttempts', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt' + 'max_reminder_attempts' => 'maxReminderAttempts' ]; /** @@ -179,25 +179,25 @@ public static function openAPIFormats() */ protected static $setters = [ 'id' => 'setId', - 'reference_id' => 'setReferenceId', - 'group_name' => 'setGroupName', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', 'name' => 'setName', 'dba_name' => 'setDbaName', + 'email' => 'setEmail', 'address' => 'setAddress', 'city' => 'setCity', 'state' => 'setState', - 'foreign_province' => 'setForeignProvince', 'zip' => 'setZip', - 'country_code' => 'setCountryCode', - 'email' => 'setEmail', 'telephone' => 'setTelephone', 'tin' => 'setTin', + 'reference_id' => 'setReferenceId', 'do_tin_match' => 'setDoTinMatch', + 'group_name' => 'setGroupName', + 'foreign_province' => 'setForeignProvince', + 'country_code' => 'setCountryCode', 'resend_requests' => 'setResendRequests', 'resend_interval_days' => 'setResendIntervalDays', - 'max_reminder_attempts' => 'setMaxReminderAttempts', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' + 'max_reminder_attempts' => 'setMaxReminderAttempts' ]; /** @@ -207,25 +207,25 @@ public static function openAPIFormats() */ protected static $getters = [ 'id' => 'getId', - 'reference_id' => 'getReferenceId', - 'group_name' => 'getGroupName', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', 'name' => 'getName', 'dba_name' => 'getDbaName', + 'email' => 'getEmail', 'address' => 'getAddress', 'city' => 'getCity', 'state' => 'getState', - 'foreign_province' => 'getForeignProvince', 'zip' => 'getZip', - 'country_code' => 'getCountryCode', - 'email' => 'getEmail', 'telephone' => 'getTelephone', 'tin' => 'getTin', + 'reference_id' => 'getReferenceId', 'do_tin_match' => 'getDoTinMatch', + 'group_name' => 'getGroupName', + 'foreign_province' => 'getForeignProvince', + 'country_code' => 'getCountryCode', 'resend_requests' => 'getResendRequests', 'resend_interval_days' => 'getResendIntervalDays', - 'max_reminder_attempts' => 'getMaxReminderAttempts', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' + 'max_reminder_attempts' => 'getMaxReminderAttempts' ]; /** @@ -286,25 +286,25 @@ public function getModelName() public function __construct(array $data = null) { $this->container['id'] = $data['id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['group_name'] = $data['group_name'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['name'] = $data['name'] ?? null; $this->container['dba_name'] = $data['dba_name'] ?? null; + $this->container['email'] = $data['email'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['city'] = $data['city'] ?? null; $this->container['state'] = $data['state'] ?? null; - $this->container['foreign_province'] = $data['foreign_province'] ?? null; $this->container['zip'] = $data['zip'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['email'] = $data['email'] ?? null; $this->container['telephone'] = $data['telephone'] ?? null; $this->container['tin'] = $data['tin'] ?? null; + $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['do_tin_match'] = $data['do_tin_match'] ?? null; + $this->container['group_name'] = $data['group_name'] ?? null; + $this->container['foreign_province'] = $data['foreign_province'] ?? null; + $this->container['country_code'] = $data['country_code'] ?? null; $this->container['resend_requests'] = $data['resend_requests'] ?? null; $this->container['resend_interval_days'] = $data['resend_interval_days'] ?? null; $this->container['max_reminder_attempts'] = $data['max_reminder_attempts'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -316,6 +316,30 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['zip'] === null) { + $invalidProperties[] = "'zip' can't be null"; + } + if ($this->container['telephone'] === null) { + $invalidProperties[] = "'telephone' can't be null"; + } + if ($this->container['tin'] === null) { + $invalidProperties[] = "'tin' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } return $invalidProperties; } @@ -344,7 +368,7 @@ public function getId() /** * Sets id * - * @param string|null $id id + * @param string|null $id Unique identifier set when the record is created. * * @return self */ @@ -356,49 +380,49 @@ public function setId($id) } /** - * Gets reference_id + * Gets created_at * - * @return string|null + * @return \DateTime|null */ - public function getReferenceId() + public function getCreatedAt() { - return $this->container['reference_id']; + return $this->container['created_at']; } /** - * Sets reference_id + * Sets created_at * - * @param string|null $reference_id reference_id + * @param \DateTime|null $created_at Date time when the record was created. * * @return self */ - public function setReferenceId($reference_id) + public function setCreatedAt($created_at) { - $this->container['reference_id'] = $reference_id; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets group_name + * Gets updated_at * - * @return string|null + * @return \DateTime|null */ - public function getGroupName() + public function getUpdatedAt() { - return $this->container['group_name']; + return $this->container['updated_at']; } /** - * Sets group_name + * Sets updated_at * - * @param string|null $group_name group_name + * @param \DateTime|null $updated_at Date time when the record was last updated. * * @return self */ - public function setGroupName($group_name) + public function setUpdatedAt($updated_at) { - $this->container['group_name'] = $group_name; + $this->container['updated_at'] = $updated_at; return $this; } @@ -406,7 +430,7 @@ public function setGroupName($group_name) /** * Gets name * - * @return string|null + * @return string */ public function getName() { @@ -416,7 +440,7 @@ public function getName() /** * Sets name * - * @param string|null $name name + * @param string $name Legal name. Not the DBA name. * * @return self */ @@ -440,7 +464,7 @@ public function getDbaName() /** * Sets dba_name * - * @param string|null $dba_name dba_name + * @param string|null $dba_name Doing Business As (DBA) name or continuation of a long legal name. * * @return self */ @@ -451,10 +475,34 @@ public function setDbaName($dba_name) return $this; } + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Contact email address. For inquiries by vendors/employees. + * + * @return self + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** * Gets address * - * @return string|null + * @return string */ public function getAddress() { @@ -464,7 +512,7 @@ public function getAddress() /** * Sets address * - * @param string|null $address address + * @param string $address Address. * * @return self */ @@ -478,7 +526,7 @@ public function setAddress($address) /** * Gets city * - * @return string|null + * @return string */ public function getCity() { @@ -488,7 +536,7 @@ public function getCity() /** * Sets city * - * @param string|null $city city + * @param string $city City. * * @return self */ @@ -512,7 +560,7 @@ public function getState() /** * Sets state * - * @param string|null $state state + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ @@ -524,169 +572,193 @@ public function setState($state) } /** - * Gets foreign_province + * Gets zip * - * @return string|null + * @return string */ - public function getForeignProvince() + public function getZip() { - return $this->container['foreign_province']; + return $this->container['zip']; } /** - * Sets foreign_province + * Sets zip * - * @param string|null $foreign_province foreign_province + * @param string $zip ZIP/postal code. * * @return self */ - public function setForeignProvince($foreign_province) + public function setZip($zip) { - $this->container['foreign_province'] = $foreign_province; + $this->container['zip'] = $zip; return $this; } /** - * Gets zip + * Gets telephone * - * @return string|null + * @return string */ - public function getZip() + public function getTelephone() { - return $this->container['zip']; + return $this->container['telephone']; } /** - * Sets zip + * Sets telephone * - * @param string|null $zip zip + * @param string $telephone Contact phone number (must contain at least 10 digits, max 15 characters). * * @return self */ - public function setZip($zip) + public function setTelephone($telephone) { - $this->container['zip'] = $zip; + $this->container['telephone'] = $telephone; return $this; } /** - * Gets country_code + * Gets tin * - * @return string|null + * @return string */ - public function getCountryCode() + public function getTin() { - return $this->container['country_code']; + return $this->container['tin']; } /** - * Sets country_code + * Sets tin * - * @param string|null $country_code country_code + * @param string $tin Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies). * * @return self */ - public function setCountryCode($country_code) + public function setTin($tin) { - $this->container['country_code'] = $country_code; + $this->container['tin'] = $tin; return $this; } /** - * Gets email + * Gets reference_id * * @return string|null */ - public function getEmail() + public function getReferenceId() { - return $this->container['email']; + return $this->container['reference_id']; } /** - * Sets email + * Sets reference_id * - * @param string|null $email email + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ - public function setEmail($email) + public function setReferenceId($reference_id) { - $this->container['email'] = $email; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets telephone + * Gets do_tin_match + * + * @return bool|null + */ + public function getDoTinMatch() + { + return $this->container['do_tin_match']; + } + + /** + * Sets do_tin_match + * + * @param bool|null $do_tin_match Indicates whether the company authorizes IRS TIN matching. + * + * @return self + */ + public function setDoTinMatch($do_tin_match) + { + $this->container['do_tin_match'] = $do_tin_match; + + return $this; + } + + /** + * Gets group_name * * @return string|null */ - public function getTelephone() + public function getGroupName() { - return $this->container['telephone']; + return $this->container['group_name']; } /** - * Sets telephone + * Sets group_name * - * @param string|null $telephone telephone + * @param string|null $group_name Group name for organizing companies (creates or finds group by name). * * @return self */ - public function setTelephone($telephone) + public function setGroupName($group_name) { - $this->container['telephone'] = $telephone; + $this->container['group_name'] = $group_name; return $this; } /** - * Gets tin + * Gets foreign_province * * @return string|null */ - public function getTin() + public function getForeignProvince() { - return $this->container['tin']; + return $this->container['foreign_province']; } /** - * Sets tin + * Sets foreign_province * - * @param string|null $tin tin + * @param string|null $foreign_province Province or region for non-US/CA addresses. * * @return self */ - public function setTin($tin) + public function setForeignProvince($foreign_province) { - $this->container['tin'] = $tin; + $this->container['foreign_province'] = $foreign_province; return $this; } /** - * Gets do_tin_match + * Gets country_code * - * @return bool|null + * @return string */ - public function getDoTinMatch() + public function getCountryCode() { - return $this->container['do_tin_match']; + return $this->container['country_code']; } /** - * Sets do_tin_match + * Sets country_code * - * @param bool|null $do_tin_match do_tin_match + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ - public function setDoTinMatch($do_tin_match) + public function setCountryCode($country_code) { - $this->container['do_tin_match'] = $do_tin_match; + $this->container['country_code'] = $country_code; return $this; } @@ -704,7 +776,7 @@ public function getResendRequests() /** * Sets resend_requests * - * @param bool|null $resend_requests resend_requests + * @param bool|null $resend_requests Boolean to enable automatic reminder emails (default: false). * * @return self */ @@ -728,7 +800,7 @@ public function getResendIntervalDays() /** * Sets resend_interval_days * - * @param int|null $resend_interval_days resend_interval_days + * @param int|null $resend_interval_days Days between reminder emails (7-365, required if resendRequests is true). * * @return self */ @@ -752,7 +824,7 @@ public function getMaxReminderAttempts() /** * Sets max_reminder_attempts * - * @param int|null $max_reminder_attempts max_reminder_attempts + * @param int|null $max_reminder_attempts Maximum number of reminder attempts (1-52, required if resendRequests is true). * * @return self */ @@ -762,54 +834,6 @@ public function setMaxReminderAttempts($max_reminder_attempts) return $this; } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at created_at - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at updated_at - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/CoveredIndividualRequest.php b/lib/Model/A1099/V2/CoveredIndividual.php similarity index 93% rename from lib/Model/A1099/V2/CoveredIndividualRequest.php rename to lib/Model/A1099/V2/CoveredIndividual.php index 94a3a9f..c519a7e 100644 --- a/lib/Model/A1099/V2/CoveredIndividualRequest.php +++ b/lib/Model/A1099/V2/CoveredIndividual.php @@ -1,6 +1,6 @@ 'string', 'first_name' => 'string', 'middle_name' => 'string', 'last_name' => 'string', @@ -100,12 +102,13 @@ class CoveredIndividualRequest implements ModelInterface, ArrayAccess, \JsonSeri * @psalm-var array */ protected static $openAPIFormats = [ + 'id' => null, 'first_name' => null, 'middle_name' => null, 'last_name' => null, 'name_suffix' => null, 'tin' => null, - 'birth_date' => 'date-time', + 'birth_date' => 'date', 'covered_all_months' => null, 'covered_january' => null, 'covered_february' => null, @@ -148,6 +151,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'id' => 'id', 'first_name' => 'firstName', 'middle_name' => 'middleName', 'last_name' => 'lastName', @@ -175,6 +179,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'id' => 'setId', 'first_name' => 'setFirstName', 'middle_name' => 'setMiddleName', 'last_name' => 'setLastName', @@ -202,6 +207,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'id' => 'getId', 'first_name' => 'getFirstName', 'middle_name' => 'getMiddleName', 'last_name' => 'getLastName', @@ -280,6 +286,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['id'] = $data['id'] ?? null; $this->container['first_name'] = $data['first_name'] ?? null; $this->container['middle_name'] = $data['middle_name'] ?? null; $this->container['last_name'] = $data['last_name'] ?? null; @@ -310,6 +317,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['first_name'] === null) { + $invalidProperties[] = "'first_name' can't be null"; + } + if ($this->container['last_name'] === null) { + $invalidProperties[] = "'last_name' can't be null"; + } return $invalidProperties; } @@ -326,10 +339,34 @@ public function valid() /** - * Gets first_name + * Gets id * * @return string|null */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Covered individual's ID + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets first_name + * + * @return string + */ public function getFirstName() { return $this->container['first_name']; @@ -338,7 +375,7 @@ public function getFirstName() /** * Sets first_name * - * @param string|null $first_name Covered individual's first name + * @param string $first_name Covered individual's first name * * @return self */ @@ -376,7 +413,7 @@ public function setMiddleName($middle_name) /** * Gets last_name * - * @return string|null + * @return string */ public function getLastName() { @@ -386,7 +423,7 @@ public function getLastName() /** * Sets last_name * - * @param string|null $last_name Covered individual's last name + * @param string $last_name Covered individual's last name * * @return self */ @@ -434,7 +471,7 @@ public function getTin() /** * Sets tin * - * @param string|null $tin Covered individual's TIN (SSN or ITIN) + * @param string|null $tin Covered individual's Federal Tax Identification Number (TIN).. SSN or ITIN. Required unless unavailable. * * @return self */ @@ -458,7 +495,7 @@ public function getBirthDate() /** * Sets birth_date * - * @param \DateTime|null $birth_date Covered individual's date of birth + * @param \DateTime|null $birth_date Covered individual's date of birth - Required when SSN is missing. * * @return self */ diff --git a/lib/Model/A1099/V2/CoveredIndividualReference.php b/lib/Model/A1099/V2/CoveredIndividualReference.php deleted file mode 100644 index c7ab7ed..0000000 --- a/lib/Model/A1099/V2/CoveredIndividualReference.php +++ /dev/null @@ -1,932 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * CoveredIndividualReference Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class CoveredIndividualReference implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'CoveredIndividualReference'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'first_name' => 'string', - 'middle_name' => 'string', - 'last_name' => 'string', - 'name_suffix' => 'string', - 'tin' => 'string', - 'birth_date' => '\DateTime', - 'covered_month0' => 'bool', - 'covered_month1' => 'bool', - 'covered_month2' => 'bool', - 'covered_month3' => 'bool', - 'covered_month4' => 'bool', - 'covered_month5' => 'bool', - 'covered_month6' => 'bool', - 'covered_month7' => 'bool', - 'covered_month8' => 'bool', - 'covered_month9' => 'bool', - 'covered_month10' => 'bool', - 'covered_month11' => 'bool', - 'covered_month12' => 'bool', - 'id' => 'string', - 'type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'first_name' => null, - 'middle_name' => null, - 'last_name' => null, - 'name_suffix' => null, - 'tin' => null, - 'birth_date' => 'date-time', - 'covered_month0' => null, - 'covered_month1' => null, - 'covered_month2' => null, - 'covered_month3' => null, - 'covered_month4' => null, - 'covered_month5' => null, - 'covered_month6' => null, - 'covered_month7' => null, - 'covered_month8' => null, - 'covered_month9' => null, - 'covered_month10' => null, - 'covered_month11' => null, - 'covered_month12' => null, - 'id' => null, - 'type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'first_name' => 'firstName', - 'middle_name' => 'middleName', - 'last_name' => 'lastName', - 'name_suffix' => 'nameSuffix', - 'tin' => 'tin', - 'birth_date' => 'birthDate', - 'covered_month0' => 'coveredMonth0', - 'covered_month1' => 'coveredMonth1', - 'covered_month2' => 'coveredMonth2', - 'covered_month3' => 'coveredMonth3', - 'covered_month4' => 'coveredMonth4', - 'covered_month5' => 'coveredMonth5', - 'covered_month6' => 'coveredMonth6', - 'covered_month7' => 'coveredMonth7', - 'covered_month8' => 'coveredMonth8', - 'covered_month9' => 'coveredMonth9', - 'covered_month10' => 'coveredMonth10', - 'covered_month11' => 'coveredMonth11', - 'covered_month12' => 'coveredMonth12', - 'id' => 'id', - 'type' => 'type' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'first_name' => 'setFirstName', - 'middle_name' => 'setMiddleName', - 'last_name' => 'setLastName', - 'name_suffix' => 'setNameSuffix', - 'tin' => 'setTin', - 'birth_date' => 'setBirthDate', - 'covered_month0' => 'setCoveredMonth0', - 'covered_month1' => 'setCoveredMonth1', - 'covered_month2' => 'setCoveredMonth2', - 'covered_month3' => 'setCoveredMonth3', - 'covered_month4' => 'setCoveredMonth4', - 'covered_month5' => 'setCoveredMonth5', - 'covered_month6' => 'setCoveredMonth6', - 'covered_month7' => 'setCoveredMonth7', - 'covered_month8' => 'setCoveredMonth8', - 'covered_month9' => 'setCoveredMonth9', - 'covered_month10' => 'setCoveredMonth10', - 'covered_month11' => 'setCoveredMonth11', - 'covered_month12' => 'setCoveredMonth12', - 'id' => 'setId', - 'type' => 'setType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'first_name' => 'getFirstName', - 'middle_name' => 'getMiddleName', - 'last_name' => 'getLastName', - 'name_suffix' => 'getNameSuffix', - 'tin' => 'getTin', - 'birth_date' => 'getBirthDate', - 'covered_month0' => 'getCoveredMonth0', - 'covered_month1' => 'getCoveredMonth1', - 'covered_month2' => 'getCoveredMonth2', - 'covered_month3' => 'getCoveredMonth3', - 'covered_month4' => 'getCoveredMonth4', - 'covered_month5' => 'getCoveredMonth5', - 'covered_month6' => 'getCoveredMonth6', - 'covered_month7' => 'getCoveredMonth7', - 'covered_month8' => 'getCoveredMonth8', - 'covered_month9' => 'getCoveredMonth9', - 'covered_month10' => 'getCoveredMonth10', - 'covered_month11' => 'getCoveredMonth11', - 'covered_month12' => 'getCoveredMonth12', - 'id' => 'getId', - 'type' => 'getType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['first_name'] = $data['first_name'] ?? null; - $this->container['middle_name'] = $data['middle_name'] ?? null; - $this->container['last_name'] = $data['last_name'] ?? null; - $this->container['name_suffix'] = $data['name_suffix'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['birth_date'] = $data['birth_date'] ?? null; - $this->container['covered_month0'] = $data['covered_month0'] ?? null; - $this->container['covered_month1'] = $data['covered_month1'] ?? null; - $this->container['covered_month2'] = $data['covered_month2'] ?? null; - $this->container['covered_month3'] = $data['covered_month3'] ?? null; - $this->container['covered_month4'] = $data['covered_month4'] ?? null; - $this->container['covered_month5'] = $data['covered_month5'] ?? null; - $this->container['covered_month6'] = $data['covered_month6'] ?? null; - $this->container['covered_month7'] = $data['covered_month7'] ?? null; - $this->container['covered_month8'] = $data['covered_month8'] ?? null; - $this->container['covered_month9'] = $data['covered_month9'] ?? null; - $this->container['covered_month10'] = $data['covered_month10'] ?? null; - $this->container['covered_month11'] = $data['covered_month11'] ?? null; - $this->container['covered_month12'] = $data['covered_month12'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets first_name - * - * @return string|null - */ - public function getFirstName() - { - return $this->container['first_name']; - } - - /** - * Sets first_name - * - * @param string|null $first_name first_name - * - * @return self - */ - public function setFirstName($first_name) - { - $this->container['first_name'] = $first_name; - - return $this; - } - - /** - * Gets middle_name - * - * @return string|null - */ - public function getMiddleName() - { - return $this->container['middle_name']; - } - - /** - * Sets middle_name - * - * @param string|null $middle_name middle_name - * - * @return self - */ - public function setMiddleName($middle_name) - { - $this->container['middle_name'] = $middle_name; - - return $this; - } - - /** - * Gets last_name - * - * @return string|null - */ - public function getLastName() - { - return $this->container['last_name']; - } - - /** - * Sets last_name - * - * @param string|null $last_name last_name - * - * @return self - */ - public function setLastName($last_name) - { - $this->container['last_name'] = $last_name; - - return $this; - } - - /** - * Gets name_suffix - * - * @return string|null - */ - public function getNameSuffix() - { - return $this->container['name_suffix']; - } - - /** - * Sets name_suffix - * - * @param string|null $name_suffix name_suffix - * - * @return self - */ - public function setNameSuffix($name_suffix) - { - $this->container['name_suffix'] = $name_suffix; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin tin - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets birth_date - * - * @return \DateTime|null - */ - public function getBirthDate() - { - return $this->container['birth_date']; - } - - /** - * Sets birth_date - * - * @param \DateTime|null $birth_date birth_date - * - * @return self - */ - public function setBirthDate($birth_date) - { - $this->container['birth_date'] = $birth_date; - - return $this; - } - - /** - * Gets covered_month0 - * - * @return bool|null - */ - public function getCoveredMonth0() - { - return $this->container['covered_month0']; - } - - /** - * Sets covered_month0 - * - * @param bool|null $covered_month0 covered_month0 - * - * @return self - */ - public function setCoveredMonth0($covered_month0) - { - $this->container['covered_month0'] = $covered_month0; - - return $this; - } - - /** - * Gets covered_month1 - * - * @return bool|null - */ - public function getCoveredMonth1() - { - return $this->container['covered_month1']; - } - - /** - * Sets covered_month1 - * - * @param bool|null $covered_month1 covered_month1 - * - * @return self - */ - public function setCoveredMonth1($covered_month1) - { - $this->container['covered_month1'] = $covered_month1; - - return $this; - } - - /** - * Gets covered_month2 - * - * @return bool|null - */ - public function getCoveredMonth2() - { - return $this->container['covered_month2']; - } - - /** - * Sets covered_month2 - * - * @param bool|null $covered_month2 covered_month2 - * - * @return self - */ - public function setCoveredMonth2($covered_month2) - { - $this->container['covered_month2'] = $covered_month2; - - return $this; - } - - /** - * Gets covered_month3 - * - * @return bool|null - */ - public function getCoveredMonth3() - { - return $this->container['covered_month3']; - } - - /** - * Sets covered_month3 - * - * @param bool|null $covered_month3 covered_month3 - * - * @return self - */ - public function setCoveredMonth3($covered_month3) - { - $this->container['covered_month3'] = $covered_month3; - - return $this; - } - - /** - * Gets covered_month4 - * - * @return bool|null - */ - public function getCoveredMonth4() - { - return $this->container['covered_month4']; - } - - /** - * Sets covered_month4 - * - * @param bool|null $covered_month4 covered_month4 - * - * @return self - */ - public function setCoveredMonth4($covered_month4) - { - $this->container['covered_month4'] = $covered_month4; - - return $this; - } - - /** - * Gets covered_month5 - * - * @return bool|null - */ - public function getCoveredMonth5() - { - return $this->container['covered_month5']; - } - - /** - * Sets covered_month5 - * - * @param bool|null $covered_month5 covered_month5 - * - * @return self - */ - public function setCoveredMonth5($covered_month5) - { - $this->container['covered_month5'] = $covered_month5; - - return $this; - } - - /** - * Gets covered_month6 - * - * @return bool|null - */ - public function getCoveredMonth6() - { - return $this->container['covered_month6']; - } - - /** - * Sets covered_month6 - * - * @param bool|null $covered_month6 covered_month6 - * - * @return self - */ - public function setCoveredMonth6($covered_month6) - { - $this->container['covered_month6'] = $covered_month6; - - return $this; - } - - /** - * Gets covered_month7 - * - * @return bool|null - */ - public function getCoveredMonth7() - { - return $this->container['covered_month7']; - } - - /** - * Sets covered_month7 - * - * @param bool|null $covered_month7 covered_month7 - * - * @return self - */ - public function setCoveredMonth7($covered_month7) - { - $this->container['covered_month7'] = $covered_month7; - - return $this; - } - - /** - * Gets covered_month8 - * - * @return bool|null - */ - public function getCoveredMonth8() - { - return $this->container['covered_month8']; - } - - /** - * Sets covered_month8 - * - * @param bool|null $covered_month8 covered_month8 - * - * @return self - */ - public function setCoveredMonth8($covered_month8) - { - $this->container['covered_month8'] = $covered_month8; - - return $this; - } - - /** - * Gets covered_month9 - * - * @return bool|null - */ - public function getCoveredMonth9() - { - return $this->container['covered_month9']; - } - - /** - * Sets covered_month9 - * - * @param bool|null $covered_month9 covered_month9 - * - * @return self - */ - public function setCoveredMonth9($covered_month9) - { - $this->container['covered_month9'] = $covered_month9; - - return $this; - } - - /** - * Gets covered_month10 - * - * @return bool|null - */ - public function getCoveredMonth10() - { - return $this->container['covered_month10']; - } - - /** - * Sets covered_month10 - * - * @param bool|null $covered_month10 covered_month10 - * - * @return self - */ - public function setCoveredMonth10($covered_month10) - { - $this->container['covered_month10'] = $covered_month10; - - return $this; - } - - /** - * Gets covered_month11 - * - * @return bool|null - */ - public function getCoveredMonth11() - { - return $this->container['covered_month11']; - } - - /** - * Sets covered_month11 - * - * @param bool|null $covered_month11 covered_month11 - * - * @return self - */ - public function setCoveredMonth11($covered_month11) - { - $this->container['covered_month11'] = $covered_month11; - - return $this; - } - - /** - * Gets covered_month12 - * - * @return bool|null - */ - public function getCoveredMonth12() - { - return $this->container['covered_month12']; - } - - /** - * Sets covered_month12 - * - * @param bool|null $covered_month12 covered_month12 - * - * @return self - */ - public function setCoveredMonth12($covered_month12) - { - $this->container['covered_month12'] = $covered_month12; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/CoveredIndividualReferenceResponse.php b/lib/Model/A1099/V2/CoveredIndividualReferenceResponse.php deleted file mode 100644 index ac5a054..0000000 --- a/lib/Model/A1099/V2/CoveredIndividualReferenceResponse.php +++ /dev/null @@ -1,902 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * CoveredIndividualReferenceResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class CoveredIndividualReferenceResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'CoveredIndividualReferenceResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'id' => 'string', - 'first_name' => 'string', - 'middle_name' => 'string', - 'last_name' => 'string', - 'name_suffix' => 'string', - 'tin' => 'string', - 'birth_date' => '\DateTime', - 'covered_month0' => 'bool', - 'covered_month1' => 'bool', - 'covered_month2' => 'bool', - 'covered_month3' => 'bool', - 'covered_month4' => 'bool', - 'covered_month5' => 'bool', - 'covered_month6' => 'bool', - 'covered_month7' => 'bool', - 'covered_month8' => 'bool', - 'covered_month9' => 'bool', - 'covered_month10' => 'bool', - 'covered_month11' => 'bool', - 'covered_month12' => 'bool' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'id' => null, - 'first_name' => null, - 'middle_name' => null, - 'last_name' => null, - 'name_suffix' => null, - 'tin' => null, - 'birth_date' => 'date-time', - 'covered_month0' => null, - 'covered_month1' => null, - 'covered_month2' => null, - 'covered_month3' => null, - 'covered_month4' => null, - 'covered_month5' => null, - 'covered_month6' => null, - 'covered_month7' => null, - 'covered_month8' => null, - 'covered_month9' => null, - 'covered_month10' => null, - 'covered_month11' => null, - 'covered_month12' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'first_name' => 'firstName', - 'middle_name' => 'middleName', - 'last_name' => 'lastName', - 'name_suffix' => 'nameSuffix', - 'tin' => 'tin', - 'birth_date' => 'birthDate', - 'covered_month0' => 'coveredMonth0', - 'covered_month1' => 'coveredMonth1', - 'covered_month2' => 'coveredMonth2', - 'covered_month3' => 'coveredMonth3', - 'covered_month4' => 'coveredMonth4', - 'covered_month5' => 'coveredMonth5', - 'covered_month6' => 'coveredMonth6', - 'covered_month7' => 'coveredMonth7', - 'covered_month8' => 'coveredMonth8', - 'covered_month9' => 'coveredMonth9', - 'covered_month10' => 'coveredMonth10', - 'covered_month11' => 'coveredMonth11', - 'covered_month12' => 'coveredMonth12' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'first_name' => 'setFirstName', - 'middle_name' => 'setMiddleName', - 'last_name' => 'setLastName', - 'name_suffix' => 'setNameSuffix', - 'tin' => 'setTin', - 'birth_date' => 'setBirthDate', - 'covered_month0' => 'setCoveredMonth0', - 'covered_month1' => 'setCoveredMonth1', - 'covered_month2' => 'setCoveredMonth2', - 'covered_month3' => 'setCoveredMonth3', - 'covered_month4' => 'setCoveredMonth4', - 'covered_month5' => 'setCoveredMonth5', - 'covered_month6' => 'setCoveredMonth6', - 'covered_month7' => 'setCoveredMonth7', - 'covered_month8' => 'setCoveredMonth8', - 'covered_month9' => 'setCoveredMonth9', - 'covered_month10' => 'setCoveredMonth10', - 'covered_month11' => 'setCoveredMonth11', - 'covered_month12' => 'setCoveredMonth12' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'first_name' => 'getFirstName', - 'middle_name' => 'getMiddleName', - 'last_name' => 'getLastName', - 'name_suffix' => 'getNameSuffix', - 'tin' => 'getTin', - 'birth_date' => 'getBirthDate', - 'covered_month0' => 'getCoveredMonth0', - 'covered_month1' => 'getCoveredMonth1', - 'covered_month2' => 'getCoveredMonth2', - 'covered_month3' => 'getCoveredMonth3', - 'covered_month4' => 'getCoveredMonth4', - 'covered_month5' => 'getCoveredMonth5', - 'covered_month6' => 'getCoveredMonth6', - 'covered_month7' => 'getCoveredMonth7', - 'covered_month8' => 'getCoveredMonth8', - 'covered_month9' => 'getCoveredMonth9', - 'covered_month10' => 'getCoveredMonth10', - 'covered_month11' => 'getCoveredMonth11', - 'covered_month12' => 'getCoveredMonth12' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = $data['id'] ?? null; - $this->container['first_name'] = $data['first_name'] ?? null; - $this->container['middle_name'] = $data['middle_name'] ?? null; - $this->container['last_name'] = $data['last_name'] ?? null; - $this->container['name_suffix'] = $data['name_suffix'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['birth_date'] = $data['birth_date'] ?? null; - $this->container['covered_month0'] = $data['covered_month0'] ?? null; - $this->container['covered_month1'] = $data['covered_month1'] ?? null; - $this->container['covered_month2'] = $data['covered_month2'] ?? null; - $this->container['covered_month3'] = $data['covered_month3'] ?? null; - $this->container['covered_month4'] = $data['covered_month4'] ?? null; - $this->container['covered_month5'] = $data['covered_month5'] ?? null; - $this->container['covered_month6'] = $data['covered_month6'] ?? null; - $this->container['covered_month7'] = $data['covered_month7'] ?? null; - $this->container['covered_month8'] = $data['covered_month8'] ?? null; - $this->container['covered_month9'] = $data['covered_month9'] ?? null; - $this->container['covered_month10'] = $data['covered_month10'] ?? null; - $this->container['covered_month11'] = $data['covered_month11'] ?? null; - $this->container['covered_month12'] = $data['covered_month12'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Covered individual ID - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets first_name - * - * @return string|null - */ - public function getFirstName() - { - return $this->container['first_name']; - } - - /** - * Sets first_name - * - * @param string|null $first_name Covered individual's first name - * - * @return self - */ - public function setFirstName($first_name) - { - $this->container['first_name'] = $first_name; - - return $this; - } - - /** - * Gets middle_name - * - * @return string|null - */ - public function getMiddleName() - { - return $this->container['middle_name']; - } - - /** - * Sets middle_name - * - * @param string|null $middle_name Covered individual's middle name - * - * @return self - */ - public function setMiddleName($middle_name) - { - $this->container['middle_name'] = $middle_name; - - return $this; - } - - /** - * Gets last_name - * - * @return string|null - */ - public function getLastName() - { - return $this->container['last_name']; - } - - /** - * Sets last_name - * - * @param string|null $last_name Covered individual's last name - * - * @return self - */ - public function setLastName($last_name) - { - $this->container['last_name'] = $last_name; - - return $this; - } - - /** - * Gets name_suffix - * - * @return string|null - */ - public function getNameSuffix() - { - return $this->container['name_suffix']; - } - - /** - * Sets name_suffix - * - * @param string|null $name_suffix Covered individual's name suffix - * - * @return self - */ - public function setNameSuffix($name_suffix) - { - $this->container['name_suffix'] = $name_suffix; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin Covered individual's TIN (SSN or ITIN) - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets birth_date - * - * @return \DateTime|null - */ - public function getBirthDate() - { - return $this->container['birth_date']; - } - - /** - * Sets birth_date - * - * @param \DateTime|null $birth_date Covered individual's date of birth - * - * @return self - */ - public function setBirthDate($birth_date) - { - $this->container['birth_date'] = $birth_date; - - return $this; - } - - /** - * Gets covered_month0 - * - * @return bool|null - */ - public function getCoveredMonth0() - { - return $this->container['covered_month0']; - } - - /** - * Sets covered_month0 - * - * @param bool|null $covered_month0 Coverage indicator for all 12 months - * - * @return self - */ - public function setCoveredMonth0($covered_month0) - { - $this->container['covered_month0'] = $covered_month0; - - return $this; - } - - /** - * Gets covered_month1 - * - * @return bool|null - */ - public function getCoveredMonth1() - { - return $this->container['covered_month1']; - } - - /** - * Sets covered_month1 - * - * @param bool|null $covered_month1 Coverage indicator for January - * - * @return self - */ - public function setCoveredMonth1($covered_month1) - { - $this->container['covered_month1'] = $covered_month1; - - return $this; - } - - /** - * Gets covered_month2 - * - * @return bool|null - */ - public function getCoveredMonth2() - { - return $this->container['covered_month2']; - } - - /** - * Sets covered_month2 - * - * @param bool|null $covered_month2 Coverage indicator for February - * - * @return self - */ - public function setCoveredMonth2($covered_month2) - { - $this->container['covered_month2'] = $covered_month2; - - return $this; - } - - /** - * Gets covered_month3 - * - * @return bool|null - */ - public function getCoveredMonth3() - { - return $this->container['covered_month3']; - } - - /** - * Sets covered_month3 - * - * @param bool|null $covered_month3 Coverage indicator for March - * - * @return self - */ - public function setCoveredMonth3($covered_month3) - { - $this->container['covered_month3'] = $covered_month3; - - return $this; - } - - /** - * Gets covered_month4 - * - * @return bool|null - */ - public function getCoveredMonth4() - { - return $this->container['covered_month4']; - } - - /** - * Sets covered_month4 - * - * @param bool|null $covered_month4 Coverage indicator for April - * - * @return self - */ - public function setCoveredMonth4($covered_month4) - { - $this->container['covered_month4'] = $covered_month4; - - return $this; - } - - /** - * Gets covered_month5 - * - * @return bool|null - */ - public function getCoveredMonth5() - { - return $this->container['covered_month5']; - } - - /** - * Sets covered_month5 - * - * @param bool|null $covered_month5 Coverage indicator for May - * - * @return self - */ - public function setCoveredMonth5($covered_month5) - { - $this->container['covered_month5'] = $covered_month5; - - return $this; - } - - /** - * Gets covered_month6 - * - * @return bool|null - */ - public function getCoveredMonth6() - { - return $this->container['covered_month6']; - } - - /** - * Sets covered_month6 - * - * @param bool|null $covered_month6 Coverage indicator for June - * - * @return self - */ - public function setCoveredMonth6($covered_month6) - { - $this->container['covered_month6'] = $covered_month6; - - return $this; - } - - /** - * Gets covered_month7 - * - * @return bool|null - */ - public function getCoveredMonth7() - { - return $this->container['covered_month7']; - } - - /** - * Sets covered_month7 - * - * @param bool|null $covered_month7 Coverage indicator for July - * - * @return self - */ - public function setCoveredMonth7($covered_month7) - { - $this->container['covered_month7'] = $covered_month7; - - return $this; - } - - /** - * Gets covered_month8 - * - * @return bool|null - */ - public function getCoveredMonth8() - { - return $this->container['covered_month8']; - } - - /** - * Sets covered_month8 - * - * @param bool|null $covered_month8 Coverage indicator for August - * - * @return self - */ - public function setCoveredMonth8($covered_month8) - { - $this->container['covered_month8'] = $covered_month8; - - return $this; - } - - /** - * Gets covered_month9 - * - * @return bool|null - */ - public function getCoveredMonth9() - { - return $this->container['covered_month9']; - } - - /** - * Sets covered_month9 - * - * @param bool|null $covered_month9 Coverage indicator for September - * - * @return self - */ - public function setCoveredMonth9($covered_month9) - { - $this->container['covered_month9'] = $covered_month9; - - return $this; - } - - /** - * Gets covered_month10 - * - * @return bool|null - */ - public function getCoveredMonth10() - { - return $this->container['covered_month10']; - } - - /** - * Sets covered_month10 - * - * @param bool|null $covered_month10 Coverage indicator for October - * - * @return self - */ - public function setCoveredMonth10($covered_month10) - { - $this->container['covered_month10'] = $covered_month10; - - return $this; - } - - /** - * Gets covered_month11 - * - * @return bool|null - */ - public function getCoveredMonth11() - { - return $this->container['covered_month11']; - } - - /** - * Sets covered_month11 - * - * @param bool|null $covered_month11 Coverage indicator for November - * - * @return self - */ - public function setCoveredMonth11($covered_month11) - { - $this->container['covered_month11'] = $covered_month11; - - return $this; - } - - /** - * Gets covered_month12 - * - * @return bool|null - */ - public function getCoveredMonth12() - { - return $this->container['covered_month12']; - } - - /** - * Sets covered_month12 - * - * @param bool|null $covered_month12 Coverage indicator for December - * - * @return self - */ - public function setCoveredMonth12($covered_month12) - { - $this->container['covered_month12'] = $covered_month12; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Create1099Form201Response.php b/lib/Model/A1099/V2/Create1099Form201Response.php deleted file mode 100644 index 3a56863..0000000 --- a/lib/Model/A1099/V2/Create1099Form201Response.php +++ /dev/null @@ -1,4470 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Create1099Form201Response Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Create1099Form201Response implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Create1099Form_201_response'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'id' => 'string', - 'type' => 'string', - 'issuer_id' => 'int', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', - 'tin' => 'string', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'recipient_name' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'fatca_filing_requirement' => 'bool', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse', - 'unique_form_id' => 'string', - 'recipient_date_of_birth' => '\DateTime', - 'recipient_giin' => 'string', - 'recipient_foreign_tin' => 'string', - 'lob_code' => 'string', - 'income_code' => 'string', - 'gross_income' => 'float', - 'withholding_indicator' => 'string', - 'tax_country_code' => 'string', - 'exemption_code_chap3' => 'string', - 'exemption_code_chap4' => 'string', - 'tax_rate_chap3' => 'string', - 'withholding_allowance' => 'float', - 'federal_tax_withheld' => 'float', - 'tax_not_deposited_indicator' => 'bool', - 'academic_indicator' => 'bool', - 'tax_withheld_other_agents' => 'float', - 'amount_repaid' => 'float', - 'tax_paid_agent' => 'float', - 'chap3_status_code' => 'string', - 'chap4_status_code' => 'string', - 'primary_withholding_agent' => '\Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentResponse', - 'intermediary_or_flow_through' => '\Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughResponse', - 'origin_of_health_coverage_code' => 'string', - 'covered_individuals' => '\Avalara\SDK\Model\A1099\V2\CoveredIndividualReferenceResponse[]', - 'total_ordinary_dividends' => 'string', - 'qualified_dividends' => 'string', - 'total_capital_gain_distributions' => 'string', - 'unrecaptured_section1250_gain' => 'string', - 'section1202_gain' => 'string', - 'collectibles_gain' => 'string', - 'section897_ordinary_dividends' => 'string', - 'section897_capital_gain' => 'string', - 'nondividend_distributions' => 'string', - 'federal_income_tax_withheld' => 'float', - 'section199_a_dividends' => 'string', - 'investment_expenses' => 'string', - 'foreign_tax_paid' => 'string', - 'foreign_country_or_us_possession' => 'string', - 'cash_liquidation_distributions' => 'string', - 'noncash_liquidation_distributions' => 'string', - 'exempt_interest_dividends' => 'string', - 'specified_private_activity_bond_interest_dividends' => 'string', - 'filer_type' => 'string', - 'payment_type' => 'string', - 'payment_settlement_entity_name_phone_number' => 'string', - 'gross_amount_payment_card' => 'float', - 'card_not_present_transactions' => 'float', - 'merchant_category_code' => 'string', - 'payment_transaction_number' => 'float', - 'january' => 'float', - 'february' => 'float', - 'march' => 'float', - 'april' => 'float', - 'may' => 'float', - 'june' => 'float', - 'july' => 'float', - 'august' => 'float', - 'sept' => 'float', - 'october' => 'float', - 'november' => 'float', - 'december' => 'float', - 'rents' => 'float', - 'royalties' => 'float', - 'other_income' => 'float', - 'fed_income_tax_withheld' => 'float', - 'fishing_boat_proceeds' => 'float', - 'medical_and_health_care_payments' => 'float', - 'substitute_payments' => 'float', - 'direct_sales_indicator' => 'bool', - 'crop_insurance_proceeds' => 'float', - 'excess_golden_parachute_payments' => 'float', - 'gross_proceeds_paid_to_attorney' => 'float', - 'fish_purchased_for_resale' => 'float', - 'section409_a_deferrals' => 'float', - 'nonqualified_deferred_compensation' => 'float', - 'nonemployee_compensation' => 'float', - 'gross_distributions' => 'float', - 'taxable_amount' => 'float', - 'taxable_amount_not_determined' => 'bool', - 'total_distribution_indicator' => 'bool', - 'capital_gain' => 'float', - 'employee_contributions' => 'float', - 'net_unrealized_appreciation' => 'float', - 'distribution_code_required' => 'string', - 'distribution_code_optional' => 'string', - 'ira_sep_simple_indicator' => 'bool', - 'total_ira_sep_simple_distribution' => 'float', - 'other' => 'float', - 'other_percent' => 'string', - 'percentage_total_distribution' => 'string', - 'total_employee_contributions' => 'float', - 'amount_allocable_to_irr' => 'float', - 'first_year_designated_roth_contrib' => 'string', - 'fatca_requirement_indicator' => 'bool', - 'date_of_payment' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'id' => null, - 'type' => null, - 'issuer_id' => 'int32', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, - 'e_delivery_status' => null, - 'reference_id' => null, - 'email' => null, - 'tin_type' => null, - 'tin' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'recipient_name' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'non_us_province' => null, - 'country_code' => null, - 'account_number' => null, - 'office_code' => null, - 'fatca_filing_requirement' => null, - 'validation_errors' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null, - 'unique_form_id' => null, - 'recipient_date_of_birth' => 'date-time', - 'recipient_giin' => null, - 'recipient_foreign_tin' => null, - 'lob_code' => null, - 'income_code' => null, - 'gross_income' => 'double', - 'withholding_indicator' => null, - 'tax_country_code' => null, - 'exemption_code_chap3' => null, - 'exemption_code_chap4' => null, - 'tax_rate_chap3' => null, - 'withholding_allowance' => 'double', - 'federal_tax_withheld' => 'double', - 'tax_not_deposited_indicator' => null, - 'academic_indicator' => null, - 'tax_withheld_other_agents' => 'double', - 'amount_repaid' => 'double', - 'tax_paid_agent' => 'double', - 'chap3_status_code' => null, - 'chap4_status_code' => null, - 'primary_withholding_agent' => null, - 'intermediary_or_flow_through' => null, - 'origin_of_health_coverage_code' => null, - 'covered_individuals' => null, - 'total_ordinary_dividends' => null, - 'qualified_dividends' => null, - 'total_capital_gain_distributions' => null, - 'unrecaptured_section1250_gain' => null, - 'section1202_gain' => null, - 'collectibles_gain' => null, - 'section897_ordinary_dividends' => null, - 'section897_capital_gain' => null, - 'nondividend_distributions' => null, - 'federal_income_tax_withheld' => 'double', - 'section199_a_dividends' => null, - 'investment_expenses' => null, - 'foreign_tax_paid' => null, - 'foreign_country_or_us_possession' => null, - 'cash_liquidation_distributions' => null, - 'noncash_liquidation_distributions' => null, - 'exempt_interest_dividends' => null, - 'specified_private_activity_bond_interest_dividends' => null, - 'filer_type' => null, - 'payment_type' => null, - 'payment_settlement_entity_name_phone_number' => null, - 'gross_amount_payment_card' => 'double', - 'card_not_present_transactions' => 'double', - 'merchant_category_code' => null, - 'payment_transaction_number' => 'double', - 'january' => 'double', - 'february' => 'double', - 'march' => 'double', - 'april' => 'double', - 'may' => 'double', - 'june' => 'double', - 'july' => 'double', - 'august' => 'double', - 'sept' => 'double', - 'october' => 'double', - 'november' => 'double', - 'december' => 'double', - 'rents' => 'double', - 'royalties' => 'double', - 'other_income' => 'double', - 'fed_income_tax_withheld' => 'double', - 'fishing_boat_proceeds' => 'double', - 'medical_and_health_care_payments' => 'double', - 'substitute_payments' => 'double', - 'direct_sales_indicator' => null, - 'crop_insurance_proceeds' => 'double', - 'excess_golden_parachute_payments' => 'double', - 'gross_proceeds_paid_to_attorney' => 'double', - 'fish_purchased_for_resale' => 'double', - 'section409_a_deferrals' => 'double', - 'nonqualified_deferred_compensation' => 'double', - 'nonemployee_compensation' => 'double', - 'gross_distributions' => 'double', - 'taxable_amount' => 'double', - 'taxable_amount_not_determined' => null, - 'total_distribution_indicator' => null, - 'capital_gain' => 'double', - 'employee_contributions' => 'double', - 'net_unrealized_appreciation' => 'double', - 'distribution_code_required' => null, - 'distribution_code_optional' => null, - 'ira_sep_simple_indicator' => null, - 'total_ira_sep_simple_distribution' => 'double', - 'other' => 'double', - 'other_percent' => null, - 'percentage_total_distribution' => null, - 'total_employee_contributions' => 'double', - 'amount_allocable_to_irr' => 'double', - 'first_year_designated_roth_contrib' => null, - 'fatca_requirement_indicator' => null, - 'date_of_payment' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', - 'tin' => 'tin', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'recipient_name' => 'recipientName', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'validation_errors' => 'validationErrors', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'unique_form_id' => 'uniqueFormId', - 'recipient_date_of_birth' => 'recipientDateOfBirth', - 'recipient_giin' => 'recipientGiin', - 'recipient_foreign_tin' => 'recipientForeignTin', - 'lob_code' => 'lobCode', - 'income_code' => 'incomeCode', - 'gross_income' => 'grossIncome', - 'withholding_indicator' => 'withholdingIndicator', - 'tax_country_code' => 'taxCountryCode', - 'exemption_code_chap3' => 'exemptionCodeChap3', - 'exemption_code_chap4' => 'exemptionCodeChap4', - 'tax_rate_chap3' => 'taxRateChap3', - 'withholding_allowance' => 'withholdingAllowance', - 'federal_tax_withheld' => 'federalTaxWithheld', - 'tax_not_deposited_indicator' => 'taxNotDepositedIndicator', - 'academic_indicator' => 'academicIndicator', - 'tax_withheld_other_agents' => 'taxWithheldOtherAgents', - 'amount_repaid' => 'amountRepaid', - 'tax_paid_agent' => 'taxPaidAgent', - 'chap3_status_code' => 'chap3StatusCode', - 'chap4_status_code' => 'chap4StatusCode', - 'primary_withholding_agent' => 'primaryWithholdingAgent', - 'intermediary_or_flow_through' => 'intermediaryOrFlowThrough', - 'origin_of_health_coverage_code' => 'originOfHealthCoverageCode', - 'covered_individuals' => 'coveredIndividuals', - 'total_ordinary_dividends' => 'totalOrdinaryDividends', - 'qualified_dividends' => 'qualifiedDividends', - 'total_capital_gain_distributions' => 'totalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'unrecapturedSection1250Gain', - 'section1202_gain' => 'section1202Gain', - 'collectibles_gain' => 'collectiblesGain', - 'section897_ordinary_dividends' => 'section897OrdinaryDividends', - 'section897_capital_gain' => 'section897CapitalGain', - 'nondividend_distributions' => 'nondividendDistributions', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'section199_a_dividends' => 'section199ADividends', - 'investment_expenses' => 'investmentExpenses', - 'foreign_tax_paid' => 'foreignTaxPaid', - 'foreign_country_or_us_possession' => 'foreignCountryOrUSPossession', - 'cash_liquidation_distributions' => 'cashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'noncashLiquidationDistributions', - 'exempt_interest_dividends' => 'exemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'specifiedPrivateActivityBondInterestDividends', - 'filer_type' => 'filerType', - 'payment_type' => 'paymentType', - 'payment_settlement_entity_name_phone_number' => 'paymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'grossAmountPaymentCard', - 'card_not_present_transactions' => 'cardNotPresentTransactions', - 'merchant_category_code' => 'merchantCategoryCode', - 'payment_transaction_number' => 'paymentTransactionNumber', - 'january' => 'january', - 'february' => 'february', - 'march' => 'march', - 'april' => 'april', - 'may' => 'may', - 'june' => 'june', - 'july' => 'july', - 'august' => 'august', - 'sept' => 'sept', - 'october' => 'october', - 'november' => 'november', - 'december' => 'december', - 'rents' => 'rents', - 'royalties' => 'royalties', - 'other_income' => 'otherIncome', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'fishingBoatProceeds', - 'medical_and_health_care_payments' => 'medicalAndHealthCarePayments', - 'substitute_payments' => 'substitutePayments', - 'direct_sales_indicator' => 'directSalesIndicator', - 'crop_insurance_proceeds' => 'cropInsuranceProceeds', - 'excess_golden_parachute_payments' => 'excessGoldenParachutePayments', - 'gross_proceeds_paid_to_attorney' => 'grossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'fishPurchasedForResale', - 'section409_a_deferrals' => 'section409ADeferrals', - 'nonqualified_deferred_compensation' => 'nonqualifiedDeferredCompensation', - 'nonemployee_compensation' => 'nonemployeeCompensation', - 'gross_distributions' => 'grossDistributions', - 'taxable_amount' => 'taxableAmount', - 'taxable_amount_not_determined' => 'taxableAmountNotDetermined', - 'total_distribution_indicator' => 'totalDistributionIndicator', - 'capital_gain' => 'capitalGain', - 'employee_contributions' => 'employeeContributions', - 'net_unrealized_appreciation' => 'netUnrealizedAppreciation', - 'distribution_code_required' => 'distributionCodeRequired', - 'distribution_code_optional' => 'distributionCodeOptional', - 'ira_sep_simple_indicator' => 'iraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'totalIraSepSimpleDistribution', - 'other' => 'other', - 'other_percent' => 'otherPercent', - 'percentage_total_distribution' => 'percentageTotalDistribution', - 'total_employee_contributions' => 'totalEmployeeContributions', - 'amount_allocable_to_irr' => 'amountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'firstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'fatcaRequirementIndicator', - 'date_of_payment' => 'dateOfPayment' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', - 'tin' => 'setTin', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'recipient_name' => 'setRecipientName', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'validation_errors' => 'setValidationErrors', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'unique_form_id' => 'setUniqueFormId', - 'recipient_date_of_birth' => 'setRecipientDateOfBirth', - 'recipient_giin' => 'setRecipientGiin', - 'recipient_foreign_tin' => 'setRecipientForeignTin', - 'lob_code' => 'setLobCode', - 'income_code' => 'setIncomeCode', - 'gross_income' => 'setGrossIncome', - 'withholding_indicator' => 'setWithholdingIndicator', - 'tax_country_code' => 'setTaxCountryCode', - 'exemption_code_chap3' => 'setExemptionCodeChap3', - 'exemption_code_chap4' => 'setExemptionCodeChap4', - 'tax_rate_chap3' => 'setTaxRateChap3', - 'withholding_allowance' => 'setWithholdingAllowance', - 'federal_tax_withheld' => 'setFederalTaxWithheld', - 'tax_not_deposited_indicator' => 'setTaxNotDepositedIndicator', - 'academic_indicator' => 'setAcademicIndicator', - 'tax_withheld_other_agents' => 'setTaxWithheldOtherAgents', - 'amount_repaid' => 'setAmountRepaid', - 'tax_paid_agent' => 'setTaxPaidAgent', - 'chap3_status_code' => 'setChap3StatusCode', - 'chap4_status_code' => 'setChap4StatusCode', - 'primary_withholding_agent' => 'setPrimaryWithholdingAgent', - 'intermediary_or_flow_through' => 'setIntermediaryOrFlowThrough', - 'origin_of_health_coverage_code' => 'setOriginOfHealthCoverageCode', - 'covered_individuals' => 'setCoveredIndividuals', - 'total_ordinary_dividends' => 'setTotalOrdinaryDividends', - 'qualified_dividends' => 'setQualifiedDividends', - 'total_capital_gain_distributions' => 'setTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'setUnrecapturedSection1250Gain', - 'section1202_gain' => 'setSection1202Gain', - 'collectibles_gain' => 'setCollectiblesGain', - 'section897_ordinary_dividends' => 'setSection897OrdinaryDividends', - 'section897_capital_gain' => 'setSection897CapitalGain', - 'nondividend_distributions' => 'setNondividendDistributions', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'section199_a_dividends' => 'setSection199ADividends', - 'investment_expenses' => 'setInvestmentExpenses', - 'foreign_tax_paid' => 'setForeignTaxPaid', - 'foreign_country_or_us_possession' => 'setForeignCountryOrUsPossession', - 'cash_liquidation_distributions' => 'setCashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'setNoncashLiquidationDistributions', - 'exempt_interest_dividends' => 'setExemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'setSpecifiedPrivateActivityBondInterestDividends', - 'filer_type' => 'setFilerType', - 'payment_type' => 'setPaymentType', - 'payment_settlement_entity_name_phone_number' => 'setPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'setGrossAmountPaymentCard', - 'card_not_present_transactions' => 'setCardNotPresentTransactions', - 'merchant_category_code' => 'setMerchantCategoryCode', - 'payment_transaction_number' => 'setPaymentTransactionNumber', - 'january' => 'setJanuary', - 'february' => 'setFebruary', - 'march' => 'setMarch', - 'april' => 'setApril', - 'may' => 'setMay', - 'june' => 'setJune', - 'july' => 'setJuly', - 'august' => 'setAugust', - 'sept' => 'setSept', - 'october' => 'setOctober', - 'november' => 'setNovember', - 'december' => 'setDecember', - 'rents' => 'setRents', - 'royalties' => 'setRoyalties', - 'other_income' => 'setOtherIncome', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'setFishingBoatProceeds', - 'medical_and_health_care_payments' => 'setMedicalAndHealthCarePayments', - 'substitute_payments' => 'setSubstitutePayments', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'crop_insurance_proceeds' => 'setCropInsuranceProceeds', - 'excess_golden_parachute_payments' => 'setExcessGoldenParachutePayments', - 'gross_proceeds_paid_to_attorney' => 'setGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'setFishPurchasedForResale', - 'section409_a_deferrals' => 'setSection409ADeferrals', - 'nonqualified_deferred_compensation' => 'setNonqualifiedDeferredCompensation', - 'nonemployee_compensation' => 'setNonemployeeCompensation', - 'gross_distributions' => 'setGrossDistributions', - 'taxable_amount' => 'setTaxableAmount', - 'taxable_amount_not_determined' => 'setTaxableAmountNotDetermined', - 'total_distribution_indicator' => 'setTotalDistributionIndicator', - 'capital_gain' => 'setCapitalGain', - 'employee_contributions' => 'setEmployeeContributions', - 'net_unrealized_appreciation' => 'setNetUnrealizedAppreciation', - 'distribution_code_required' => 'setDistributionCodeRequired', - 'distribution_code_optional' => 'setDistributionCodeOptional', - 'ira_sep_simple_indicator' => 'setIraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'setTotalIraSepSimpleDistribution', - 'other' => 'setOther', - 'other_percent' => 'setOtherPercent', - 'percentage_total_distribution' => 'setPercentageTotalDistribution', - 'total_employee_contributions' => 'setTotalEmployeeContributions', - 'amount_allocable_to_irr' => 'setAmountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'setFirstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'setFatcaRequirementIndicator', - 'date_of_payment' => 'setDateOfPayment' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', - 'tin' => 'getTin', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'recipient_name' => 'getRecipientName', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'validation_errors' => 'getValidationErrors', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'unique_form_id' => 'getUniqueFormId', - 'recipient_date_of_birth' => 'getRecipientDateOfBirth', - 'recipient_giin' => 'getRecipientGiin', - 'recipient_foreign_tin' => 'getRecipientForeignTin', - 'lob_code' => 'getLobCode', - 'income_code' => 'getIncomeCode', - 'gross_income' => 'getGrossIncome', - 'withholding_indicator' => 'getWithholdingIndicator', - 'tax_country_code' => 'getTaxCountryCode', - 'exemption_code_chap3' => 'getExemptionCodeChap3', - 'exemption_code_chap4' => 'getExemptionCodeChap4', - 'tax_rate_chap3' => 'getTaxRateChap3', - 'withholding_allowance' => 'getWithholdingAllowance', - 'federal_tax_withheld' => 'getFederalTaxWithheld', - 'tax_not_deposited_indicator' => 'getTaxNotDepositedIndicator', - 'academic_indicator' => 'getAcademicIndicator', - 'tax_withheld_other_agents' => 'getTaxWithheldOtherAgents', - 'amount_repaid' => 'getAmountRepaid', - 'tax_paid_agent' => 'getTaxPaidAgent', - 'chap3_status_code' => 'getChap3StatusCode', - 'chap4_status_code' => 'getChap4StatusCode', - 'primary_withholding_agent' => 'getPrimaryWithholdingAgent', - 'intermediary_or_flow_through' => 'getIntermediaryOrFlowThrough', - 'origin_of_health_coverage_code' => 'getOriginOfHealthCoverageCode', - 'covered_individuals' => 'getCoveredIndividuals', - 'total_ordinary_dividends' => 'getTotalOrdinaryDividends', - 'qualified_dividends' => 'getQualifiedDividends', - 'total_capital_gain_distributions' => 'getTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'getUnrecapturedSection1250Gain', - 'section1202_gain' => 'getSection1202Gain', - 'collectibles_gain' => 'getCollectiblesGain', - 'section897_ordinary_dividends' => 'getSection897OrdinaryDividends', - 'section897_capital_gain' => 'getSection897CapitalGain', - 'nondividend_distributions' => 'getNondividendDistributions', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'section199_a_dividends' => 'getSection199ADividends', - 'investment_expenses' => 'getInvestmentExpenses', - 'foreign_tax_paid' => 'getForeignTaxPaid', - 'foreign_country_or_us_possession' => 'getForeignCountryOrUsPossession', - 'cash_liquidation_distributions' => 'getCashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'getNoncashLiquidationDistributions', - 'exempt_interest_dividends' => 'getExemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'getSpecifiedPrivateActivityBondInterestDividends', - 'filer_type' => 'getFilerType', - 'payment_type' => 'getPaymentType', - 'payment_settlement_entity_name_phone_number' => 'getPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'getGrossAmountPaymentCard', - 'card_not_present_transactions' => 'getCardNotPresentTransactions', - 'merchant_category_code' => 'getMerchantCategoryCode', - 'payment_transaction_number' => 'getPaymentTransactionNumber', - 'january' => 'getJanuary', - 'february' => 'getFebruary', - 'march' => 'getMarch', - 'april' => 'getApril', - 'may' => 'getMay', - 'june' => 'getJune', - 'july' => 'getJuly', - 'august' => 'getAugust', - 'sept' => 'getSept', - 'october' => 'getOctober', - 'november' => 'getNovember', - 'december' => 'getDecember', - 'rents' => 'getRents', - 'royalties' => 'getRoyalties', - 'other_income' => 'getOtherIncome', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'getFishingBoatProceeds', - 'medical_and_health_care_payments' => 'getMedicalAndHealthCarePayments', - 'substitute_payments' => 'getSubstitutePayments', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'crop_insurance_proceeds' => 'getCropInsuranceProceeds', - 'excess_golden_parachute_payments' => 'getExcessGoldenParachutePayments', - 'gross_proceeds_paid_to_attorney' => 'getGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'getFishPurchasedForResale', - 'section409_a_deferrals' => 'getSection409ADeferrals', - 'nonqualified_deferred_compensation' => 'getNonqualifiedDeferredCompensation', - 'nonemployee_compensation' => 'getNonemployeeCompensation', - 'gross_distributions' => 'getGrossDistributions', - 'taxable_amount' => 'getTaxableAmount', - 'taxable_amount_not_determined' => 'getTaxableAmountNotDetermined', - 'total_distribution_indicator' => 'getTotalDistributionIndicator', - 'capital_gain' => 'getCapitalGain', - 'employee_contributions' => 'getEmployeeContributions', - 'net_unrealized_appreciation' => 'getNetUnrealizedAppreciation', - 'distribution_code_required' => 'getDistributionCodeRequired', - 'distribution_code_optional' => 'getDistributionCodeOptional', - 'ira_sep_simple_indicator' => 'getIraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'getTotalIraSepSimpleDistribution', - 'other' => 'getOther', - 'other_percent' => 'getOtherPercent', - 'percentage_total_distribution' => 'getPercentageTotalDistribution', - 'total_employee_contributions' => 'getTotalEmployeeContributions', - 'amount_allocable_to_irr' => 'getAmountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'getFirstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'getFatcaRequirementIndicator', - 'date_of_payment' => 'getDateOfPayment' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const FILER_TYPE_PSE = 'PSE'; - const FILER_TYPE_EPF = 'EPF'; - const FILER_TYPE_OTHER = 'Other'; - const PAYMENT_TYPE_MERCHANT_PAYMENT_CARD = 'MerchantPaymentCard'; - const PAYMENT_TYPE_THIRD_PARTY_NETWORK = 'ThirdPartyNetwork'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getFilerTypeAllowableValues() - { - return [ - self::FILER_TYPE_PSE, - self::FILER_TYPE_EPF, - self::FILER_TYPE_OTHER, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPaymentTypeAllowableValues() - { - return [ - self::PAYMENT_TYPE_MERCHANT_PAYMENT_CARD, - self::PAYMENT_TYPE_THIRD_PARTY_NETWORK, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['unique_form_id'] = $data['unique_form_id'] ?? null; - $this->container['recipient_date_of_birth'] = $data['recipient_date_of_birth'] ?? null; - $this->container['recipient_giin'] = $data['recipient_giin'] ?? null; - $this->container['recipient_foreign_tin'] = $data['recipient_foreign_tin'] ?? null; - $this->container['lob_code'] = $data['lob_code'] ?? null; - $this->container['income_code'] = $data['income_code'] ?? null; - $this->container['gross_income'] = $data['gross_income'] ?? null; - $this->container['withholding_indicator'] = $data['withholding_indicator'] ?? null; - $this->container['tax_country_code'] = $data['tax_country_code'] ?? null; - $this->container['exemption_code_chap3'] = $data['exemption_code_chap3'] ?? null; - $this->container['exemption_code_chap4'] = $data['exemption_code_chap4'] ?? null; - $this->container['tax_rate_chap3'] = $data['tax_rate_chap3'] ?? null; - $this->container['withholding_allowance'] = $data['withholding_allowance'] ?? null; - $this->container['federal_tax_withheld'] = $data['federal_tax_withheld'] ?? null; - $this->container['tax_not_deposited_indicator'] = $data['tax_not_deposited_indicator'] ?? null; - $this->container['academic_indicator'] = $data['academic_indicator'] ?? null; - $this->container['tax_withheld_other_agents'] = $data['tax_withheld_other_agents'] ?? null; - $this->container['amount_repaid'] = $data['amount_repaid'] ?? null; - $this->container['tax_paid_agent'] = $data['tax_paid_agent'] ?? null; - $this->container['chap3_status_code'] = $data['chap3_status_code'] ?? null; - $this->container['chap4_status_code'] = $data['chap4_status_code'] ?? null; - $this->container['primary_withholding_agent'] = $data['primary_withholding_agent'] ?? null; - $this->container['intermediary_or_flow_through'] = $data['intermediary_or_flow_through'] ?? null; - $this->container['origin_of_health_coverage_code'] = $data['origin_of_health_coverage_code'] ?? null; - $this->container['covered_individuals'] = $data['covered_individuals'] ?? null; - $this->container['total_ordinary_dividends'] = $data['total_ordinary_dividends'] ?? null; - $this->container['qualified_dividends'] = $data['qualified_dividends'] ?? null; - $this->container['total_capital_gain_distributions'] = $data['total_capital_gain_distributions'] ?? null; - $this->container['unrecaptured_section1250_gain'] = $data['unrecaptured_section1250_gain'] ?? null; - $this->container['section1202_gain'] = $data['section1202_gain'] ?? null; - $this->container['collectibles_gain'] = $data['collectibles_gain'] ?? null; - $this->container['section897_ordinary_dividends'] = $data['section897_ordinary_dividends'] ?? null; - $this->container['section897_capital_gain'] = $data['section897_capital_gain'] ?? null; - $this->container['nondividend_distributions'] = $data['nondividend_distributions'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['section199_a_dividends'] = $data['section199_a_dividends'] ?? null; - $this->container['investment_expenses'] = $data['investment_expenses'] ?? null; - $this->container['foreign_tax_paid'] = $data['foreign_tax_paid'] ?? null; - $this->container['foreign_country_or_us_possession'] = $data['foreign_country_or_us_possession'] ?? null; - $this->container['cash_liquidation_distributions'] = $data['cash_liquidation_distributions'] ?? null; - $this->container['noncash_liquidation_distributions'] = $data['noncash_liquidation_distributions'] ?? null; - $this->container['exempt_interest_dividends'] = $data['exempt_interest_dividends'] ?? null; - $this->container['specified_private_activity_bond_interest_dividends'] = $data['specified_private_activity_bond_interest_dividends'] ?? null; - $this->container['filer_type'] = $data['filer_type'] ?? null; - $this->container['payment_type'] = $data['payment_type'] ?? null; - $this->container['payment_settlement_entity_name_phone_number'] = $data['payment_settlement_entity_name_phone_number'] ?? null; - $this->container['gross_amount_payment_card'] = $data['gross_amount_payment_card'] ?? null; - $this->container['card_not_present_transactions'] = $data['card_not_present_transactions'] ?? null; - $this->container['merchant_category_code'] = $data['merchant_category_code'] ?? null; - $this->container['payment_transaction_number'] = $data['payment_transaction_number'] ?? null; - $this->container['january'] = $data['january'] ?? null; - $this->container['february'] = $data['february'] ?? null; - $this->container['march'] = $data['march'] ?? null; - $this->container['april'] = $data['april'] ?? null; - $this->container['may'] = $data['may'] ?? null; - $this->container['june'] = $data['june'] ?? null; - $this->container['july'] = $data['july'] ?? null; - $this->container['august'] = $data['august'] ?? null; - $this->container['sept'] = $data['sept'] ?? null; - $this->container['october'] = $data['october'] ?? null; - $this->container['november'] = $data['november'] ?? null; - $this->container['december'] = $data['december'] ?? null; - $this->container['rents'] = $data['rents'] ?? null; - $this->container['royalties'] = $data['royalties'] ?? null; - $this->container['other_income'] = $data['other_income'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; - $this->container['fishing_boat_proceeds'] = $data['fishing_boat_proceeds'] ?? null; - $this->container['medical_and_health_care_payments'] = $data['medical_and_health_care_payments'] ?? null; - $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['crop_insurance_proceeds'] = $data['crop_insurance_proceeds'] ?? null; - $this->container['excess_golden_parachute_payments'] = $data['excess_golden_parachute_payments'] ?? null; - $this->container['gross_proceeds_paid_to_attorney'] = $data['gross_proceeds_paid_to_attorney'] ?? null; - $this->container['fish_purchased_for_resale'] = $data['fish_purchased_for_resale'] ?? null; - $this->container['section409_a_deferrals'] = $data['section409_a_deferrals'] ?? null; - $this->container['nonqualified_deferred_compensation'] = $data['nonqualified_deferred_compensation'] ?? null; - $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - $this->container['gross_distributions'] = $data['gross_distributions'] ?? null; - $this->container['taxable_amount'] = $data['taxable_amount'] ?? null; - $this->container['taxable_amount_not_determined'] = $data['taxable_amount_not_determined'] ?? null; - $this->container['total_distribution_indicator'] = $data['total_distribution_indicator'] ?? null; - $this->container['capital_gain'] = $data['capital_gain'] ?? null; - $this->container['employee_contributions'] = $data['employee_contributions'] ?? null; - $this->container['net_unrealized_appreciation'] = $data['net_unrealized_appreciation'] ?? null; - $this->container['distribution_code_required'] = $data['distribution_code_required'] ?? null; - $this->container['distribution_code_optional'] = $data['distribution_code_optional'] ?? null; - $this->container['ira_sep_simple_indicator'] = $data['ira_sep_simple_indicator'] ?? null; - $this->container['total_ira_sep_simple_distribution'] = $data['total_ira_sep_simple_distribution'] ?? null; - $this->container['other'] = $data['other'] ?? null; - $this->container['other_percent'] = $data['other_percent'] ?? null; - $this->container['percentage_total_distribution'] = $data['percentage_total_distribution'] ?? null; - $this->container['total_employee_contributions'] = $data['total_employee_contributions'] ?? null; - $this->container['amount_allocable_to_irr'] = $data['amount_allocable_to_irr'] ?? null; - $this->container['first_year_designated_roth_contrib'] = $data['first_year_designated_roth_contrib'] ?? null; - $this->container['fatca_requirement_indicator'] = $data['fatca_requirement_indicator'] ?? null; - $this->container['date_of_payment'] = $data['date_of_payment'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ((mb_strlen($this->container['id']) < 1)) { - $invalidProperties[] = "invalid value for 'id', the character length must be bigger than or equal to 1."; - } - - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ((mb_strlen($this->container['type']) < 1)) { - $invalidProperties[] = "invalid value for 'type', the character length must be bigger than or equal to 1."; - } - - if ($this->container['issuer_id'] === null) { - $invalidProperties[] = "'issuer_id' can't be null"; - } - if ($this->container['federal_efile'] === null) { - $invalidProperties[] = "'federal_efile' can't be null"; - } - if ($this->container['state_efile'] === null) { - $invalidProperties[] = "'state_efile' can't be null"; - } - if ($this->container['postal_mail'] === null) { - $invalidProperties[] = "'postal_mail' can't be null"; - } - if ($this->container['tin_match'] === null) { - $invalidProperties[] = "'tin_match' can't be null"; - } - if ($this->container['address_verification'] === null) { - $invalidProperties[] = "'address_verification' can't be null"; - } - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($this->container['filer_type']) && !in_array($this->container['filer_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'filer_type', must be one of '%s'", - $this->container['filer_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($this->container['payment_type']) && !in_array($this->container['payment_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'payment_type', must be one of '%s'", - $this->container['payment_type'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID of the form - * - * @return self - */ - public function setId($id) - { - - if ((mb_strlen($id) < 1)) { - throw new \InvalidArgumentException('invalid length for $id when calling Create1099Form201Response., must be bigger than or equal to 1.'); - } - - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * - * @return self - */ - public function setType($type) - { - - if ((mb_strlen($type) < 1)) { - throw new \InvalidArgumentException('invalid length for $type when calling Create1099Form201Response., must be bigger than or equal to 1.'); - } - - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return int - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param int $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets federal_efile - * - * @return bool - */ - public function getFederalEfile() - { - return $this->container['federal_efile']; - } - - /** - * Sets federal_efile - * - * @param bool $federal_efile Boolean indicating that federal e-filing has been scheduled for this form - * - * @return self - */ - public function setFederalEfile($federal_efile) - { - $this->container['federal_efile'] = $federal_efile; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status Federal e-file status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets state_efile - * - * @return bool - */ - public function getStateEfile() - { - return $this->container['state_efile']; - } - - /** - * Sets state_efile - * - * @param bool $state_efile Boolean indicating that state e-filing has been scheduled for this form - * - * @return self - */ - public function setStateEfile($state_efile) - { - $this->container['state_efile'] = $state_efile; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status State e-file status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool $postal_mail Boolean indicating that postal mailing to the recipient has been scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status Postal mail to recipient status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool $tin_match Boolean indicating that TIN Matching has been scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status TIN Match status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool $address_verification Boolean indicating that address verification has been scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status Address verification status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status EDelivery status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin Recipient Tax ID Number - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second Tin Notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address Address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city City - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account Number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office Code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors Validation errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Creation time - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Update time - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets unique_form_id - * - * @return string|null - */ - public function getUniqueFormId() - { - return $this->container['unique_form_id']; - } - - /** - * Sets unique_form_id - * - * @param string|null $unique_form_id Unique form identifier - * - * @return self - */ - public function setUniqueFormId($unique_form_id) - { - $this->container['unique_form_id'] = $unique_form_id; - - return $this; - } - - /** - * Gets recipient_date_of_birth - * - * @return \DateTime|null - */ - public function getRecipientDateOfBirth() - { - return $this->container['recipient_date_of_birth']; - } - - /** - * Sets recipient_date_of_birth - * - * @param \DateTime|null $recipient_date_of_birth Recipient's date of birth - * - * @return self - */ - public function setRecipientDateOfBirth($recipient_date_of_birth) - { - $this->container['recipient_date_of_birth'] = $recipient_date_of_birth; - - return $this; - } - - /** - * Gets recipient_giin - * - * @return string|null - */ - public function getRecipientGiin() - { - return $this->container['recipient_giin']; - } - - /** - * Sets recipient_giin - * - * @param string|null $recipient_giin Recipient's GIIN (Global Intermediary Identification Number) - * - * @return self - */ - public function setRecipientGiin($recipient_giin) - { - $this->container['recipient_giin'] = $recipient_giin; - - return $this; - } - - /** - * Gets recipient_foreign_tin - * - * @return string|null - */ - public function getRecipientForeignTin() - { - return $this->container['recipient_foreign_tin']; - } - - /** - * Sets recipient_foreign_tin - * - * @param string|null $recipient_foreign_tin Recipient's foreign TIN - * - * @return self - */ - public function setRecipientForeignTin($recipient_foreign_tin) - { - $this->container['recipient_foreign_tin'] = $recipient_foreign_tin; - - return $this; - } - - /** - * Gets lob_code - * - * @return string|null - */ - public function getLobCode() - { - return $this->container['lob_code']; - } - - /** - * Sets lob_code - * - * @param string|null $lob_code Limitation on benefits code - * - * @return self - */ - public function setLobCode($lob_code) - { - $this->container['lob_code'] = $lob_code; - - return $this; - } - - /** - * Gets income_code - * - * @return string|null - */ - public function getIncomeCode() - { - return $this->container['income_code']; - } - - /** - * Sets income_code - * - * @param string|null $income_code Income code - * - * @return self - */ - public function setIncomeCode($income_code) - { - $this->container['income_code'] = $income_code; - - return $this; - } - - /** - * Gets gross_income - * - * @return float|null - */ - public function getGrossIncome() - { - return $this->container['gross_income']; - } - - /** - * Sets gross_income - * - * @param float|null $gross_income Gross income - * - * @return self - */ - public function setGrossIncome($gross_income) - { - $this->container['gross_income'] = $gross_income; - - return $this; - } - - /** - * Gets withholding_indicator - * - * @return string|null - */ - public function getWithholdingIndicator() - { - return $this->container['withholding_indicator']; - } - - /** - * Sets withholding_indicator - * - * @param string|null $withholding_indicator Withholding indicator - * - * @return self - */ - public function setWithholdingIndicator($withholding_indicator) - { - $this->container['withholding_indicator'] = $withholding_indicator; - - return $this; - } - - /** - * Gets tax_country_code - * - * @return string|null - */ - public function getTaxCountryCode() - { - return $this->container['tax_country_code']; - } - - /** - * Sets tax_country_code - * - * @param string|null $tax_country_code Country code - * - * @return self - */ - public function setTaxCountryCode($tax_country_code) - { - $this->container['tax_country_code'] = $tax_country_code; - - return $this; - } - - /** - * Gets exemption_code_chap3 - * - * @return string|null - */ - public function getExemptionCodeChap3() - { - return $this->container['exemption_code_chap3']; - } - - /** - * Sets exemption_code_chap3 - * - * @param string|null $exemption_code_chap3 Exemption code (Chapter 3) - * - * @return self - */ - public function setExemptionCodeChap3($exemption_code_chap3) - { - $this->container['exemption_code_chap3'] = $exemption_code_chap3; - - return $this; - } - - /** - * Gets exemption_code_chap4 - * - * @return string|null - */ - public function getExemptionCodeChap4() - { - return $this->container['exemption_code_chap4']; - } - - /** - * Sets exemption_code_chap4 - * - * @param string|null $exemption_code_chap4 Exemption code (Chapter 4) - * - * @return self - */ - public function setExemptionCodeChap4($exemption_code_chap4) - { - $this->container['exemption_code_chap4'] = $exemption_code_chap4; - - return $this; - } - - /** - * Gets tax_rate_chap3 - * - * @return string|null - */ - public function getTaxRateChap3() - { - return $this->container['tax_rate_chap3']; - } - - /** - * Sets tax_rate_chap3 - * - * @param string|null $tax_rate_chap3 Tax rate (Chapter 3) - * - * @return self - */ - public function setTaxRateChap3($tax_rate_chap3) - { - $this->container['tax_rate_chap3'] = $tax_rate_chap3; - - return $this; - } - - /** - * Gets withholding_allowance - * - * @return float|null - */ - public function getWithholdingAllowance() - { - return $this->container['withholding_allowance']; - } - - /** - * Sets withholding_allowance - * - * @param float|null $withholding_allowance Withholding allowance - * - * @return self - */ - public function setWithholdingAllowance($withholding_allowance) - { - $this->container['withholding_allowance'] = $withholding_allowance; - - return $this; - } - - /** - * Gets federal_tax_withheld - * - * @return float|null - */ - public function getFederalTaxWithheld() - { - return $this->container['federal_tax_withheld']; - } - - /** - * Sets federal_tax_withheld - * - * @param float|null $federal_tax_withheld Federal tax withheld - * - * @return self - */ - public function setFederalTaxWithheld($federal_tax_withheld) - { - $this->container['federal_tax_withheld'] = $federal_tax_withheld; - - return $this; - } - - /** - * Gets tax_not_deposited_indicator - * - * @return bool|null - */ - public function getTaxNotDepositedIndicator() - { - return $this->container['tax_not_deposited_indicator']; - } - - /** - * Sets tax_not_deposited_indicator - * - * @param bool|null $tax_not_deposited_indicator Tax not deposited indicator - * - * @return self - */ - public function setTaxNotDepositedIndicator($tax_not_deposited_indicator) - { - $this->container['tax_not_deposited_indicator'] = $tax_not_deposited_indicator; - - return $this; - } - - /** - * Gets academic_indicator - * - * @return bool|null - */ - public function getAcademicIndicator() - { - return $this->container['academic_indicator']; - } - - /** - * Sets academic_indicator - * - * @param bool|null $academic_indicator Academic indicator - * - * @return self - */ - public function setAcademicIndicator($academic_indicator) - { - $this->container['academic_indicator'] = $academic_indicator; - - return $this; - } - - /** - * Gets tax_withheld_other_agents - * - * @return float|null - */ - public function getTaxWithheldOtherAgents() - { - return $this->container['tax_withheld_other_agents']; - } - - /** - * Sets tax_withheld_other_agents - * - * @param float|null $tax_withheld_other_agents Tax withheld by other agents - * - * @return self - */ - public function setTaxWithheldOtherAgents($tax_withheld_other_agents) - { - $this->container['tax_withheld_other_agents'] = $tax_withheld_other_agents; - - return $this; - } - - /** - * Gets amount_repaid - * - * @return float|null - */ - public function getAmountRepaid() - { - return $this->container['amount_repaid']; - } - - /** - * Sets amount_repaid - * - * @param float|null $amount_repaid Amount repaid to recipient - * - * @return self - */ - public function setAmountRepaid($amount_repaid) - { - $this->container['amount_repaid'] = $amount_repaid; - - return $this; - } - - /** - * Gets tax_paid_agent - * - * @return float|null - */ - public function getTaxPaidAgent() - { - return $this->container['tax_paid_agent']; - } - - /** - * Sets tax_paid_agent - * - * @param float|null $tax_paid_agent Tax paid by withholding agent - * - * @return self - */ - public function setTaxPaidAgent($tax_paid_agent) - { - $this->container['tax_paid_agent'] = $tax_paid_agent; - - return $this; - } - - /** - * Gets chap3_status_code - * - * @return string|null - */ - public function getChap3StatusCode() - { - return $this->container['chap3_status_code']; - } - - /** - * Sets chap3_status_code - * - * @param string|null $chap3_status_code Chapter 3 status code - * - * @return self - */ - public function setChap3StatusCode($chap3_status_code) - { - $this->container['chap3_status_code'] = $chap3_status_code; - - return $this; - } - - /** - * Gets chap4_status_code - * - * @return string|null - */ - public function getChap4StatusCode() - { - return $this->container['chap4_status_code']; - } - - /** - * Sets chap4_status_code - * - * @param string|null $chap4_status_code Chapter 4 status code - * - * @return self - */ - public function setChap4StatusCode($chap4_status_code) - { - $this->container['chap4_status_code'] = $chap4_status_code; - - return $this; - } - - /** - * Gets primary_withholding_agent - * - * @return \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentResponse|null - */ - public function getPrimaryWithholdingAgent() - { - return $this->container['primary_withholding_agent']; - } - - /** - * Sets primary_withholding_agent - * - * @param \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentResponse|null $primary_withholding_agent Primary withholding agent information - * - * @return self - */ - public function setPrimaryWithholdingAgent($primary_withholding_agent) - { - $this->container['primary_withholding_agent'] = $primary_withholding_agent; - - return $this; - } - - /** - * Gets intermediary_or_flow_through - * - * @return \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughResponse|null - */ - public function getIntermediaryOrFlowThrough() - { - return $this->container['intermediary_or_flow_through']; - } - - /** - * Sets intermediary_or_flow_through - * - * @param \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughResponse|null $intermediary_or_flow_through Intermediary or flow-through entity information - * - * @return self - */ - public function setIntermediaryOrFlowThrough($intermediary_or_flow_through) - { - $this->container['intermediary_or_flow_through'] = $intermediary_or_flow_through; - - return $this; - } - - /** - * Gets origin_of_health_coverage_code - * - * @return string|null - */ - public function getOriginOfHealthCoverageCode() - { - return $this->container['origin_of_health_coverage_code']; - } - - /** - * Sets origin_of_health_coverage_code - * - * @param string|null $origin_of_health_coverage_code Origin of health coverage code - * - * @return self - */ - public function setOriginOfHealthCoverageCode($origin_of_health_coverage_code) - { - $this->container['origin_of_health_coverage_code'] = $origin_of_health_coverage_code; - - return $this; - } - - /** - * Gets covered_individuals - * - * @return \Avalara\SDK\Model\A1099\V2\CoveredIndividualReferenceResponse[]|null - */ - public function getCoveredIndividuals() - { - return $this->container['covered_individuals']; - } - - /** - * Sets covered_individuals - * - * @param \Avalara\SDK\Model\A1099\V2\CoveredIndividualReferenceResponse[]|null $covered_individuals Covered individuals information - * - * @return self - */ - public function setCoveredIndividuals($covered_individuals) - { - - - $this->container['covered_individuals'] = $covered_individuals; - - return $this; - } - - /** - * Gets total_ordinary_dividends - * - * @return string|null - */ - public function getTotalOrdinaryDividends() - { - return $this->container['total_ordinary_dividends']; - } - - /** - * Sets total_ordinary_dividends - * - * @param string|null $total_ordinary_dividends Total ordinary dividends - * - * @return self - */ - public function setTotalOrdinaryDividends($total_ordinary_dividends) - { - $this->container['total_ordinary_dividends'] = $total_ordinary_dividends; - - return $this; - } - - /** - * Gets qualified_dividends - * - * @return string|null - */ - public function getQualifiedDividends() - { - return $this->container['qualified_dividends']; - } - - /** - * Sets qualified_dividends - * - * @param string|null $qualified_dividends Qualified dividends - * - * @return self - */ - public function setQualifiedDividends($qualified_dividends) - { - $this->container['qualified_dividends'] = $qualified_dividends; - - return $this; - } - - /** - * Gets total_capital_gain_distributions - * - * @return string|null - */ - public function getTotalCapitalGainDistributions() - { - return $this->container['total_capital_gain_distributions']; - } - - /** - * Sets total_capital_gain_distributions - * - * @param string|null $total_capital_gain_distributions Total capital gain distributions - * - * @return self - */ - public function setTotalCapitalGainDistributions($total_capital_gain_distributions) - { - $this->container['total_capital_gain_distributions'] = $total_capital_gain_distributions; - - return $this; - } - - /** - * Gets unrecaptured_section1250_gain - * - * @return string|null - */ - public function getUnrecapturedSection1250Gain() - { - return $this->container['unrecaptured_section1250_gain']; - } - - /** - * Sets unrecaptured_section1250_gain - * - * @param string|null $unrecaptured_section1250_gain Unrecaptured Section 1250 gain - * - * @return self - */ - public function setUnrecapturedSection1250Gain($unrecaptured_section1250_gain) - { - $this->container['unrecaptured_section1250_gain'] = $unrecaptured_section1250_gain; - - return $this; - } - - /** - * Gets section1202_gain - * - * @return string|null - */ - public function getSection1202Gain() - { - return $this->container['section1202_gain']; - } - - /** - * Sets section1202_gain - * - * @param string|null $section1202_gain Section 1202 gain - * - * @return self - */ - public function setSection1202Gain($section1202_gain) - { - $this->container['section1202_gain'] = $section1202_gain; - - return $this; - } - - /** - * Gets collectibles_gain - * - * @return string|null - */ - public function getCollectiblesGain() - { - return $this->container['collectibles_gain']; - } - - /** - * Sets collectibles_gain - * - * @param string|null $collectibles_gain Collectibles (28%) gain - * - * @return self - */ - public function setCollectiblesGain($collectibles_gain) - { - $this->container['collectibles_gain'] = $collectibles_gain; - - return $this; - } - - /** - * Gets section897_ordinary_dividends - * - * @return string|null - */ - public function getSection897OrdinaryDividends() - { - return $this->container['section897_ordinary_dividends']; - } - - /** - * Sets section897_ordinary_dividends - * - * @param string|null $section897_ordinary_dividends Section 897 ordinary dividends - * - * @return self - */ - public function setSection897OrdinaryDividends($section897_ordinary_dividends) - { - $this->container['section897_ordinary_dividends'] = $section897_ordinary_dividends; - - return $this; - } - - /** - * Gets section897_capital_gain - * - * @return string|null - */ - public function getSection897CapitalGain() - { - return $this->container['section897_capital_gain']; - } - - /** - * Sets section897_capital_gain - * - * @param string|null $section897_capital_gain Section 897 capital gain - * - * @return self - */ - public function setSection897CapitalGain($section897_capital_gain) - { - $this->container['section897_capital_gain'] = $section897_capital_gain; - - return $this; - } - - /** - * Gets nondividend_distributions - * - * @return string|null - */ - public function getNondividendDistributions() - { - return $this->container['nondividend_distributions']; - } - - /** - * Sets nondividend_distributions - * - * @param string|null $nondividend_distributions Nondividend distributions - * - * @return self - */ - public function setNondividendDistributions($nondividend_distributions) - { - $this->container['nondividend_distributions'] = $nondividend_distributions; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets section199_a_dividends - * - * @return string|null - */ - public function getSection199ADividends() - { - return $this->container['section199_a_dividends']; - } - - /** - * Sets section199_a_dividends - * - * @param string|null $section199_a_dividends Section 199A dividends - * - * @return self - */ - public function setSection199ADividends($section199_a_dividends) - { - $this->container['section199_a_dividends'] = $section199_a_dividends; - - return $this; - } - - /** - * Gets investment_expenses - * - * @return string|null - */ - public function getInvestmentExpenses() - { - return $this->container['investment_expenses']; - } - - /** - * Sets investment_expenses - * - * @param string|null $investment_expenses Investment expenses - * - * @return self - */ - public function setInvestmentExpenses($investment_expenses) - { - $this->container['investment_expenses'] = $investment_expenses; - - return $this; - } - - /** - * Gets foreign_tax_paid - * - * @return string|null - */ - public function getForeignTaxPaid() - { - return $this->container['foreign_tax_paid']; - } - - /** - * Sets foreign_tax_paid - * - * @param string|null $foreign_tax_paid Foreign tax paid - * - * @return self - */ - public function setForeignTaxPaid($foreign_tax_paid) - { - $this->container['foreign_tax_paid'] = $foreign_tax_paid; - - return $this; - } - - /** - * Gets foreign_country_or_us_possession - * - * @return string|null - */ - public function getForeignCountryOrUsPossession() - { - return $this->container['foreign_country_or_us_possession']; - } - - /** - * Sets foreign_country_or_us_possession - * - * @param string|null $foreign_country_or_us_possession Foreign country or U.S. possession - * - * @return self - */ - public function setForeignCountryOrUsPossession($foreign_country_or_us_possession) - { - $this->container['foreign_country_or_us_possession'] = $foreign_country_or_us_possession; - - return $this; - } - - /** - * Gets cash_liquidation_distributions - * - * @return string|null - */ - public function getCashLiquidationDistributions() - { - return $this->container['cash_liquidation_distributions']; - } - - /** - * Sets cash_liquidation_distributions - * - * @param string|null $cash_liquidation_distributions Cash liquidation distributions - * - * @return self - */ - public function setCashLiquidationDistributions($cash_liquidation_distributions) - { - $this->container['cash_liquidation_distributions'] = $cash_liquidation_distributions; - - return $this; - } - - /** - * Gets noncash_liquidation_distributions - * - * @return string|null - */ - public function getNoncashLiquidationDistributions() - { - return $this->container['noncash_liquidation_distributions']; - } - - /** - * Sets noncash_liquidation_distributions - * - * @param string|null $noncash_liquidation_distributions Noncash liquidation distributions - * - * @return self - */ - public function setNoncashLiquidationDistributions($noncash_liquidation_distributions) - { - $this->container['noncash_liquidation_distributions'] = $noncash_liquidation_distributions; - - return $this; - } - - /** - * Gets exempt_interest_dividends - * - * @return string|null - */ - public function getExemptInterestDividends() - { - return $this->container['exempt_interest_dividends']; - } - - /** - * Sets exempt_interest_dividends - * - * @param string|null $exempt_interest_dividends Exempt-interest dividends - * - * @return self - */ - public function setExemptInterestDividends($exempt_interest_dividends) - { - $this->container['exempt_interest_dividends'] = $exempt_interest_dividends; - - return $this; - } - - /** - * Gets specified_private_activity_bond_interest_dividends - * - * @return string|null - */ - public function getSpecifiedPrivateActivityBondInterestDividends() - { - return $this->container['specified_private_activity_bond_interest_dividends']; - } - - /** - * Sets specified_private_activity_bond_interest_dividends - * - * @param string|null $specified_private_activity_bond_interest_dividends Specified private activity bond interest dividends - * - * @return self - */ - public function setSpecifiedPrivateActivityBondInterestDividends($specified_private_activity_bond_interest_dividends) - { - $this->container['specified_private_activity_bond_interest_dividends'] = $specified_private_activity_bond_interest_dividends; - - return $this; - } - - /** - * Gets filer_type - * - * @return string|null - */ - public function getFilerType() - { - return $this->container['filer_type']; - } - - /** - * Sets filer_type - * - * @param string|null $filer_type Filer type (PSE or EPF) - * - * @return self - */ - public function setFilerType($filer_type) - { - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($filer_type) && !in_array($filer_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'filer_type', must be one of '%s'", - $filer_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['filer_type'] = $filer_type; - - return $this; - } - - /** - * Gets payment_type - * - * @return string|null - */ - public function getPaymentType() - { - return $this->container['payment_type']; - } - - /** - * Sets payment_type - * - * @param string|null $payment_type Payment type (payment card or third party network) - * - * @return self - */ - public function setPaymentType($payment_type) - { - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($payment_type) && !in_array($payment_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'payment_type', must be one of '%s'", - $payment_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['payment_type'] = $payment_type; - - return $this; - } - - /** - * Gets payment_settlement_entity_name_phone_number - * - * @return string|null - */ - public function getPaymentSettlementEntityNamePhoneNumber() - { - return $this->container['payment_settlement_entity_name_phone_number']; - } - - /** - * Sets payment_settlement_entity_name_phone_number - * - * @param string|null $payment_settlement_entity_name_phone_number Payment settlement entity name and phone number - * - * @return self - */ - public function setPaymentSettlementEntityNamePhoneNumber($payment_settlement_entity_name_phone_number) - { - $this->container['payment_settlement_entity_name_phone_number'] = $payment_settlement_entity_name_phone_number; - - return $this; - } - - /** - * Gets gross_amount_payment_card - * - * @return float|null - */ - public function getGrossAmountPaymentCard() - { - return $this->container['gross_amount_payment_card']; - } - - /** - * Sets gross_amount_payment_card - * - * @param float|null $gross_amount_payment_card Gross amount of payment card/third party network transactions - * - * @return self - */ - public function setGrossAmountPaymentCard($gross_amount_payment_card) - { - $this->container['gross_amount_payment_card'] = $gross_amount_payment_card; - - return $this; - } - - /** - * Gets card_not_present_transactions - * - * @return float|null - */ - public function getCardNotPresentTransactions() - { - return $this->container['card_not_present_transactions']; - } - - /** - * Sets card_not_present_transactions - * - * @param float|null $card_not_present_transactions Card not present transactions - * - * @return self - */ - public function setCardNotPresentTransactions($card_not_present_transactions) - { - $this->container['card_not_present_transactions'] = $card_not_present_transactions; - - return $this; - } - - /** - * Gets merchant_category_code - * - * @return string|null - */ - public function getMerchantCategoryCode() - { - return $this->container['merchant_category_code']; - } - - /** - * Sets merchant_category_code - * - * @param string|null $merchant_category_code Merchant category code - * - * @return self - */ - public function setMerchantCategoryCode($merchant_category_code) - { - $this->container['merchant_category_code'] = $merchant_category_code; - - return $this; - } - - /** - * Gets payment_transaction_number - * - * @return float|null - */ - public function getPaymentTransactionNumber() - { - return $this->container['payment_transaction_number']; - } - - /** - * Sets payment_transaction_number - * - * @param float|null $payment_transaction_number Number of payment transactions - * - * @return self - */ - public function setPaymentTransactionNumber($payment_transaction_number) - { - $this->container['payment_transaction_number'] = $payment_transaction_number; - - return $this; - } - - /** - * Gets january - * - * @return float|null - */ - public function getJanuary() - { - return $this->container['january']; - } - - /** - * Sets january - * - * @param float|null $january January gross payments - * - * @return self - */ - public function setJanuary($january) - { - $this->container['january'] = $january; - - return $this; - } - - /** - * Gets february - * - * @return float|null - */ - public function getFebruary() - { - return $this->container['february']; - } - - /** - * Sets february - * - * @param float|null $february February gross payments - * - * @return self - */ - public function setFebruary($february) - { - $this->container['february'] = $february; - - return $this; - } - - /** - * Gets march - * - * @return float|null - */ - public function getMarch() - { - return $this->container['march']; - } - - /** - * Sets march - * - * @param float|null $march March gross payments - * - * @return self - */ - public function setMarch($march) - { - $this->container['march'] = $march; - - return $this; - } - - /** - * Gets april - * - * @return float|null - */ - public function getApril() - { - return $this->container['april']; - } - - /** - * Sets april - * - * @param float|null $april April gross payments - * - * @return self - */ - public function setApril($april) - { - $this->container['april'] = $april; - - return $this; - } - - /** - * Gets may - * - * @return float|null - */ - public function getMay() - { - return $this->container['may']; - } - - /** - * Sets may - * - * @param float|null $may May gross payments - * - * @return self - */ - public function setMay($may) - { - $this->container['may'] = $may; - - return $this; - } - - /** - * Gets june - * - * @return float|null - */ - public function getJune() - { - return $this->container['june']; - } - - /** - * Sets june - * - * @param float|null $june June gross payments - * - * @return self - */ - public function setJune($june) - { - $this->container['june'] = $june; - - return $this; - } - - /** - * Gets july - * - * @return float|null - */ - public function getJuly() - { - return $this->container['july']; - } - - /** - * Sets july - * - * @param float|null $july July gross payments - * - * @return self - */ - public function setJuly($july) - { - $this->container['july'] = $july; - - return $this; - } - - /** - * Gets august - * - * @return float|null - */ - public function getAugust() - { - return $this->container['august']; - } - - /** - * Sets august - * - * @param float|null $august August gross payments - * - * @return self - */ - public function setAugust($august) - { - $this->container['august'] = $august; - - return $this; - } - - /** - * Gets sept - * - * @return float|null - */ - public function getSept() - { - return $this->container['sept']; - } - - /** - * Sets sept - * - * @param float|null $sept September gross payments - * - * @return self - */ - public function setSept($sept) - { - $this->container['sept'] = $sept; - - return $this; - } - - /** - * Gets october - * - * @return float|null - */ - public function getOctober() - { - return $this->container['october']; - } - - /** - * Sets october - * - * @param float|null $october October gross payments - * - * @return self - */ - public function setOctober($october) - { - $this->container['october'] = $october; - - return $this; - } - - /** - * Gets november - * - * @return float|null - */ - public function getNovember() - { - return $this->container['november']; - } - - /** - * Sets november - * - * @param float|null $november November gross payments - * - * @return self - */ - public function setNovember($november) - { - $this->container['november'] = $november; - - return $this; - } - - /** - * Gets december - * - * @return float|null - */ - public function getDecember() - { - return $this->container['december']; - } - - /** - * Sets december - * - * @param float|null $december December gross payments - * - * @return self - */ - public function setDecember($december) - { - $this->container['december'] = $december; - - return $this; - } - - /** - * Gets rents - * - * @return float|null - */ - public function getRents() - { - return $this->container['rents']; - } - - /** - * Sets rents - * - * @param float|null $rents Rents - * - * @return self - */ - public function setRents($rents) - { - $this->container['rents'] = $rents; - - return $this; - } - - /** - * Gets royalties - * - * @return float|null - */ - public function getRoyalties() - { - return $this->container['royalties']; - } - - /** - * Sets royalties - * - * @param float|null $royalties Royalties - * - * @return self - */ - public function setRoyalties($royalties) - { - $this->container['royalties'] = $royalties; - - return $this; - } - - /** - * Gets other_income - * - * @return float|null - */ - public function getOtherIncome() - { - return $this->container['other_income']; - } - - /** - * Sets other_income - * - * @param float|null $other_income Other income - * - * @return self - */ - public function setOtherIncome($other_income) - { - $this->container['other_income'] = $other_income; - - return $this; - } - - /** - * Gets fed_income_tax_withheld - * - * @return float|null - */ - public function getFedIncomeTaxWithheld() - { - return $this->container['fed_income_tax_withheld']; - } - - /** - * Sets fed_income_tax_withheld - * - * @param float|null $fed_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) - { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; - - return $this; - } - - /** - * Gets fishing_boat_proceeds - * - * @return float|null - */ - public function getFishingBoatProceeds() - { - return $this->container['fishing_boat_proceeds']; - } - - /** - * Sets fishing_boat_proceeds - * - * @param float|null $fishing_boat_proceeds Fishing boat proceeds - * - * @return self - */ - public function setFishingBoatProceeds($fishing_boat_proceeds) - { - $this->container['fishing_boat_proceeds'] = $fishing_boat_proceeds; - - return $this; - } - - /** - * Gets medical_and_health_care_payments - * - * @return float|null - */ - public function getMedicalAndHealthCarePayments() - { - return $this->container['medical_and_health_care_payments']; - } - - /** - * Sets medical_and_health_care_payments - * - * @param float|null $medical_and_health_care_payments Medical and health care payments - * - * @return self - */ - public function setMedicalAndHealthCarePayments($medical_and_health_care_payments) - { - $this->container['medical_and_health_care_payments'] = $medical_and_health_care_payments; - - return $this; - } - - /** - * Gets substitute_payments - * - * @return float|null - */ - public function getSubstitutePayments() - { - return $this->container['substitute_payments']; - } - - /** - * Sets substitute_payments - * - * @param float|null $substitute_payments Substitute payments in lieu of dividends or interest - * - * @return self - */ - public function setSubstitutePayments($substitute_payments) - { - $this->container['substitute_payments'] = $substitute_payments; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets crop_insurance_proceeds - * - * @return float|null - */ - public function getCropInsuranceProceeds() - { - return $this->container['crop_insurance_proceeds']; - } - - /** - * Sets crop_insurance_proceeds - * - * @param float|null $crop_insurance_proceeds Crop insurance proceeds - * - * @return self - */ - public function setCropInsuranceProceeds($crop_insurance_proceeds) - { - $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; - - return $this; - } - - /** - * Gets excess_golden_parachute_payments - * - * @return float|null - */ - public function getExcessGoldenParachutePayments() - { - return $this->container['excess_golden_parachute_payments']; - } - - /** - * Sets excess_golden_parachute_payments - * - * @param float|null $excess_golden_parachute_payments (Legacy field) Excess golden parachute payments - * - * @return self - */ - public function setExcessGoldenParachutePayments($excess_golden_parachute_payments) - { - $this->container['excess_golden_parachute_payments'] = $excess_golden_parachute_payments; - - return $this; - } - - /** - * Gets gross_proceeds_paid_to_attorney - * - * @return float|null - */ - public function getGrossProceedsPaidToAttorney() - { - return $this->container['gross_proceeds_paid_to_attorney']; - } - - /** - * Sets gross_proceeds_paid_to_attorney - * - * @param float|null $gross_proceeds_paid_to_attorney Gross proceeds paid to an attorney - * - * @return self - */ - public function setGrossProceedsPaidToAttorney($gross_proceeds_paid_to_attorney) - { - $this->container['gross_proceeds_paid_to_attorney'] = $gross_proceeds_paid_to_attorney; - - return $this; - } - - /** - * Gets fish_purchased_for_resale - * - * @return float|null - */ - public function getFishPurchasedForResale() - { - return $this->container['fish_purchased_for_resale']; - } - - /** - * Sets fish_purchased_for_resale - * - * @param float|null $fish_purchased_for_resale Fish purchased for resale - * - * @return self - */ - public function setFishPurchasedForResale($fish_purchased_for_resale) - { - $this->container['fish_purchased_for_resale'] = $fish_purchased_for_resale; - - return $this; - } - - /** - * Gets section409_a_deferrals - * - * @return float|null - */ - public function getSection409ADeferrals() - { - return $this->container['section409_a_deferrals']; - } - - /** - * Sets section409_a_deferrals - * - * @param float|null $section409_a_deferrals Section 409A deferrals - * - * @return self - */ - public function setSection409ADeferrals($section409_a_deferrals) - { - $this->container['section409_a_deferrals'] = $section409_a_deferrals; - - return $this; - } - - /** - * Gets nonqualified_deferred_compensation - * - * @return float|null - */ - public function getNonqualifiedDeferredCompensation() - { - return $this->container['nonqualified_deferred_compensation']; - } - - /** - * Sets nonqualified_deferred_compensation - * - * @param float|null $nonqualified_deferred_compensation Nonqualified deferred compensation - * - * @return self - */ - public function setNonqualifiedDeferredCompensation($nonqualified_deferred_compensation) - { - $this->container['nonqualified_deferred_compensation'] = $nonqualified_deferred_compensation; - - return $this; - } - - /** - * Gets nonemployee_compensation - * - * @return float|null - */ - public function getNonemployeeCompensation() - { - return $this->container['nonemployee_compensation']; - } - - /** - * Sets nonemployee_compensation - * - * @param float|null $nonemployee_compensation Nonemployee compensation - * - * @return self - */ - public function setNonemployeeCompensation($nonemployee_compensation) - { - $this->container['nonemployee_compensation'] = $nonemployee_compensation; - - return $this; - } - - /** - * Gets gross_distributions - * - * @return float|null - */ - public function getGrossDistributions() - { - return $this->container['gross_distributions']; - } - - /** - * Sets gross_distributions - * - * @param float|null $gross_distributions Gross distribution - * - * @return self - */ - public function setGrossDistributions($gross_distributions) - { - $this->container['gross_distributions'] = $gross_distributions; - - return $this; - } - - /** - * Gets taxable_amount - * - * @return float|null - */ - public function getTaxableAmount() - { - return $this->container['taxable_amount']; - } - - /** - * Sets taxable_amount - * - * @param float|null $taxable_amount Taxable amount - * - * @return self - */ - public function setTaxableAmount($taxable_amount) - { - $this->container['taxable_amount'] = $taxable_amount; - - return $this; - } - - /** - * Gets taxable_amount_not_determined - * - * @return bool|null - */ - public function getTaxableAmountNotDetermined() - { - return $this->container['taxable_amount_not_determined']; - } - - /** - * Sets taxable_amount_not_determined - * - * @param bool|null $taxable_amount_not_determined Taxable amount not determined - * - * @return self - */ - public function setTaxableAmountNotDetermined($taxable_amount_not_determined) - { - $this->container['taxable_amount_not_determined'] = $taxable_amount_not_determined; - - return $this; - } - - /** - * Gets total_distribution_indicator - * - * @return bool|null - */ - public function getTotalDistributionIndicator() - { - return $this->container['total_distribution_indicator']; - } - - /** - * Sets total_distribution_indicator - * - * @param bool|null $total_distribution_indicator Total distribution - * - * @return self - */ - public function setTotalDistributionIndicator($total_distribution_indicator) - { - $this->container['total_distribution_indicator'] = $total_distribution_indicator; - - return $this; - } - - /** - * Gets capital_gain - * - * @return float|null - */ - public function getCapitalGain() - { - return $this->container['capital_gain']; - } - - /** - * Sets capital_gain - * - * @param float|null $capital_gain Capital gain (included in Box 2a) - * - * @return self - */ - public function setCapitalGain($capital_gain) - { - $this->container['capital_gain'] = $capital_gain; - - return $this; - } - - /** - * Gets employee_contributions - * - * @return float|null - */ - public function getEmployeeContributions() - { - return $this->container['employee_contributions']; - } - - /** - * Sets employee_contributions - * - * @param float|null $employee_contributions Employee contributions/Designated Roth contributions or insurance premiums - * - * @return self - */ - public function setEmployeeContributions($employee_contributions) - { - $this->container['employee_contributions'] = $employee_contributions; - - return $this; - } - - /** - * Gets net_unrealized_appreciation - * - * @return float|null - */ - public function getNetUnrealizedAppreciation() - { - return $this->container['net_unrealized_appreciation']; - } - - /** - * Sets net_unrealized_appreciation - * - * @param float|null $net_unrealized_appreciation Net unrealized appreciation in employer's securities - * - * @return self - */ - public function setNetUnrealizedAppreciation($net_unrealized_appreciation) - { - $this->container['net_unrealized_appreciation'] = $net_unrealized_appreciation; - - return $this; - } - - /** - * Gets distribution_code_required - * - * @return string|null - */ - public function getDistributionCodeRequired() - { - return $this->container['distribution_code_required']; - } - - /** - * Sets distribution_code_required - * - * @param string|null $distribution_code_required Distribution code - * - * @return self - */ - public function setDistributionCodeRequired($distribution_code_required) - { - $this->container['distribution_code_required'] = $distribution_code_required; - - return $this; - } - - /** - * Gets distribution_code_optional - * - * @return string|null - */ - public function getDistributionCodeOptional() - { - return $this->container['distribution_code_optional']; - } - - /** - * Sets distribution_code_optional - * - * @param string|null $distribution_code_optional Second distribution code - * - * @return self - */ - public function setDistributionCodeOptional($distribution_code_optional) - { - $this->container['distribution_code_optional'] = $distribution_code_optional; - - return $this; - } - - /** - * Gets ira_sep_simple_indicator - * - * @return bool|null - */ - public function getIraSepSimpleIndicator() - { - return $this->container['ira_sep_simple_indicator']; - } - - /** - * Sets ira_sep_simple_indicator - * - * @param bool|null $ira_sep_simple_indicator IRA/SEP/SIMPLE - * - * @return self - */ - public function setIraSepSimpleIndicator($ira_sep_simple_indicator) - { - $this->container['ira_sep_simple_indicator'] = $ira_sep_simple_indicator; - - return $this; - } - - /** - * Gets total_ira_sep_simple_distribution - * - * @return float|null - */ - public function getTotalIraSepSimpleDistribution() - { - return $this->container['total_ira_sep_simple_distribution']; - } - - /** - * Sets total_ira_sep_simple_distribution - * - * @param float|null $total_ira_sep_simple_distribution Traditional IRA/SEP/SIMPLE or Roth conversion amount - * - * @return self - */ - public function setTotalIraSepSimpleDistribution($total_ira_sep_simple_distribution) - { - $this->container['total_ira_sep_simple_distribution'] = $total_ira_sep_simple_distribution; - - return $this; - } - - /** - * Gets other - * - * @return float|null - */ - public function getOther() - { - return $this->container['other']; - } - - /** - * Sets other - * - * @param float|null $other Other amount - * - * @return self - */ - public function setOther($other) - { - $this->container['other'] = $other; - - return $this; - } - - /** - * Gets other_percent - * - * @return string|null - */ - public function getOtherPercent() - { - return $this->container['other_percent']; - } - - /** - * Sets other_percent - * - * @param string|null $other_percent Other percentage - * - * @return self - */ - public function setOtherPercent($other_percent) - { - $this->container['other_percent'] = $other_percent; - - return $this; - } - - /** - * Gets percentage_total_distribution - * - * @return string|null - */ - public function getPercentageTotalDistribution() - { - return $this->container['percentage_total_distribution']; - } - - /** - * Sets percentage_total_distribution - * - * @param string|null $percentage_total_distribution Total distribution percentage - * - * @return self - */ - public function setPercentageTotalDistribution($percentage_total_distribution) - { - $this->container['percentage_total_distribution'] = $percentage_total_distribution; - - return $this; - } - - /** - * Gets total_employee_contributions - * - * @return float|null - */ - public function getTotalEmployeeContributions() - { - return $this->container['total_employee_contributions']; - } - - /** - * Sets total_employee_contributions - * - * @param float|null $total_employee_contributions Total employee contributions - * - * @return self - */ - public function setTotalEmployeeContributions($total_employee_contributions) - { - $this->container['total_employee_contributions'] = $total_employee_contributions; - - return $this; - } - - /** - * Gets amount_allocable_to_irr - * - * @return float|null - */ - public function getAmountAllocableToIrr() - { - return $this->container['amount_allocable_to_irr']; - } - - /** - * Sets amount_allocable_to_irr - * - * @param float|null $amount_allocable_to_irr Amount allocable to IRR within 5 years - * - * @return self - */ - public function setAmountAllocableToIrr($amount_allocable_to_irr) - { - $this->container['amount_allocable_to_irr'] = $amount_allocable_to_irr; - - return $this; - } - - /** - * Gets first_year_designated_roth_contrib - * - * @return string|null - */ - public function getFirstYearDesignatedRothContrib() - { - return $this->container['first_year_designated_roth_contrib']; - } - - /** - * Sets first_year_designated_roth_contrib - * - * @param string|null $first_year_designated_roth_contrib First year of designated Roth contribution - * - * @return self - */ - public function setFirstYearDesignatedRothContrib($first_year_designated_roth_contrib) - { - $this->container['first_year_designated_roth_contrib'] = $first_year_designated_roth_contrib; - - return $this; - } - - /** - * Gets fatca_requirement_indicator - * - * @return bool|null - */ - public function getFatcaRequirementIndicator() - { - return $this->container['fatca_requirement_indicator']; - } - - /** - * Sets fatca_requirement_indicator - * - * @param bool|null $fatca_requirement_indicator FATCA filing requirement - * - * @return self - */ - public function setFatcaRequirementIndicator($fatca_requirement_indicator) - { - $this->container['fatca_requirement_indicator'] = $fatca_requirement_indicator; - - return $this; - } - - /** - * Gets date_of_payment - * - * @return string|null - */ - public function getDateOfPayment() - { - return $this->container['date_of_payment']; - } - - /** - * Sets date_of_payment - * - * @param string|null $date_of_payment Date of payment - * - * @return self - */ - public function setDateOfPayment($date_of_payment) - { - $this->container['date_of_payment'] = $date_of_payment; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/FormRequestModel.php b/lib/Model/A1099/V2/CreateAndSendW9FormEmailRequest.php similarity index 53% rename from lib/Model/A1099/V2/FormRequestModel.php rename to lib/Model/A1099/V2/CreateAndSendW9FormEmailRequest.php index 6ac2ce6..84b0b25 100644 --- a/lib/Model/A1099/V2/FormRequestModel.php +++ b/lib/Model/A1099/V2/CreateAndSendW9FormEmailRequest.php @@ -1,6 +1,6 @@ 'string', 'type' => 'string', - 'form_type' => 'string', - 'company_id' => 'int', - 'company_name' => 'string', - 'company_email' => 'string', + 'email' => 'string', + 'employee_first_name' => 'string', + 'employee_last_name' => 'string', + 'office_code' => 'string', + 'company_id' => 'string', 'reference_id' => 'string', - 'signed_at' => '\DateTime', - 'tin_match_status' => 'string', - 'expires_at' => '\DateTime', - 'signed_pdf' => 'string' + 'name' => 'string', + 'reference_number' => 'string', + 'account_number' => 'string' ]; /** @@ -92,17 +91,16 @@ class FormRequestModel implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'type' => null, - 'form_type' => null, - 'company_id' => 'int32', - 'company_name' => null, - 'company_email' => null, + 'email' => null, + 'employee_first_name' => null, + 'employee_last_name' => null, + 'office_code' => null, + 'company_id' => null, 'reference_id' => null, - 'signed_at' => 'date-time', - 'tin_match_status' => null, - 'expires_at' => 'date-time', - 'signed_pdf' => null + 'name' => null, + 'reference_number' => null, + 'account_number' => null ]; /** @@ -132,17 +130,16 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'type' => 'type', - 'form_type' => 'formType', + 'email' => 'email', + 'employee_first_name' => 'employeeFirstName', + 'employee_last_name' => 'employeeLastName', + 'office_code' => 'officeCode', 'company_id' => 'companyId', - 'company_name' => 'companyName', - 'company_email' => 'companyEmail', 'reference_id' => 'referenceId', - 'signed_at' => 'signedAt', - 'tin_match_status' => 'tinMatchStatus', - 'expires_at' => 'expiresAt', - 'signed_pdf' => 'signedPdf' + 'name' => 'name', + 'reference_number' => 'referenceNumber', + 'account_number' => 'accountNumber' ]; /** @@ -151,17 +148,16 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'type' => 'setType', - 'form_type' => 'setFormType', + 'email' => 'setEmail', + 'employee_first_name' => 'setEmployeeFirstName', + 'employee_last_name' => 'setEmployeeLastName', + 'office_code' => 'setOfficeCode', 'company_id' => 'setCompanyId', - 'company_name' => 'setCompanyName', - 'company_email' => 'setCompanyEmail', 'reference_id' => 'setReferenceId', - 'signed_at' => 'setSignedAt', - 'tin_match_status' => 'setTinMatchStatus', - 'expires_at' => 'setExpiresAt', - 'signed_pdf' => 'setSignedPdf' + 'name' => 'setName', + 'reference_number' => 'setReferenceNumber', + 'account_number' => 'setAccountNumber' ]; /** @@ -170,17 +166,16 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'type' => 'getType', - 'form_type' => 'getFormType', + 'email' => 'getEmail', + 'employee_first_name' => 'getEmployeeFirstName', + 'employee_last_name' => 'getEmployeeLastName', + 'office_code' => 'getOfficeCode', 'company_id' => 'getCompanyId', - 'company_name' => 'getCompanyName', - 'company_email' => 'getCompanyEmail', 'reference_id' => 'getReferenceId', - 'signed_at' => 'getSignedAt', - 'tin_match_status' => 'getTinMatchStatus', - 'expires_at' => 'getExpiresAt', - 'signed_pdf' => 'getSignedPdf' + 'name' => 'getName', + 'reference_number' => 'getReferenceNumber', + 'account_number' => 'getAccountNumber' ]; /** @@ -224,10 +219,11 @@ public function getModelName() return self::$openAPIModelName; } - const TYPE_FORM_REQUEST = 'FormRequest'; - const FORM_TYPE_W9 = 'W9'; - const TIN_MATCH_STATUS_NONE = 'None'; - const TIN_MATCH_STATUS_MATCHED = 'Matched'; + const TYPE_W4 = 'W4'; + const TYPE_W8_BEN = 'W8Ben'; + const TYPE_W8_BEN_E = 'W8BenE'; + const TYPE_W8_IMY = 'W8Imy'; + const TYPE_W9 = 'W9'; /** * Gets allowable values of the enum @@ -237,32 +233,11 @@ public function getModelName() public function getTypeAllowableValues() { return [ - self::TYPE_FORM_REQUEST, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getFormTypeAllowableValues() - { - return [ - self::FORM_TYPE_W9, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinMatchStatusAllowableValues() - { - return [ - self::TIN_MATCH_STATUS_NONE, - self::TIN_MATCH_STATUS_MATCHED, + self::TYPE_W4, + self::TYPE_W8_BEN, + self::TYPE_W8_BEN_E, + self::TYPE_W8_IMY, + self::TYPE_W9, ]; } @@ -281,17 +256,16 @@ public function getTinMatchStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; $this->container['type'] = $data['type'] ?? null; - $this->container['form_type'] = $data['form_type'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['employee_first_name'] = $data['employee_first_name'] ?? null; + $this->container['employee_last_name'] = $data['employee_last_name'] ?? null; + $this->container['office_code'] = $data['office_code'] ?? null; $this->container['company_id'] = $data['company_id'] ?? null; - $this->container['company_name'] = $data['company_name'] ?? null; - $this->container['company_email'] = $data['company_email'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['signed_at'] = $data['signed_at'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['expires_at'] = $data['expires_at'] ?? null; - $this->container['signed_pdf'] = $data['signed_pdf'] ?? null; + $this->container['name'] = $data['name'] ?? null; + $this->container['reference_number'] = $data['reference_number'] ?? null; + $this->container['account_number'] = $data['account_number'] ?? null; } /** @@ -312,22 +286,35 @@ public function listInvalidProperties() ); } - $allowedValues = $this->getFormTypeAllowableValues(); - if (!is_null($this->container['form_type']) && !in_array($this->container['form_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'form_type', must be one of '%s'", - $this->container['form_type'], - implode("', '", $allowedValues) - ); + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['employee_first_name'] === null) { + $invalidProperties[] = "'employee_first_name' can't be null"; + } + if ((mb_strlen($this->container['employee_first_name']) < 1)) { + $invalidProperties[] = "invalid value for 'employee_first_name', the character length must be bigger than or equal to 1."; } - $allowedValues = $this->getTinMatchStatusAllowableValues(); - if (!is_null($this->container['tin_match_status']) && !in_array($this->container['tin_match_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_match_status', must be one of '%s'", - $this->container['tin_match_status'], - implode("', '", $allowedValues) - ); + if ($this->container['employee_last_name'] === null) { + $invalidProperties[] = "'employee_last_name' can't be null"; + } + if ((mb_strlen($this->container['employee_last_name']) < 1)) { + $invalidProperties[] = "invalid value for 'employee_last_name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; } return $invalidProperties; @@ -345,30 +332,6 @@ public function valid() } - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** * Gets type * @@ -382,7 +345,7 @@ public function getType() /** * Sets type * - * @param string|null $type type + * @param string|null $type The form type. * * @return self */ @@ -404,237 +367,237 @@ public function setType($type) } /** - * Gets form_type + * Gets email * - * @return string|null + * @return string */ - public function getFormType() + public function getEmail() { - return $this->container['form_type']; + return $this->container['email']; } /** - * Sets form_type + * Sets email * - * @param string|null $form_type \"W9\" is currently the only supported value + * @param string $email The email address of the individual associated with the form. * * @return self */ - public function setFormType($form_type) + public function setEmail($email) { - $allowedValues = $this->getFormTypeAllowableValues(); - if (!is_null($form_type) && !in_array($form_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'form_type', must be one of '%s'", - $form_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['form_type'] = $form_type; + $this->container['email'] = $email; return $this; } /** - * Gets company_id + * Gets employee_first_name * - * @return int|null + * @return string */ - public function getCompanyId() + public function getEmployeeFirstName() { - return $this->container['company_id']; + return $this->container['employee_first_name']; } /** - * Sets company_id + * Sets employee_first_name * - * @param int|null $company_id Track1099's ID of your company, found in the W-9 UI + * @param string $employee_first_name The first name of the employee. * * @return self */ - public function setCompanyId($company_id) + public function setEmployeeFirstName($employee_first_name) { - $this->container['company_id'] = $company_id; + + if ((mb_strlen($employee_first_name) < 1)) { + throw new \InvalidArgumentException('invalid length for $employee_first_name when calling CreateAndSendW9FormEmailRequest., must be bigger than or equal to 1.'); + } + + $this->container['employee_first_name'] = $employee_first_name; return $this; } /** - * Gets company_name + * Gets employee_last_name * - * @return string|null + * @return string */ - public function getCompanyName() + public function getEmployeeLastName() { - return $this->container['company_name']; + return $this->container['employee_last_name']; } /** - * Sets company_name + * Sets employee_last_name * - * @param string|null $company_name Name of your company, set in the W-9 UI + * @param string $employee_last_name The last name of the employee. * * @return self */ - public function setCompanyName($company_name) + public function setEmployeeLastName($employee_last_name) { - $this->container['company_name'] = $company_name; + + if ((mb_strlen($employee_last_name) < 1)) { + throw new \InvalidArgumentException('invalid length for $employee_last_name when calling CreateAndSendW9FormEmailRequest., must be bigger than or equal to 1.'); + } + + $this->container['employee_last_name'] = $employee_last_name; return $this; } /** - * Gets company_email + * Gets office_code * * @return string|null */ - public function getCompanyEmail() + public function getOfficeCode() { - return $this->container['company_email']; + return $this->container['office_code']; } /** - * Sets company_email + * Sets office_code * - * @param string|null $company_email Contact email of your company, set in the W-9 UI + * @param string|null $office_code The office code associated with the form. * * @return self */ - public function setCompanyEmail($company_email) + public function setOfficeCode($office_code) { - $this->container['company_email'] = $company_email; + $this->container['office_code'] = $office_code; return $this; } /** - * Gets reference_id + * Gets company_id * - * @return string|null + * @return string */ - public function getReferenceId() + public function getCompanyId() { - return $this->container['reference_id']; + return $this->container['company_id']; } /** - * Sets reference_id + * Sets company_id * - * @param string|null $reference_id Your internal identifier for the vendor from whom you are requesting a form + * @param string $company_id The ID of the associated company. * * @return self */ - public function setReferenceId($reference_id) + public function setCompanyId($company_id) { - $this->container['reference_id'] = $reference_id; + + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling CreateAndSendW9FormEmailRequest., must be bigger than or equal to 1.'); + } + + $this->container['company_id'] = $company_id; return $this; } /** - * Gets signed_at + * Gets reference_id * - * @return \DateTime|null + * @return string|null */ - public function getSignedAt() + public function getReferenceId() { - return $this->container['signed_at']; + return $this->container['reference_id']; } /** - * Sets signed_at + * Sets reference_id * - * @param \DateTime|null $signed_at The timestamp this vendor (identified by your ReferenceId) last signed a complete W-9, null if you did not include a ReferenceId or the vendor has not yet signed a W-9 in Track1099 + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setSignedAt($signed_at) + public function setReferenceId($reference_id) { - $this->container['signed_at'] = $signed_at; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets tin_match_status + * Gets name * - * @return string|null + * @return string */ - public function getTinMatchStatus() + public function getName() { - return $this->container['tin_match_status']; + return $this->container['name']; } /** - * Sets tin_match_status + * Sets name * - * @param string|null $tin_match_status Result of IRS TIN match query for name and TIN in the last signed form, null if signed_at is null + * @param string $name The name of the individual or entity associated with the form. * * @return self */ - public function setTinMatchStatus($tin_match_status) + public function setName($name) { - $allowedValues = $this->getTinMatchStatusAllowableValues(); - if (!is_null($tin_match_status) && !in_array($tin_match_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_match_status', must be one of '%s'", - $tin_match_status, - implode("', '", $allowedValues) - ) - ); + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling CreateAndSendW9FormEmailRequest., must be bigger than or equal to 1.'); } - $this->container['tin_match_status'] = $tin_match_status; + + $this->container['name'] = $name; return $this; } /** - * Gets expires_at + * Gets reference_number * - * @return \DateTime|null + * @return string|null */ - public function getExpiresAt() + public function getReferenceNumber() { - return $this->container['expires_at']; + return $this->container['reference_number']; } /** - * Sets expires_at + * Sets reference_number * - * @param \DateTime|null $expires_at Timestamp when this FormRequest will expire, ttl (or 3600) seconds from creation + * @param string|null $reference_number A reference number for the form. * * @return self */ - public function setExpiresAt($expires_at) + public function setReferenceNumber($reference_number) { - $this->container['expires_at'] = $expires_at; + $this->container['reference_number'] = $reference_number; return $this; } /** - * Gets signed_pdf + * Gets account_number * * @return string|null */ - public function getSignedPdf() + public function getAccountNumber() { - return $this->container['signed_pdf']; + return $this->container['account_number']; } /** - * Sets signed_pdf + * Sets account_number * - * @param string|null $signed_pdf URL of PDF representation of just-signed form, otherwise null. Integrations may use this value to offer a \"download for your records\" function after a vendor completes and signs a form. Link expires at the same time as this FormRequest. Treat the format of this URL as opaque and expect it to change in the future. + * @param string|null $account_number The account number associated with the form. * * @return self */ - public function setSignedPdf($signed_pdf) + public function setAccountNumber($account_number) { - $this->container['signed_pdf'] = $signed_pdf; + $this->container['account_number'] = $account_number; return $this; } diff --git a/lib/Model/A1099/V2/CompanyResponseModel.php b/lib/Model/A1099/V2/CreateCompanyRequest.php similarity index 83% rename from lib/Model/A1099/V2/CompanyResponseModel.php rename to lib/Model/A1099/V2/CreateCompanyRequest.php index 511958f..e4c3dcb 100644 --- a/lib/Model/A1099/V2/CompanyResponseModel.php +++ b/lib/Model/A1099/V2/CreateCompanyRequest.php @@ -1,6 +1,6 @@ 'string', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'name' => 'string', + 'dba_name' => 'string', 'email' => 'string', 'address' => 'string', 'city' => 'string', @@ -82,7 +80,6 @@ class CompanyResponseModel implements ModelInterface, ArrayAccess, \JsonSerializ 'zip' => 'string', 'telephone' => 'string', 'tin' => 'string', - 'dba_name' => 'string', 'reference_id' => 'string', 'do_tin_match' => 'bool', 'group_name' => 'string', @@ -90,7 +87,10 @@ class CompanyResponseModel implements ModelInterface, ArrayAccess, \JsonSerializ 'country_code' => 'string', 'resend_requests' => 'bool', 'resend_interval_days' => 'int', - 'max_reminder_attempts' => 'int' + 'max_reminder_attempts' => 'int', + 'id' => 'string', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime' ]; /** @@ -101,10 +101,8 @@ class CompanyResponseModel implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'name' => null, + 'dba_name' => null, 'email' => null, 'address' => null, 'city' => null, @@ -112,7 +110,6 @@ class CompanyResponseModel implements ModelInterface, ArrayAccess, \JsonSerializ 'zip' => null, 'telephone' => null, 'tin' => null, - 'dba_name' => null, 'reference_id' => null, 'do_tin_match' => null, 'group_name' => null, @@ -120,7 +117,10 @@ class CompanyResponseModel implements ModelInterface, ArrayAccess, \JsonSerializ 'country_code' => null, 'resend_requests' => null, 'resend_interval_days' => 'int32', - 'max_reminder_attempts' => 'int32' + 'max_reminder_attempts' => 'int32', + 'id' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time' ]; /** @@ -150,10 +150,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'name' => 'name', + 'dba_name' => 'dbaName', 'email' => 'email', 'address' => 'address', 'city' => 'city', @@ -161,7 +159,6 @@ public static function openAPIFormats() 'zip' => 'zip', 'telephone' => 'telephone', 'tin' => 'tin', - 'dba_name' => 'dbaName', 'reference_id' => 'referenceId', 'do_tin_match' => 'doTinMatch', 'group_name' => 'groupName', @@ -169,7 +166,10 @@ public static function openAPIFormats() 'country_code' => 'countryCode', 'resend_requests' => 'resendRequests', 'resend_interval_days' => 'resendIntervalDays', - 'max_reminder_attempts' => 'maxReminderAttempts' + 'max_reminder_attempts' => 'maxReminderAttempts', + 'id' => 'id', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt' ]; /** @@ -178,10 +178,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'name' => 'setName', + 'dba_name' => 'setDbaName', 'email' => 'setEmail', 'address' => 'setAddress', 'city' => 'setCity', @@ -189,7 +187,6 @@ public static function openAPIFormats() 'zip' => 'setZip', 'telephone' => 'setTelephone', 'tin' => 'setTin', - 'dba_name' => 'setDbaName', 'reference_id' => 'setReferenceId', 'do_tin_match' => 'setDoTinMatch', 'group_name' => 'setGroupName', @@ -197,7 +194,10 @@ public static function openAPIFormats() 'country_code' => 'setCountryCode', 'resend_requests' => 'setResendRequests', 'resend_interval_days' => 'setResendIntervalDays', - 'max_reminder_attempts' => 'setMaxReminderAttempts' + 'max_reminder_attempts' => 'setMaxReminderAttempts', + 'id' => 'setId', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -206,10 +206,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'name' => 'getName', + 'dba_name' => 'getDbaName', 'email' => 'getEmail', 'address' => 'getAddress', 'city' => 'getCity', @@ -217,7 +215,6 @@ public static function openAPIFormats() 'zip' => 'getZip', 'telephone' => 'getTelephone', 'tin' => 'getTin', - 'dba_name' => 'getDbaName', 'reference_id' => 'getReferenceId', 'do_tin_match' => 'getDoTinMatch', 'group_name' => 'getGroupName', @@ -225,7 +222,10 @@ public static function openAPIFormats() 'country_code' => 'getCountryCode', 'resend_requests' => 'getResendRequests', 'resend_interval_days' => 'getResendIntervalDays', - 'max_reminder_attempts' => 'getMaxReminderAttempts' + 'max_reminder_attempts' => 'getMaxReminderAttempts', + 'id' => 'getId', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -285,10 +285,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['name'] = $data['name'] ?? null; + $this->container['dba_name'] = $data['dba_name'] ?? null; $this->container['email'] = $data['email'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['city'] = $data['city'] ?? null; @@ -296,7 +294,6 @@ public function __construct(array $data = null) $this->container['zip'] = $data['zip'] ?? null; $this->container['telephone'] = $data['telephone'] ?? null; $this->container['tin'] = $data['tin'] ?? null; - $this->container['dba_name'] = $data['dba_name'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['do_tin_match'] = $data['do_tin_match'] ?? null; $this->container['group_name'] = $data['group_name'] ?? null; @@ -305,6 +302,9 @@ public function __construct(array $data = null) $this->container['resend_requests'] = $data['resend_requests'] ?? null; $this->container['resend_interval_days'] = $data['resend_interval_days'] ?? null; $this->container['max_reminder_attempts'] = $data['max_reminder_attempts'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -316,6 +316,30 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['zip'] === null) { + $invalidProperties[] = "'zip' can't be null"; + } + if ($this->container['telephone'] === null) { + $invalidProperties[] = "'telephone' can't be null"; + } + if ($this->container['tin'] === null) { + $invalidProperties[] = "'tin' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } return $invalidProperties; } @@ -332,97 +356,49 @@ public function valid() /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at created_at - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at + * Gets name * - * @return \DateTime|null + * @return string */ - public function getUpdatedAt() + public function getName() { - return $this->container['updated_at']; + return $this->container['name']; } /** - * Sets updated_at + * Sets name * - * @param \DateTime|null $updated_at updated_at + * @param string $name Legal name. Not the DBA name. * * @return self */ - public function setUpdatedAt($updated_at) + public function setName($name) { - $this->container['updated_at'] = $updated_at; + $this->container['name'] = $name; return $this; } /** - * Gets name + * Gets dba_name * * @return string|null */ - public function getName() + public function getDbaName() { - return $this->container['name']; + return $this->container['dba_name']; } /** - * Sets name + * Sets dba_name * - * @param string|null $name name + * @param string|null $dba_name Doing Business As (DBA) name or continuation of a long legal name. * * @return self */ - public function setName($name) + public function setDbaName($dba_name) { - $this->container['name'] = $name; + $this->container['dba_name'] = $dba_name; return $this; } @@ -430,7 +406,7 @@ public function setName($name) /** * Gets email * - * @return string|null + * @return string */ public function getEmail() { @@ -440,7 +416,7 @@ public function getEmail() /** * Sets email * - * @param string|null $email email + * @param string $email Contact email address. For inquiries by vendors/employees. * * @return self */ @@ -454,7 +430,7 @@ public function setEmail($email) /** * Gets address * - * @return string|null + * @return string */ public function getAddress() { @@ -464,7 +440,7 @@ public function getAddress() /** * Sets address * - * @param string|null $address address + * @param string $address Address. * * @return self */ @@ -478,7 +454,7 @@ public function setAddress($address) /** * Gets city * - * @return string|null + * @return string */ public function getCity() { @@ -488,7 +464,7 @@ public function getCity() /** * Sets city * - * @param string|null $city city + * @param string $city City. * * @return self */ @@ -512,7 +488,7 @@ public function getState() /** * Sets state * - * @param string|null $state state + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ @@ -526,7 +502,7 @@ public function setState($state) /** * Gets zip * - * @return string|null + * @return string */ public function getZip() { @@ -536,7 +512,7 @@ public function getZip() /** * Sets zip * - * @param string|null $zip zip + * @param string $zip ZIP/postal code. * * @return self */ @@ -550,7 +526,7 @@ public function setZip($zip) /** * Gets telephone * - * @return string|null + * @return string */ public function getTelephone() { @@ -560,7 +536,7 @@ public function getTelephone() /** * Sets telephone * - * @param string|null $telephone telephone + * @param string $telephone Contact phone number (must contain at least 10 digits, max 15 characters). * * @return self */ @@ -574,7 +550,7 @@ public function setTelephone($telephone) /** * Gets tin * - * @return string|null + * @return string */ public function getTin() { @@ -584,7 +560,7 @@ public function getTin() /** * Sets tin * - * @param string|null $tin tin + * @param string $tin Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies). * * @return self */ @@ -595,30 +571,6 @@ public function setTin($tin) return $this; } - /** - * Gets dba_name - * - * @return string|null - */ - public function getDbaName() - { - return $this->container['dba_name']; - } - - /** - * Sets dba_name - * - * @param string|null $dba_name dba_name - * - * @return self - */ - public function setDbaName($dba_name) - { - $this->container['dba_name'] = $dba_name; - - return $this; - } - /** * Gets reference_id * @@ -632,7 +584,7 @@ public function getReferenceId() /** * Sets reference_id * - * @param string|null $reference_id reference_id + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ @@ -656,7 +608,7 @@ public function getDoTinMatch() /** * Sets do_tin_match * - * @param bool|null $do_tin_match do_tin_match + * @param bool|null $do_tin_match Indicates whether the company authorizes IRS TIN matching. * * @return self */ @@ -680,7 +632,7 @@ public function getGroupName() /** * Sets group_name * - * @param string|null $group_name group_name + * @param string|null $group_name Group name for organizing companies (creates or finds group by name). * * @return self */ @@ -704,7 +656,7 @@ public function getForeignProvince() /** * Sets foreign_province * - * @param string|null $foreign_province foreign_province + * @param string|null $foreign_province Province or region for non-US/CA addresses. * * @return self */ @@ -718,7 +670,7 @@ public function setForeignProvince($foreign_province) /** * Gets country_code * - * @return string|null + * @return string */ public function getCountryCode() { @@ -728,7 +680,7 @@ public function getCountryCode() /** * Sets country_code * - * @param string|null $country_code country_code + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ @@ -752,7 +704,7 @@ public function getResendRequests() /** * Sets resend_requests * - * @param bool|null $resend_requests resend_requests + * @param bool|null $resend_requests Boolean to enable automatic reminder emails (default: false). * * @return self */ @@ -776,7 +728,7 @@ public function getResendIntervalDays() /** * Sets resend_interval_days * - * @param int|null $resend_interval_days resend_interval_days + * @param int|null $resend_interval_days Days between reminder emails (7-365, required if resendRequests is true). * * @return self */ @@ -800,7 +752,7 @@ public function getMaxReminderAttempts() /** * Sets max_reminder_attempts * - * @param int|null $max_reminder_attempts max_reminder_attempts + * @param int|null $max_reminder_attempts Maximum number of reminder attempts (1-52, required if resendRequests is true). * * @return self */ @@ -810,6 +762,78 @@ public function setMaxReminderAttempts($max_reminder_attempts) return $this; } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique identifier set when the record is created. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at Date time when the record was created. + * + * @return self + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at Date time when the record was last updated. + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/CompanyModel.php b/lib/Model/A1099/V2/CreateIssuerRequest.php similarity index 72% rename from lib/Model/A1099/V2/CompanyModel.php rename to lib/Model/A1099/V2/CreateIssuerRequest.php index a8ce4d7..2c44210 100644 --- a/lib/Model/A1099/V2/CompanyModel.php +++ b/lib/Model/A1099/V2/CreateIssuerRequest.php @@ -1,6 +1,6 @@ 'string', - 'user_id' => 'int', - 'account_id' => 'int', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'name' => 'string', + 'dba_name' => 'string', + 'tin' => 'string', + 'reference_id' => 'string', + 'telephone' => 'string', + 'tax_year' => 'int', + 'country_code' => 'string', 'email' => 'string', 'address' => 'string', 'city' => 'string', 'state' => 'string', 'zip' => 'string', - 'telephone' => 'string', - 'tin' => 'string', - 'dba_name' => 'string', - 'reference_id' => 'string', - 'do_tin_match' => 'bool', - 'group_name' => 'string', 'foreign_province' => 'string', - 'country_code' => 'string', - 'resend_requests' => 'bool', - 'resend_interval_days' => 'int', - 'max_reminder_attempts' => 'int' + 'transfer_agent_name' => 'string', + 'last_filing' => 'bool', + 'id' => 'string', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime' ]; /** @@ -103,28 +99,24 @@ class CompanyModel implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'user_id' => 'int64', - 'account_id' => 'int64', - 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'name' => null, + 'dba_name' => null, + 'tin' => null, + 'reference_id' => null, + 'telephone' => null, + 'tax_year' => 'int32', + 'country_code' => null, 'email' => null, 'address' => null, 'city' => null, 'state' => null, 'zip' => null, - 'telephone' => null, - 'tin' => null, - 'dba_name' => null, - 'reference_id' => null, - 'do_tin_match' => null, - 'group_name' => null, 'foreign_province' => null, - 'country_code' => null, - 'resend_requests' => null, - 'resend_interval_days' => 'int32', - 'max_reminder_attempts' => 'int32' + 'transfer_agent_name' => null, + 'last_filing' => null, + 'id' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time' ]; /** @@ -154,28 +146,24 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'user_id' => 'userId', - 'account_id' => 'accountId', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'name' => 'name', + 'dba_name' => 'dbaName', + 'tin' => 'tin', + 'reference_id' => 'referenceId', + 'telephone' => 'telephone', + 'tax_year' => 'taxYear', + 'country_code' => 'countryCode', 'email' => 'email', 'address' => 'address', 'city' => 'city', 'state' => 'state', 'zip' => 'zip', - 'telephone' => 'telephone', - 'tin' => 'tin', - 'dba_name' => 'dbaName', - 'reference_id' => 'referenceId', - 'do_tin_match' => 'doTinMatch', - 'group_name' => 'groupName', 'foreign_province' => 'foreignProvince', - 'country_code' => 'countryCode', - 'resend_requests' => 'resendRequests', - 'resend_interval_days' => 'resendIntervalDays', - 'max_reminder_attempts' => 'maxReminderAttempts' + 'transfer_agent_name' => 'transferAgentName', + 'last_filing' => 'lastFiling', + 'id' => 'id', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt' ]; /** @@ -184,28 +172,24 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'user_id' => 'setUserId', - 'account_id' => 'setAccountId', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'name' => 'setName', + 'dba_name' => 'setDbaName', + 'tin' => 'setTin', + 'reference_id' => 'setReferenceId', + 'telephone' => 'setTelephone', + 'tax_year' => 'setTaxYear', + 'country_code' => 'setCountryCode', 'email' => 'setEmail', 'address' => 'setAddress', 'city' => 'setCity', 'state' => 'setState', 'zip' => 'setZip', - 'telephone' => 'setTelephone', - 'tin' => 'setTin', - 'dba_name' => 'setDbaName', - 'reference_id' => 'setReferenceId', - 'do_tin_match' => 'setDoTinMatch', - 'group_name' => 'setGroupName', 'foreign_province' => 'setForeignProvince', - 'country_code' => 'setCountryCode', - 'resend_requests' => 'setResendRequests', - 'resend_interval_days' => 'setResendIntervalDays', - 'max_reminder_attempts' => 'setMaxReminderAttempts' + 'transfer_agent_name' => 'setTransferAgentName', + 'last_filing' => 'setLastFiling', + 'id' => 'setId', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -214,28 +198,24 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'user_id' => 'getUserId', - 'account_id' => 'getAccountId', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'name' => 'getName', + 'dba_name' => 'getDbaName', + 'tin' => 'getTin', + 'reference_id' => 'getReferenceId', + 'telephone' => 'getTelephone', + 'tax_year' => 'getTaxYear', + 'country_code' => 'getCountryCode', 'email' => 'getEmail', 'address' => 'getAddress', 'city' => 'getCity', 'state' => 'getState', 'zip' => 'getZip', - 'telephone' => 'getTelephone', - 'tin' => 'getTin', - 'dba_name' => 'getDbaName', - 'reference_id' => 'getReferenceId', - 'do_tin_match' => 'getDoTinMatch', - 'group_name' => 'getGroupName', 'foreign_province' => 'getForeignProvince', - 'country_code' => 'getCountryCode', - 'resend_requests' => 'getResendRequests', - 'resend_interval_days' => 'getResendIntervalDays', - 'max_reminder_attempts' => 'getMaxReminderAttempts' + 'transfer_agent_name' => 'getTransferAgentName', + 'last_filing' => 'getLastFiling', + 'id' => 'getId', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -295,28 +275,24 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['user_id'] = $data['user_id'] ?? null; - $this->container['account_id'] = $data['account_id'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['name'] = $data['name'] ?? null; + $this->container['dba_name'] = $data['dba_name'] ?? null; + $this->container['tin'] = $data['tin'] ?? null; + $this->container['reference_id'] = $data['reference_id'] ?? null; + $this->container['telephone'] = $data['telephone'] ?? null; + $this->container['tax_year'] = $data['tax_year'] ?? null; + $this->container['country_code'] = $data['country_code'] ?? null; $this->container['email'] = $data['email'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['city'] = $data['city'] ?? null; $this->container['state'] = $data['state'] ?? null; $this->container['zip'] = $data['zip'] ?? null; - $this->container['telephone'] = $data['telephone'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['dba_name'] = $data['dba_name'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['do_tin_match'] = $data['do_tin_match'] ?? null; - $this->container['group_name'] = $data['group_name'] ?? null; $this->container['foreign_province'] = $data['foreign_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['resend_requests'] = $data['resend_requests'] ?? null; - $this->container['resend_interval_days'] = $data['resend_interval_days'] ?? null; - $this->container['max_reminder_attempts'] = $data['max_reminder_attempts'] ?? null; + $this->container['transfer_agent_name'] = $data['transfer_agent_name'] ?? null; + $this->container['last_filing'] = $data['last_filing'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -328,6 +304,33 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['telephone'] === null) { + $invalidProperties[] = "'telephone' can't be null"; + } + if ($this->container['tax_year'] === null) { + $invalidProperties[] = "'tax_year' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + if ($this->container['zip'] === null) { + $invalidProperties[] = "'zip' can't be null"; + } + if ($this->container['last_filing'] === null) { + $invalidProperties[] = "'last_filing' can't be null"; + } return $invalidProperties; } @@ -344,145 +347,169 @@ public function valid() /** - * Gets id + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Legal name. Not the DBA name. + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets dba_name * * @return string|null */ - public function getId() + public function getDbaName() { - return $this->container['id']; + return $this->container['dba_name']; } /** - * Sets id + * Sets dba_name * - * @param string|null $id Company ID + * @param string|null $dba_name Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. * * @return self */ - public function setId($id) + public function setDbaName($dba_name) { - $this->container['id'] = $id; + $this->container['dba_name'] = $dba_name; return $this; } /** - * Gets user_id + * Gets tin * - * @return int|null + * @return string|null */ - public function getUserId() + public function getTin() { - return $this->container['user_id']; + return $this->container['tin']; } /** - * Sets user_id + * Sets tin * - * @param int|null $user_id User ID associated with the company + * @param string|null $tin Federal Tax Identification Number (TIN). * * @return self */ - public function setUserId($user_id) + public function setTin($tin) { - $this->container['user_id'] = $user_id; + $this->container['tin'] = $tin; return $this; } /** - * Gets account_id + * Gets reference_id * - * @return int|null + * @return string|null */ - public function getAccountId() + public function getReferenceId() { - return $this->container['account_id']; + return $this->container['reference_id']; } /** - * Sets account_id + * Sets reference_id * - * @param int|null $account_id Account ID associated with the company + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. * * @return self */ - public function setAccountId($account_id) + public function setReferenceId($reference_id) { - $this->container['account_id'] = $account_id; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets created_at + * Gets telephone * - * @return \DateTime|null + * @return string */ - public function getCreatedAt() + public function getTelephone() { - return $this->container['created_at']; + return $this->container['telephone']; } /** - * Sets created_at + * Sets telephone * - * @param \DateTime|null $created_at Record creation timestamp + * @param string $telephone Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. * * @return self */ - public function setCreatedAt($created_at) + public function setTelephone($telephone) { - $this->container['created_at'] = $created_at; + $this->container['telephone'] = $telephone; return $this; } /** - * Gets updated_at + * Gets tax_year * - * @return \DateTime|null + * @return int */ - public function getUpdatedAt() + public function getTaxYear() { - return $this->container['updated_at']; + return $this->container['tax_year']; } /** - * Sets updated_at + * Sets tax_year * - * @param \DateTime|null $updated_at Record last update timestamp + * @param int $tax_year Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. * * @return self */ - public function setUpdatedAt($updated_at) + public function setTaxYear($tax_year) { - $this->container['updated_at'] = $updated_at; + $this->container['tax_year'] = $tax_year; return $this; } /** - * Gets name + * Gets country_code * * @return string|null */ - public function getName() + public function getCountryCode() { - return $this->container['name']; + return $this->container['country_code']; } /** - * Sets name + * Sets country_code * - * @param string|null $name name + * @param string|null $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. * * @return self */ - public function setName($name) + public function setCountryCode($country_code) { - $this->container['name'] = $name; + $this->container['country_code'] = $country_code; return $this; } @@ -490,7 +517,7 @@ public function setName($name) /** * Gets email * - * @return string|null + * @return string */ public function getEmail() { @@ -500,7 +527,7 @@ public function getEmail() /** * Sets email * - * @param string|null $email email + * @param string $email Contact email address. For recipient inquiries. * * @return self */ @@ -514,7 +541,7 @@ public function setEmail($email) /** * Gets address * - * @return string|null + * @return string */ public function getAddress() { @@ -524,7 +551,7 @@ public function getAddress() /** * Sets address * - * @param string|null $address address + * @param string $address Address. * * @return self */ @@ -538,7 +565,7 @@ public function setAddress($address) /** * Gets city * - * @return string|null + * @return string */ public function getCity() { @@ -548,7 +575,7 @@ public function getCity() /** * Sets city * - * @param string|null $city city + * @param string $city City. * * @return self */ @@ -562,7 +589,7 @@ public function setCity($city) /** * Gets state * - * @return string|null + * @return string */ public function getState() { @@ -572,7 +599,7 @@ public function getState() /** * Sets state * - * @param string|null $state state + * @param string $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ @@ -586,7 +613,7 @@ public function setState($state) /** * Gets zip * - * @return string|null + * @return string */ public function getZip() { @@ -596,7 +623,7 @@ public function getZip() /** * Sets zip * - * @param string|null $zip zip + * @param string $zip ZIP/postal code. * * @return self */ @@ -608,265 +635,145 @@ public function setZip($zip) } /** - * Gets telephone - * - * @return string|null - */ - public function getTelephone() - { - return $this->container['telephone']; - } - - /** - * Sets telephone - * - * @param string|null $telephone telephone - * - * @return self - */ - public function setTelephone($telephone) - { - $this->container['telephone'] = $telephone; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin tin - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets dba_name - * - * @return string|null - */ - public function getDbaName() - { - return $this->container['dba_name']; - } - - /** - * Sets dba_name - * - * @param string|null $dba_name dba_name - * - * @return self - */ - public function setDbaName($dba_name) - { - $this->container['dba_name'] = $dba_name; - - return $this; - } - - /** - * Gets reference_id + * Gets foreign_province * * @return string|null */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id reference_id - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets do_tin_match - * - * @return bool|null - */ - public function getDoTinMatch() + public function getForeignProvince() { - return $this->container['do_tin_match']; + return $this->container['foreign_province']; } /** - * Sets do_tin_match + * Sets foreign_province * - * @param bool|null $do_tin_match do_tin_match + * @param string|null $foreign_province Province or region for non-US/CA addresses. * * @return self */ - public function setDoTinMatch($do_tin_match) + public function setForeignProvince($foreign_province) { - $this->container['do_tin_match'] = $do_tin_match; + $this->container['foreign_province'] = $foreign_province; return $this; } /** - * Gets group_name + * Gets transfer_agent_name * * @return string|null */ - public function getGroupName() + public function getTransferAgentName() { - return $this->container['group_name']; + return $this->container['transfer_agent_name']; } /** - * Sets group_name + * Sets transfer_agent_name * - * @param string|null $group_name group_name + * @param string|null $transfer_agent_name Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. * * @return self */ - public function setGroupName($group_name) + public function setTransferAgentName($transfer_agent_name) { - $this->container['group_name'] = $group_name; + $this->container['transfer_agent_name'] = $transfer_agent_name; return $this; } /** - * Gets foreign_province + * Gets last_filing * - * @return string|null + * @return bool */ - public function getForeignProvince() + public function getLastFiling() { - return $this->container['foreign_province']; + return $this->container['last_filing']; } /** - * Sets foreign_province + * Sets last_filing * - * @param string|null $foreign_province foreign_province + * @param bool $last_filing Indicates if this is the issuer's final year filing. * * @return self */ - public function setForeignProvince($foreign_province) + public function setLastFiling($last_filing) { - $this->container['foreign_province'] = $foreign_province; + $this->container['last_filing'] = $last_filing; return $this; } /** - * Gets country_code + * Gets id * * @return string|null */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code country_code - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets resend_requests - * - * @return bool|null - */ - public function getResendRequests() + public function getId() { - return $this->container['resend_requests']; + return $this->container['id']; } /** - * Sets resend_requests + * Sets id * - * @param bool|null $resend_requests resend_requests + * @param string|null $id Unique identifier set when the record is created. * * @return self */ - public function setResendRequests($resend_requests) + public function setId($id) { - $this->container['resend_requests'] = $resend_requests; + $this->container['id'] = $id; return $this; } /** - * Gets resend_interval_days + * Gets created_at * - * @return int|null + * @return \DateTime|null */ - public function getResendIntervalDays() + public function getCreatedAt() { - return $this->container['resend_interval_days']; + return $this->container['created_at']; } /** - * Sets resend_interval_days + * Sets created_at * - * @param int|null $resend_interval_days resend_interval_days + * @param \DateTime|null $created_at Date time when the record was created. * * @return self */ - public function setResendIntervalDays($resend_interval_days) + public function setCreatedAt($created_at) { - $this->container['resend_interval_days'] = $resend_interval_days; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets max_reminder_attempts + * Gets updated_at * - * @return int|null + * @return \DateTime|null */ - public function getMaxReminderAttempts() + public function getUpdatedAt() { - return $this->container['max_reminder_attempts']; + return $this->container['updated_at']; } /** - * Sets max_reminder_attempts + * Sets updated_at * - * @param int|null $max_reminder_attempts max_reminder_attempts + * @param \DateTime|null $updated_at Date time when the record was last updated. * * @return self */ - public function setMaxReminderAttempts($max_reminder_attempts) + public function setUpdatedAt($updated_at) { - $this->container['max_reminder_attempts'] = $max_reminder_attempts; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/lib/Model/A1099/V2/CreateW9Form201Response.php b/lib/Model/A1099/V2/CreateW9Form201Response.php index f38d5e8..792655b 100644 --- a/lib/Model/A1099/V2/CreateW9Form201Response.php +++ b/lib/Model/A1099/V2/CreateW9Form201Response.php @@ -71,39 +71,6 @@ class CreateW9Form201Response implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $openAPITypes = [ - 'employee_first_name' => 'string', - 'employee_middle_name' => 'string', - 'employee_last_name' => 'string', - 'employee_name_suffix' => 'string', - 'tin_type' => 'string', - 'tin' => 'string', - 'address' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'marital_status' => 'string', - 'last_name_differs' => 'bool', - 'num_allowances' => 'int', - 'other_dependents' => 'int', - 'non_job_income' => 'float', - 'deductions' => 'float', - 'additional_withheld' => 'float', - 'exempt_from_withholding' => 'bool', - 'office_code' => 'string', - 'id' => 'string', - 'type' => 'string', - 'entry_status' => 'string', - 'entry_status_date' => '\DateTime', - 'reference_id' => 'string', - 'company_id' => 'string', - 'display_name' => 'string', - 'email' => 'string', - 'archived' => 'bool', - 'signature' => 'string', - 'signed_date' => '\DateTime', - 'e_delivery_consented_at' => '\DateTime', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'name' => 'string', 'citizenship_country' => 'string', 'disregarded_entity' => 'string', @@ -121,6 +88,8 @@ class CreateW9Form201Response implements ModelInterface, ArrayAccess, \JsonSeria 'mailing_state' => 'string', 'mailing_zip' => 'string', 'mailing_country' => 'string', + 'tin_type' => 'string', + 'tin' => 'string', 'giin' => 'string', 'foreign_tin_not_required' => 'bool', 'foreign_tin' => 'string', @@ -198,6 +167,20 @@ class CreateW9Form201Response implements ModelInterface, ArrayAccess, \JsonSeria 'substantial_us_owners' => '\Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerResponse[]', 'signer_name' => 'string', 'capacity_to_sign_certification' => 'bool', + 'id' => 'string', + 'entry_status' => '\Avalara\SDK\Model\A1099\V2\EntryStatusResponse', + 'reference_id' => 'string', + 'company_id' => 'string', + 'display_name' => 'string', + 'email' => 'string', + 'archived' => 'bool', + 'ancestor_id' => 'string', + 'signature' => 'string', + 'signed_date' => '\DateTime', + 'e_delivery_consented_at' => '\DateTime', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'type' => 'string', 'birthday' => '\DateTime', 'signer_capacity' => 'string', 'qualified_intermediary_certification' => 'bool', @@ -246,7 +229,11 @@ class CreateW9Form201Response implements ModelInterface, ArrayAccess, \JsonSeria 'exempt_payee_code' => 'string', 'exempt_fatca_code' => 'string', 'foreign_country_indicator' => 'bool', + 'address' => 'string', 'foreign_address' => 'string', + 'city' => 'string', + 'state' => 'string', + 'zip' => 'string', 'account_number' => 'string', 'backup_withholding' => 'bool', 'is1099able' => 'bool', @@ -261,39 +248,6 @@ class CreateW9Form201Response implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $openAPIFormats = [ - 'employee_first_name' => null, - 'employee_middle_name' => null, - 'employee_last_name' => null, - 'employee_name_suffix' => null, - 'tin_type' => null, - 'tin' => null, - 'address' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'marital_status' => null, - 'last_name_differs' => null, - 'num_allowances' => 'int32', - 'other_dependents' => 'int32', - 'non_job_income' => 'float', - 'deductions' => 'float', - 'additional_withheld' => 'float', - 'exempt_from_withholding' => null, - 'office_code' => null, - 'id' => null, - 'type' => null, - 'entry_status' => null, - 'entry_status_date' => 'date-time', - 'reference_id' => null, - 'company_id' => null, - 'display_name' => null, - 'email' => null, - 'archived' => null, - 'signature' => null, - 'signed_date' => 'date-time', - 'e_delivery_consented_at' => 'date-time', - 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'name' => null, 'citizenship_country' => null, 'disregarded_entity' => null, @@ -311,6 +265,8 @@ class CreateW9Form201Response implements ModelInterface, ArrayAccess, \JsonSeria 'mailing_state' => null, 'mailing_zip' => null, 'mailing_country' => null, + 'tin_type' => null, + 'tin' => null, 'giin' => null, 'foreign_tin_not_required' => null, 'foreign_tin' => null, @@ -388,6 +344,20 @@ class CreateW9Form201Response implements ModelInterface, ArrayAccess, \JsonSeria 'substantial_us_owners' => null, 'signer_name' => null, 'capacity_to_sign_certification' => null, + 'id' => null, + 'entry_status' => null, + 'reference_id' => null, + 'company_id' => null, + 'display_name' => null, + 'email' => null, + 'archived' => null, + 'ancestor_id' => null, + 'signature' => null, + 'signed_date' => 'date-time', + 'e_delivery_consented_at' => 'date-time', + 'created_at' => 'date-time', + 'updated_at' => 'date-time', + 'type' => null, 'birthday' => 'date', 'signer_capacity' => null, 'qualified_intermediary_certification' => null, @@ -436,7 +406,11 @@ class CreateW9Form201Response implements ModelInterface, ArrayAccess, \JsonSeria 'exempt_payee_code' => null, 'exempt_fatca_code' => null, 'foreign_country_indicator' => null, + 'address' => null, 'foreign_address' => null, + 'city' => null, + 'state' => null, + 'zip' => null, 'account_number' => null, 'backup_withholding' => null, 'is1099able' => null, @@ -470,39 +444,6 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'employee_first_name' => 'employeeFirstName', - 'employee_middle_name' => 'employeeMiddleName', - 'employee_last_name' => 'employeeLastName', - 'employee_name_suffix' => 'employeeNameSuffix', - 'tin_type' => 'tinType', - 'tin' => 'tin', - 'address' => 'address', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'marital_status' => 'maritalStatus', - 'last_name_differs' => 'lastNameDiffers', - 'num_allowances' => 'numAllowances', - 'other_dependents' => 'otherDependents', - 'non_job_income' => 'nonJobIncome', - 'deductions' => 'deductions', - 'additional_withheld' => 'additionalWithheld', - 'exempt_from_withholding' => 'exemptFromWithholding', - 'office_code' => 'officeCode', - 'id' => 'id', - 'type' => 'type', - 'entry_status' => 'entryStatus', - 'entry_status_date' => 'entryStatusDate', - 'reference_id' => 'referenceId', - 'company_id' => 'companyId', - 'display_name' => 'displayName', - 'email' => 'email', - 'archived' => 'archived', - 'signature' => 'signature', - 'signed_date' => 'signedDate', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'name' => 'name', 'citizenship_country' => 'citizenshipCountry', 'disregarded_entity' => 'disregardedEntity', @@ -520,6 +461,8 @@ public static function openAPIFormats() 'mailing_state' => 'mailingState', 'mailing_zip' => 'mailingZip', 'mailing_country' => 'mailingCountry', + 'tin_type' => 'tinType', + 'tin' => 'tin', 'giin' => 'giin', 'foreign_tin_not_required' => 'foreignTinNotRequired', 'foreign_tin' => 'foreignTin', @@ -597,6 +540,20 @@ public static function openAPIFormats() 'substantial_us_owners' => 'substantialUsOwners', 'signer_name' => 'signerName', 'capacity_to_sign_certification' => 'capacityToSignCertification', + 'id' => 'id', + 'entry_status' => 'entryStatus', + 'reference_id' => 'referenceId', + 'company_id' => 'companyId', + 'display_name' => 'displayName', + 'email' => 'email', + 'archived' => 'archived', + 'ancestor_id' => 'ancestorId', + 'signature' => 'signature', + 'signed_date' => 'signedDate', + 'e_delivery_consented_at' => 'eDeliveryConsentedAt', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', + 'type' => 'type', 'birthday' => 'birthday', 'signer_capacity' => 'signerCapacity', 'qualified_intermediary_certification' => 'qualifiedIntermediaryCertification', @@ -645,7 +602,11 @@ public static function openAPIFormats() 'exempt_payee_code' => 'exemptPayeeCode', 'exempt_fatca_code' => 'exemptFatcaCode', 'foreign_country_indicator' => 'foreignCountryIndicator', + 'address' => 'address', 'foreign_address' => 'foreignAddress', + 'city' => 'city', + 'state' => 'state', + 'zip' => 'zip', 'account_number' => 'accountNumber', 'backup_withholding' => 'backupWithholding', 'is1099able' => 'is1099able', @@ -658,39 +619,6 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'employee_first_name' => 'setEmployeeFirstName', - 'employee_middle_name' => 'setEmployeeMiddleName', - 'employee_last_name' => 'setEmployeeLastName', - 'employee_name_suffix' => 'setEmployeeNameSuffix', - 'tin_type' => 'setTinType', - 'tin' => 'setTin', - 'address' => 'setAddress', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'marital_status' => 'setMaritalStatus', - 'last_name_differs' => 'setLastNameDiffers', - 'num_allowances' => 'setNumAllowances', - 'other_dependents' => 'setOtherDependents', - 'non_job_income' => 'setNonJobIncome', - 'deductions' => 'setDeductions', - 'additional_withheld' => 'setAdditionalWithheld', - 'exempt_from_withholding' => 'setExemptFromWithholding', - 'office_code' => 'setOfficeCode', - 'id' => 'setId', - 'type' => 'setType', - 'entry_status' => 'setEntryStatus', - 'entry_status_date' => 'setEntryStatusDate', - 'reference_id' => 'setReferenceId', - 'company_id' => 'setCompanyId', - 'display_name' => 'setDisplayName', - 'email' => 'setEmail', - 'archived' => 'setArchived', - 'signature' => 'setSignature', - 'signed_date' => 'setSignedDate', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'name' => 'setName', 'citizenship_country' => 'setCitizenshipCountry', 'disregarded_entity' => 'setDisregardedEntity', @@ -708,6 +636,8 @@ public static function openAPIFormats() 'mailing_state' => 'setMailingState', 'mailing_zip' => 'setMailingZip', 'mailing_country' => 'setMailingCountry', + 'tin_type' => 'setTinType', + 'tin' => 'setTin', 'giin' => 'setGiin', 'foreign_tin_not_required' => 'setForeignTinNotRequired', 'foreign_tin' => 'setForeignTin', @@ -785,6 +715,20 @@ public static function openAPIFormats() 'substantial_us_owners' => 'setSubstantialUsOwners', 'signer_name' => 'setSignerName', 'capacity_to_sign_certification' => 'setCapacityToSignCertification', + 'id' => 'setId', + 'entry_status' => 'setEntryStatus', + 'reference_id' => 'setReferenceId', + 'company_id' => 'setCompanyId', + 'display_name' => 'setDisplayName', + 'email' => 'setEmail', + 'archived' => 'setArchived', + 'ancestor_id' => 'setAncestorId', + 'signature' => 'setSignature', + 'signed_date' => 'setSignedDate', + 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'type' => 'setType', 'birthday' => 'setBirthday', 'signer_capacity' => 'setSignerCapacity', 'qualified_intermediary_certification' => 'setQualifiedIntermediaryCertification', @@ -833,7 +777,11 @@ public static function openAPIFormats() 'exempt_payee_code' => 'setExemptPayeeCode', 'exempt_fatca_code' => 'setExemptFatcaCode', 'foreign_country_indicator' => 'setForeignCountryIndicator', + 'address' => 'setAddress', 'foreign_address' => 'setForeignAddress', + 'city' => 'setCity', + 'state' => 'setState', + 'zip' => 'setZip', 'account_number' => 'setAccountNumber', 'backup_withholding' => 'setBackupWithholding', 'is1099able' => 'setIs1099able', @@ -846,39 +794,6 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'employee_first_name' => 'getEmployeeFirstName', - 'employee_middle_name' => 'getEmployeeMiddleName', - 'employee_last_name' => 'getEmployeeLastName', - 'employee_name_suffix' => 'getEmployeeNameSuffix', - 'tin_type' => 'getTinType', - 'tin' => 'getTin', - 'address' => 'getAddress', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'marital_status' => 'getMaritalStatus', - 'last_name_differs' => 'getLastNameDiffers', - 'num_allowances' => 'getNumAllowances', - 'other_dependents' => 'getOtherDependents', - 'non_job_income' => 'getNonJobIncome', - 'deductions' => 'getDeductions', - 'additional_withheld' => 'getAdditionalWithheld', - 'exempt_from_withholding' => 'getExemptFromWithholding', - 'office_code' => 'getOfficeCode', - 'id' => 'getId', - 'type' => 'getType', - 'entry_status' => 'getEntryStatus', - 'entry_status_date' => 'getEntryStatusDate', - 'reference_id' => 'getReferenceId', - 'company_id' => 'getCompanyId', - 'display_name' => 'getDisplayName', - 'email' => 'getEmail', - 'archived' => 'getArchived', - 'signature' => 'getSignature', - 'signed_date' => 'getSignedDate', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'name' => 'getName', 'citizenship_country' => 'getCitizenshipCountry', 'disregarded_entity' => 'getDisregardedEntity', @@ -896,6 +811,8 @@ public static function openAPIFormats() 'mailing_state' => 'getMailingState', 'mailing_zip' => 'getMailingZip', 'mailing_country' => 'getMailingCountry', + 'tin_type' => 'getTinType', + 'tin' => 'getTin', 'giin' => 'getGiin', 'foreign_tin_not_required' => 'getForeignTinNotRequired', 'foreign_tin' => 'getForeignTin', @@ -973,6 +890,20 @@ public static function openAPIFormats() 'substantial_us_owners' => 'getSubstantialUsOwners', 'signer_name' => 'getSignerName', 'capacity_to_sign_certification' => 'getCapacityToSignCertification', + 'id' => 'getId', + 'entry_status' => 'getEntryStatus', + 'reference_id' => 'getReferenceId', + 'company_id' => 'getCompanyId', + 'display_name' => 'getDisplayName', + 'email' => 'getEmail', + 'archived' => 'getArchived', + 'ancestor_id' => 'getAncestorId', + 'signature' => 'getSignature', + 'signed_date' => 'getSignedDate', + 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'type' => 'getType', 'birthday' => 'getBirthday', 'signer_capacity' => 'getSignerCapacity', 'qualified_intermediary_certification' => 'getQualifiedIntermediaryCertification', @@ -1021,7 +952,11 @@ public static function openAPIFormats() 'exempt_payee_code' => 'getExemptPayeeCode', 'exempt_fatca_code' => 'getExemptFatcaCode', 'foreign_country_indicator' => 'getForeignCountryIndicator', + 'address' => 'getAddress', 'foreign_address' => 'getForeignAddress', + 'city' => 'getCity', + 'state' => 'getState', + 'zip' => 'getZip', 'account_number' => 'getAccountNumber', 'backup_withholding' => 'getBackupWithholding', 'is1099able' => 'getIs1099able', @@ -1085,39 +1020,6 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['employee_first_name'] = $data['employee_first_name'] ?? null; - $this->container['employee_middle_name'] = $data['employee_middle_name'] ?? null; - $this->container['employee_last_name'] = $data['employee_last_name'] ?? null; - $this->container['employee_name_suffix'] = $data['employee_name_suffix'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['marital_status'] = $data['marital_status'] ?? null; - $this->container['last_name_differs'] = $data['last_name_differs'] ?? null; - $this->container['num_allowances'] = $data['num_allowances'] ?? null; - $this->container['other_dependents'] = $data['other_dependents'] ?? null; - $this->container['non_job_income'] = $data['non_job_income'] ?? null; - $this->container['deductions'] = $data['deductions'] ?? null; - $this->container['additional_withheld'] = $data['additional_withheld'] ?? null; - $this->container['exempt_from_withholding'] = $data['exempt_from_withholding'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['entry_status'] = $data['entry_status'] ?? null; - $this->container['entry_status_date'] = $data['entry_status_date'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['company_id'] = $data['company_id'] ?? null; - $this->container['display_name'] = $data['display_name'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['archived'] = $data['archived'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; - $this->container['signed_date'] = $data['signed_date'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['name'] = $data['name'] ?? null; $this->container['citizenship_country'] = $data['citizenship_country'] ?? null; $this->container['disregarded_entity'] = $data['disregarded_entity'] ?? null; @@ -1135,6 +1037,8 @@ public function __construct(array $data = null) $this->container['mailing_state'] = $data['mailing_state'] ?? null; $this->container['mailing_zip'] = $data['mailing_zip'] ?? null; $this->container['mailing_country'] = $data['mailing_country'] ?? null; + $this->container['tin_type'] = $data['tin_type'] ?? null; + $this->container['tin'] = $data['tin'] ?? null; $this->container['giin'] = $data['giin'] ?? null; $this->container['foreign_tin_not_required'] = $data['foreign_tin_not_required'] ?? null; $this->container['foreign_tin'] = $data['foreign_tin'] ?? null; @@ -1212,6 +1116,20 @@ public function __construct(array $data = null) $this->container['substantial_us_owners'] = $data['substantial_us_owners'] ?? null; $this->container['signer_name'] = $data['signer_name'] ?? null; $this->container['capacity_to_sign_certification'] = $data['capacity_to_sign_certification'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['entry_status'] = $data['entry_status'] ?? null; + $this->container['reference_id'] = $data['reference_id'] ?? null; + $this->container['company_id'] = $data['company_id'] ?? null; + $this->container['display_name'] = $data['display_name'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['archived'] = $data['archived'] ?? null; + $this->container['ancestor_id'] = $data['ancestor_id'] ?? null; + $this->container['signature'] = $data['signature'] ?? null; + $this->container['signed_date'] = $data['signed_date'] ?? null; + $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; + $this->container['type'] = $data['type'] ?? null; $this->container['birthday'] = $data['birthday'] ?? null; $this->container['signer_capacity'] = $data['signer_capacity'] ?? null; $this->container['qualified_intermediary_certification'] = $data['qualified_intermediary_certification'] ?? null; @@ -1260,7 +1178,11 @@ public function __construct(array $data = null) $this->container['exempt_payee_code'] = $data['exempt_payee_code'] ?? null; $this->container['exempt_fatca_code'] = $data['exempt_fatca_code'] ?? null; $this->container['foreign_country_indicator'] = $data['foreign_country_indicator'] ?? null; + $this->container['address'] = $data['address'] ?? null; $this->container['foreign_address'] = $data['foreign_address'] ?? null; + $this->container['city'] = $data['city'] ?? null; + $this->container['state'] = $data['state'] ?? null; + $this->container['zip'] = $data['zip'] ?? null; $this->container['account_number'] = $data['account_number'] ?? null; $this->container['backup_withholding'] = $data['backup_withholding'] ?? null; $this->container['is1099able'] = $data['is1099able'] ?? null; @@ -1292,3049 +1214,2641 @@ public function valid() /** - * Gets employee_first_name + * Gets name * * @return string|null */ - public function getEmployeeFirstName() + public function getName() { - return $this->container['employee_first_name']; + return $this->container['name']; } /** - * Sets employee_first_name + * Sets name * - * @param string|null $employee_first_name The first name of the employee. + * @param string|null $name The name of the individual or entity associated with the form. * * @return self */ - public function setEmployeeFirstName($employee_first_name) + public function setName($name) { - $this->container['employee_first_name'] = $employee_first_name; + $this->container['name'] = $name; return $this; } /** - * Gets employee_middle_name + * Gets citizenship_country * * @return string|null */ - public function getEmployeeMiddleName() + public function getCitizenshipCountry() { - return $this->container['employee_middle_name']; + return $this->container['citizenship_country']; } /** - * Sets employee_middle_name + * Sets citizenship_country * - * @param string|null $employee_middle_name The middle name of the employee. + * @param string|null $citizenship_country The country of citizenship. * * @return self */ - public function setEmployeeMiddleName($employee_middle_name) + public function setCitizenshipCountry($citizenship_country) { - $this->container['employee_middle_name'] = $employee_middle_name; + $this->container['citizenship_country'] = $citizenship_country; return $this; } /** - * Gets employee_last_name + * Gets disregarded_entity * * @return string|null */ - public function getEmployeeLastName() + public function getDisregardedEntity() { - return $this->container['employee_last_name']; + return $this->container['disregarded_entity']; } /** - * Sets employee_last_name + * Sets disregarded_entity * - * @param string|null $employee_last_name The last name of the employee. + * @param string|null $disregarded_entity The name of the disregarded entity receiving the payment (if applicable). * * @return self */ - public function setEmployeeLastName($employee_last_name) + public function setDisregardedEntity($disregarded_entity) { - $this->container['employee_last_name'] = $employee_last_name; + $this->container['disregarded_entity'] = $disregarded_entity; return $this; } /** - * Gets employee_name_suffix + * Gets entity_type * * @return string|null */ - public function getEmployeeNameSuffix() + public function getEntityType() { - return $this->container['employee_name_suffix']; + return $this->container['entity_type']; } /** - * Sets employee_name_suffix + * Sets entity_type * - * @param string|null $employee_name_suffix The name suffix of the employee. + * @param string|null $entity_type The entity type. * * @return self */ - public function setEmployeeNameSuffix($employee_name_suffix) + public function setEntityType($entity_type) { - $this->container['employee_name_suffix'] = $employee_name_suffix; + $this->container['entity_type'] = $entity_type; return $this; } /** - * Gets tin_type + * Gets making_treaty_claim * - * @return string|null + * @return bool|null */ - public function getTinType() + public function getMakingTreatyClaim() { - return $this->container['tin_type']; + return $this->container['making_treaty_claim']; } /** - * Sets tin_type + * Sets making_treaty_claim * - * @param string|null $tin_type The type of TIN provided. + * @param bool|null $making_treaty_claim Indicates whether the entity is making a treaty claim. * * @return self */ - public function setTinType($tin_type) + public function setMakingTreatyClaim($making_treaty_claim) { - $this->container['tin_type'] = $tin_type; + $this->container['making_treaty_claim'] = $making_treaty_claim; return $this; } /** - * Gets tin + * Gets fatca_status * * @return string|null */ - public function getTin() + public function getFatcaStatus() { - return $this->container['tin']; + return $this->container['fatca_status']; } /** - * Sets tin + * Sets fatca_status * - * @param string|null $tin The taxpayer identification number (TIN). + * @param string|null $fatca_status The FATCA status. * * @return self */ - public function setTin($tin) + public function setFatcaStatus($fatca_status) { - $this->container['tin'] = $tin; + $this->container['fatca_status'] = $fatca_status; return $this; } /** - * Gets address + * Gets residence_address * * @return string|null */ - public function getAddress() + public function getResidenceAddress() { - return $this->container['address']; + return $this->container['residence_address']; } /** - * Sets address + * Sets residence_address * - * @param string|null $address The address of the individual or entity. + * @param string|null $residence_address The residential address of the individual or entity. * * @return self */ - public function setAddress($address) + public function setResidenceAddress($residence_address) { - $this->container['address'] = $address; + $this->container['residence_address'] = $residence_address; return $this; } /** - * Gets city + * Gets residence_city * * @return string|null */ - public function getCity() + public function getResidenceCity() { - return $this->container['city']; + return $this->container['residence_city']; } /** - * Sets city + * Sets residence_city * - * @param string|null $city The city of the address. + * @param string|null $residence_city The city of residence. * * @return self */ - public function setCity($city) + public function setResidenceCity($residence_city) { - $this->container['city'] = $city; + $this->container['residence_city'] = $residence_city; return $this; } /** - * Gets state + * Gets residence_state * * @return string|null */ - public function getState() + public function getResidenceState() { - return $this->container['state']; + return $this->container['residence_state']; } /** - * Sets state + * Sets residence_state * - * @param string|null $state The state of the address. + * @param string|null $residence_state The state of residence. * * @return self */ - public function setState($state) + public function setResidenceState($residence_state) { - $this->container['state'] = $state; + $this->container['residence_state'] = $residence_state; return $this; } /** - * Gets zip + * Gets residence_zip * * @return string|null */ - public function getZip() + public function getResidenceZip() { - return $this->container['zip']; + return $this->container['residence_zip']; } /** - * Sets zip + * Sets residence_zip * - * @param string|null $zip The ZIP code of the address. + * @param string|null $residence_zip The ZIP code of the residence. * * @return self */ - public function setZip($zip) + public function setResidenceZip($residence_zip) { - $this->container['zip'] = $zip; + $this->container['residence_zip'] = $residence_zip; return $this; } /** - * Gets marital_status + * Gets residence_country * * @return string|null */ - public function getMaritalStatus() + public function getResidenceCountry() { - return $this->container['marital_status']; + return $this->container['residence_country']; } /** - * Sets marital_status + * Sets residence_country * - * @param string|null $marital_status The marital status of the employee. + * @param string|null $residence_country The country of residence. * * @return self */ - public function setMaritalStatus($marital_status) + public function setResidenceCountry($residence_country) { - $this->container['marital_status'] = $marital_status; + $this->container['residence_country'] = $residence_country; return $this; } /** - * Gets last_name_differs + * Gets residence_is_mailing * * @return bool|null */ - public function getLastNameDiffers() + public function getResidenceIsMailing() { - return $this->container['last_name_differs']; + return $this->container['residence_is_mailing']; } /** - * Sets last_name_differs + * Sets residence_is_mailing * - * @param bool|null $last_name_differs Indicates whether the last name differs from prior records. + * @param bool|null $residence_is_mailing Indicates whether the residence address is also the mailing address. * * @return self */ - public function setLastNameDiffers($last_name_differs) + public function setResidenceIsMailing($residence_is_mailing) { - $this->container['last_name_differs'] = $last_name_differs; + $this->container['residence_is_mailing'] = $residence_is_mailing; return $this; } /** - * Gets num_allowances + * Gets mailing_address * - * @return int|null + * @return string|null */ - public function getNumAllowances() + public function getMailingAddress() { - return $this->container['num_allowances']; + return $this->container['mailing_address']; } /** - * Sets num_allowances + * Sets mailing_address * - * @param int|null $num_allowances The number of allowances claimed by the employee. + * @param string|null $mailing_address The mailing address. * * @return self */ - public function setNumAllowances($num_allowances) + public function setMailingAddress($mailing_address) { - $this->container['num_allowances'] = $num_allowances; + $this->container['mailing_address'] = $mailing_address; return $this; } /** - * Gets other_dependents + * Gets mailing_city * - * @return int|null + * @return string|null */ - public function getOtherDependents() + public function getMailingCity() { - return $this->container['other_dependents']; + return $this->container['mailing_city']; } /** - * Sets other_dependents + * Sets mailing_city * - * @param int|null $other_dependents The number of dependents other than allowances. + * @param string|null $mailing_city The city of the mailing address. * * @return self */ - public function setOtherDependents($other_dependents) + public function setMailingCity($mailing_city) { - $this->container['other_dependents'] = $other_dependents; + $this->container['mailing_city'] = $mailing_city; return $this; } /** - * Gets non_job_income + * Gets mailing_state * - * @return float|null + * @return string|null */ - public function getNonJobIncome() + public function getMailingState() { - return $this->container['non_job_income']; + return $this->container['mailing_state']; } /** - * Sets non_job_income + * Sets mailing_state * - * @param float|null $non_job_income The amount of non-job income. + * @param string|null $mailing_state The state of the mailing address. * * @return self */ - public function setNonJobIncome($non_job_income) + public function setMailingState($mailing_state) { - $this->container['non_job_income'] = $non_job_income; + $this->container['mailing_state'] = $mailing_state; return $this; } /** - * Gets deductions + * Gets mailing_zip * - * @return float|null + * @return string|null */ - public function getDeductions() + public function getMailingZip() { - return $this->container['deductions']; + return $this->container['mailing_zip']; } /** - * Sets deductions + * Sets mailing_zip * - * @param float|null $deductions The amount of deductions claimed. + * @param string|null $mailing_zip The ZIP code of the mailing address. * * @return self */ - public function setDeductions($deductions) + public function setMailingZip($mailing_zip) { - $this->container['deductions'] = $deductions; + $this->container['mailing_zip'] = $mailing_zip; return $this; } /** - * Gets additional_withheld + * Gets mailing_country * - * @return float|null + * @return string|null */ - public function getAdditionalWithheld() + public function getMailingCountry() { - return $this->container['additional_withheld']; + return $this->container['mailing_country']; } /** - * Sets additional_withheld + * Sets mailing_country * - * @param float|null $additional_withheld The additional amount withheld. + * @param string|null $mailing_country The country of the mailing address. * * @return self */ - public function setAdditionalWithheld($additional_withheld) + public function setMailingCountry($mailing_country) { - $this->container['additional_withheld'] = $additional_withheld; + $this->container['mailing_country'] = $mailing_country; return $this; } /** - * Gets exempt_from_withholding + * Gets tin_type * - * @return bool|null + * @return string|null */ - public function getExemptFromWithholding() + public function getTinType() { - return $this->container['exempt_from_withholding']; + return $this->container['tin_type']; } /** - * Sets exempt_from_withholding + * Sets tin_type * - * @param bool|null $exempt_from_withholding Indicates whether the employee is exempt from withholding. + * @param string|null $tin_type The type of TIN provided. * * @return self */ - public function setExemptFromWithholding($exempt_from_withholding) + public function setTinType($tin_type) { - $this->container['exempt_from_withholding'] = $exempt_from_withholding; + $this->container['tin_type'] = $tin_type; return $this; } /** - * Gets office_code + * Gets tin * * @return string|null */ - public function getOfficeCode() + public function getTin() { - return $this->container['office_code']; + return $this->container['tin']; } /** - * Sets office_code + * Sets tin * - * @param string|null $office_code The office code associated with the form. + * @param string|null $tin The taxpayer identification number (TIN). * * @return self */ - public function setOfficeCode($office_code) + public function setTin($tin) { - $this->container['office_code'] = $office_code; + $this->container['tin'] = $tin; return $this; } /** - * Gets id + * Gets giin * * @return string|null */ - public function getId() + public function getGiin() { - return $this->container['id']; + return $this->container['giin']; } /** - * Sets id + * Sets giin * - * @param string|null $id The unique identifier for the form. + * @param string|null $giin The global intermediary identification number (GIIN). * * @return self */ - public function setId($id) + public function setGiin($giin) { - $this->container['id'] = $id; + $this->container['giin'] = $giin; return $this; } /** - * Gets type + * Gets foreign_tin_not_required * - * @return string|null + * @return bool|null */ - public function getType() + public function getForeignTinNotRequired() { - return $this->container['type']; + return $this->container['foreign_tin_not_required']; } /** - * Sets type + * Sets foreign_tin_not_required * - * @param string|null $type The form type. + * @param bool|null $foreign_tin_not_required Indicates whether a foreign TIN is not required. * * @return self */ - public function setType($type) + public function setForeignTinNotRequired($foreign_tin_not_required) { - $this->container['type'] = $type; + $this->container['foreign_tin_not_required'] = $foreign_tin_not_required; return $this; } /** - * Gets entry_status + * Gets foreign_tin * * @return string|null */ - public function getEntryStatus() + public function getForeignTin() { - return $this->container['entry_status']; + return $this->container['foreign_tin']; } /** - * Sets entry_status + * Sets foreign_tin * - * @param string|null $entry_status The form status. + * @param string|null $foreign_tin The foreign taxpayer identification number (TIN). * * @return self */ - public function setEntryStatus($entry_status) + public function setForeignTin($foreign_tin) { - $this->container['entry_status'] = $entry_status; + $this->container['foreign_tin'] = $foreign_tin; return $this; } /** - * Gets entry_status_date + * Gets reference_number * - * @return \DateTime|null + * @return string|null */ - public function getEntryStatusDate() + public function getReferenceNumber() { - return $this->container['entry_status_date']; + return $this->container['reference_number']; } /** - * Sets entry_status_date + * Sets reference_number * - * @param \DateTime|null $entry_status_date The timestamp for the latest status update. + * @param string|null $reference_number A reference number for the form. * * @return self */ - public function setEntryStatusDate($entry_status_date) + public function setReferenceNumber($reference_number) { - $this->container['entry_status_date'] = $entry_status_date; + $this->container['reference_number'] = $reference_number; return $this; } /** - * Gets reference_id + * Gets disregarded_entity_fatca_status * * @return string|null */ - public function getReferenceId() + public function getDisregardedEntityFatcaStatus() { - return $this->container['reference_id']; + return $this->container['disregarded_entity_fatca_status']; } /** - * Sets reference_id + * Sets disregarded_entity_fatca_status * - * @param string|null $reference_id A reference identifier for the form. + * @param string|null $disregarded_entity_fatca_status The FATCA status of disregarded entity or branch receiving payment. * * @return self */ - public function setReferenceId($reference_id) + public function setDisregardedEntityFatcaStatus($disregarded_entity_fatca_status) { - $this->container['reference_id'] = $reference_id; + $this->container['disregarded_entity_fatca_status'] = $disregarded_entity_fatca_status; return $this; } /** - * Gets company_id + * Gets disregarded_address * * @return string|null */ - public function getCompanyId() + public function getDisregardedAddress() { - return $this->container['company_id']; + return $this->container['disregarded_address']; } /** - * Sets company_id + * Sets disregarded_address * - * @param string|null $company_id The ID of the associated company. + * @param string|null $disregarded_address The address for disregarded entities. * * @return self */ - public function setCompanyId($company_id) + public function setDisregardedAddress($disregarded_address) { - $this->container['company_id'] = $company_id; + $this->container['disregarded_address'] = $disregarded_address; return $this; } /** - * Gets display_name + * Gets disregarded_city * * @return string|null */ - public function getDisplayName() + public function getDisregardedCity() { - return $this->container['display_name']; + return $this->container['disregarded_city']; } /** - * Sets display_name + * Sets disregarded_city * - * @param string|null $display_name The display name associated with the form. + * @param string|null $disregarded_city The city for disregarded entities. * * @return self */ - public function setDisplayName($display_name) + public function setDisregardedCity($disregarded_city) { - $this->container['display_name'] = $display_name; + $this->container['disregarded_city'] = $disregarded_city; return $this; } /** - * Gets email + * Gets disregarded_state * * @return string|null */ - public function getEmail() + public function getDisregardedState() { - return $this->container['email']; + return $this->container['disregarded_state']; } /** - * Sets email + * Sets disregarded_state * - * @param string|null $email The email address of the individual associated with the form. - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets archived - * - * @return bool|null - */ - public function getArchived() - { - return $this->container['archived']; - } - - /** - * Sets archived - * - * @param bool|null $archived Indicates whether the form is archived. - * - * @return self - */ - public function setArchived($archived) - { - $this->container['archived'] = $archived; - - return $this; - } - - /** - * Gets signature - * - * @return string|null - */ - public function getSignature() - { - return $this->container['signature']; - } - - /** - * Sets signature - * - * @param string|null $signature The signature of the form. - * - * @return self - */ - public function setSignature($signature) - { - $this->container['signature'] = $signature; - - return $this; - } - - /** - * Gets signed_date - * - * @return \DateTime|null - */ - public function getSignedDate() - { - return $this->container['signed_date']; - } - - /** - * Sets signed_date - * - * @param \DateTime|null $signed_date The date the form was signed. - * - * @return self - */ - public function setSignedDate($signed_date) - { - $this->container['signed_date'] = $signed_date; - - return $this; - } - - /** - * Gets e_delivery_consented_at - * - * @return \DateTime|null - */ - public function getEDeliveryConsentedAt() - { - return $this->container['e_delivery_consented_at']; - } - - /** - * Sets e_delivery_consented_at - * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. - * - * @return self - */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) - { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at The creation date of the form. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at The last updated date of the form. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name The name of the individual or entity associated with the form. - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets citizenship_country - * - * @return string|null - */ - public function getCitizenshipCountry() - { - return $this->container['citizenship_country']; - } - - /** - * Sets citizenship_country - * - * @param string|null $citizenship_country The country of citizenship. - * - * @return self - */ - public function setCitizenshipCountry($citizenship_country) - { - $this->container['citizenship_country'] = $citizenship_country; - - return $this; - } - - /** - * Gets disregarded_entity - * - * @return string|null - */ - public function getDisregardedEntity() - { - return $this->container['disregarded_entity']; - } - - /** - * Sets disregarded_entity - * - * @param string|null $disregarded_entity The name of the disregarded entity receiving the payment (if applicable). - * - * @return self - */ - public function setDisregardedEntity($disregarded_entity) - { - $this->container['disregarded_entity'] = $disregarded_entity; - - return $this; - } - - /** - * Gets entity_type - * - * @return string|null - */ - public function getEntityType() - { - return $this->container['entity_type']; - } - - /** - * Sets entity_type - * - * @param string|null $entity_type The entity type. - * - * @return self - */ - public function setEntityType($entity_type) - { - $this->container['entity_type'] = $entity_type; - - return $this; - } - - /** - * Gets making_treaty_claim - * - * @return bool|null - */ - public function getMakingTreatyClaim() - { - return $this->container['making_treaty_claim']; - } - - /** - * Sets making_treaty_claim - * - * @param bool|null $making_treaty_claim Indicates whether the entity is making a treaty claim. - * - * @return self - */ - public function setMakingTreatyClaim($making_treaty_claim) - { - $this->container['making_treaty_claim'] = $making_treaty_claim; - - return $this; - } - - /** - * Gets fatca_status - * - * @return string|null - */ - public function getFatcaStatus() - { - return $this->container['fatca_status']; - } - - /** - * Sets fatca_status - * - * @param string|null $fatca_status The FATCA status. - * - * @return self - */ - public function setFatcaStatus($fatca_status) - { - $this->container['fatca_status'] = $fatca_status; - - return $this; - } - - /** - * Gets residence_address - * - * @return string|null - */ - public function getResidenceAddress() - { - return $this->container['residence_address']; - } - - /** - * Sets residence_address - * - * @param string|null $residence_address The residential address of the individual or entity. - * - * @return self - */ - public function setResidenceAddress($residence_address) - { - $this->container['residence_address'] = $residence_address; - - return $this; - } - - /** - * Gets residence_city - * - * @return string|null - */ - public function getResidenceCity() - { - return $this->container['residence_city']; - } - - /** - * Sets residence_city - * - * @param string|null $residence_city The city of residence. + * @param string|null $disregarded_state The state for disregarded entities. * * @return self */ - public function setResidenceCity($residence_city) + public function setDisregardedState($disregarded_state) { - $this->container['residence_city'] = $residence_city; + $this->container['disregarded_state'] = $disregarded_state; return $this; } /** - * Gets residence_state + * Gets disregarded_zip * * @return string|null */ - public function getResidenceState() + public function getDisregardedZip() { - return $this->container['residence_state']; + return $this->container['disregarded_zip']; } /** - * Sets residence_state + * Sets disregarded_zip * - * @param string|null $residence_state The state of residence. + * @param string|null $disregarded_zip The ZIP code for disregarded entities. * * @return self */ - public function setResidenceState($residence_state) + public function setDisregardedZip($disregarded_zip) { - $this->container['residence_state'] = $residence_state; + $this->container['disregarded_zip'] = $disregarded_zip; return $this; } /** - * Gets residence_zip + * Gets disregarded_country * * @return string|null */ - public function getResidenceZip() + public function getDisregardedCountry() { - return $this->container['residence_zip']; + return $this->container['disregarded_country']; } /** - * Sets residence_zip + * Sets disregarded_country * - * @param string|null $residence_zip The ZIP code of the residence. + * @param string|null $disregarded_country The country for disregarded entities. * * @return self */ - public function setResidenceZip($residence_zip) + public function setDisregardedCountry($disregarded_country) { - $this->container['residence_zip'] = $residence_zip; + $this->container['disregarded_country'] = $disregarded_country; return $this; } /** - * Gets residence_country + * Gets disregarded_entity_giin * * @return string|null */ - public function getResidenceCountry() + public function getDisregardedEntityGiin() { - return $this->container['residence_country']; + return $this->container['disregarded_entity_giin']; } /** - * Sets residence_country + * Sets disregarded_entity_giin * - * @param string|null $residence_country The country of residence. + * @param string|null $disregarded_entity_giin The GIIN for disregarded entities. * * @return self */ - public function setResidenceCountry($residence_country) + public function setDisregardedEntityGiin($disregarded_entity_giin) { - $this->container['residence_country'] = $residence_country; + $this->container['disregarded_entity_giin'] = $disregarded_entity_giin; return $this; } /** - * Gets residence_is_mailing + * Gets treaty_country_certification * * @return bool|null */ - public function getResidenceIsMailing() - { - return $this->container['residence_is_mailing']; - } - - /** - * Sets residence_is_mailing - * - * @param bool|null $residence_is_mailing Indicates whether the residence address is also the mailing address. - * - * @return self - */ - public function setResidenceIsMailing($residence_is_mailing) - { - $this->container['residence_is_mailing'] = $residence_is_mailing; - - return $this; - } - - /** - * Gets mailing_address - * - * @return string|null - */ - public function getMailingAddress() - { - return $this->container['mailing_address']; - } - - /** - * Sets mailing_address - * - * @param string|null $mailing_address The mailing address. - * - * @return self - */ - public function setMailingAddress($mailing_address) - { - $this->container['mailing_address'] = $mailing_address; - - return $this; - } - - /** - * Gets mailing_city - * - * @return string|null - */ - public function getMailingCity() - { - return $this->container['mailing_city']; - } - - /** - * Sets mailing_city - * - * @param string|null $mailing_city The city of the mailing address. - * - * @return self - */ - public function setMailingCity($mailing_city) - { - $this->container['mailing_city'] = $mailing_city; - - return $this; - } - - /** - * Gets mailing_state - * - * @return string|null - */ - public function getMailingState() + public function getTreatyCountryCertification() { - return $this->container['mailing_state']; + return $this->container['treaty_country_certification']; } /** - * Sets mailing_state + * Sets treaty_country_certification * - * @param string|null $mailing_state The state of the mailing address. + * @param bool|null $treaty_country_certification Certifies the beneficial owner's country under the U.S. tax treaty. * * @return self */ - public function setMailingState($mailing_state) + public function setTreatyCountryCertification($treaty_country_certification) { - $this->container['mailing_state'] = $mailing_state; + $this->container['treaty_country_certification'] = $treaty_country_certification; return $this; } /** - * Gets mailing_zip + * Gets treaty_country * * @return string|null */ - public function getMailingZip() + public function getTreatyCountry() { - return $this->container['mailing_zip']; + return $this->container['treaty_country']; } /** - * Sets mailing_zip + * Sets treaty_country * - * @param string|null $mailing_zip The ZIP code of the mailing address. + * @param string|null $treaty_country The country for which the treaty applies. * * @return self */ - public function setMailingZip($mailing_zip) + public function setTreatyCountry($treaty_country) { - $this->container['mailing_zip'] = $mailing_zip; + $this->container['treaty_country'] = $treaty_country; return $this; } /** - * Gets mailing_country + * Gets benefit_limitation_certification * - * @return string|null + * @return bool|null */ - public function getMailingCountry() + public function getBenefitLimitationCertification() { - return $this->container['mailing_country']; + return $this->container['benefit_limitation_certification']; } /** - * Sets mailing_country + * Sets benefit_limitation_certification * - * @param string|null $mailing_country The country of the mailing address. + * @param bool|null $benefit_limitation_certification Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements. * * @return self */ - public function setMailingCountry($mailing_country) + public function setBenefitLimitationCertification($benefit_limitation_certification) { - $this->container['mailing_country'] = $mailing_country; + $this->container['benefit_limitation_certification'] = $benefit_limitation_certification; return $this; } /** - * Gets giin + * Gets benefit_limitation * * @return string|null */ - public function getGiin() + public function getBenefitLimitation() { - return $this->container['giin']; + return $this->container['benefit_limitation']; } /** - * Sets giin + * Sets benefit_limitation * - * @param string|null $giin The global intermediary identification number (GIIN). + * @param string|null $benefit_limitation The benefit limitation for tax treaty claims. * * @return self */ - public function setGiin($giin) + public function setBenefitLimitation($benefit_limitation) { - $this->container['giin'] = $giin; + $this->container['benefit_limitation'] = $benefit_limitation; return $this; } /** - * Gets foreign_tin_not_required + * Gets qualified_resident_status_certification * * @return bool|null */ - public function getForeignTinNotRequired() + public function getQualifiedResidentStatusCertification() { - return $this->container['foreign_tin_not_required']; + return $this->container['qualified_resident_status_certification']; } /** - * Sets foreign_tin_not_required + * Sets qualified_resident_status_certification * - * @param bool|null $foreign_tin_not_required Indicates whether a foreign TIN is not required. + * @param bool|null $qualified_resident_status_certification Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income. * * @return self */ - public function setForeignTinNotRequired($foreign_tin_not_required) + public function setQualifiedResidentStatusCertification($qualified_resident_status_certification) { - $this->container['foreign_tin_not_required'] = $foreign_tin_not_required; + $this->container['qualified_resident_status_certification'] = $qualified_resident_status_certification; return $this; } /** - * Gets foreign_tin + * Gets treaty_article * * @return string|null */ - public function getForeignTin() + public function getTreatyArticle() { - return $this->container['foreign_tin']; + return $this->container['treaty_article']; } /** - * Sets foreign_tin + * Sets treaty_article * - * @param string|null $foreign_tin The foreign taxpayer identification number (TIN). + * @param string|null $treaty_article The specific article of the treaty being claimed. * * @return self */ - public function setForeignTin($foreign_tin) + public function setTreatyArticle($treaty_article) { - $this->container['foreign_tin'] = $foreign_tin; + $this->container['treaty_article'] = $treaty_article; return $this; } /** - * Gets reference_number + * Gets withholding_rate * * @return string|null */ - public function getReferenceNumber() + public function getWithholdingRate() { - return $this->container['reference_number']; + return $this->container['withholding_rate']; } /** - * Sets reference_number + * Sets withholding_rate * - * @param string|null $reference_number A reference number for the form. + * @param string|null $withholding_rate The withholding rate applied as per the treaty. * * @return self */ - public function setReferenceNumber($reference_number) + public function setWithholdingRate($withholding_rate) { - $this->container['reference_number'] = $reference_number; + $this->container['withholding_rate'] = $withholding_rate; return $this; } /** - * Gets disregarded_entity_fatca_status + * Gets income_type * * @return string|null */ - public function getDisregardedEntityFatcaStatus() + public function getIncomeType() { - return $this->container['disregarded_entity_fatca_status']; + return $this->container['income_type']; } /** - * Sets disregarded_entity_fatca_status + * Sets income_type * - * @param string|null $disregarded_entity_fatca_status The FATCA status of disregarded entity or branch receiving payment. + * @param string|null $income_type The type of income covered by the treaty. * * @return self */ - public function setDisregardedEntityFatcaStatus($disregarded_entity_fatca_status) + public function setIncomeType($income_type) { - $this->container['disregarded_entity_fatca_status'] = $disregarded_entity_fatca_status; + $this->container['income_type'] = $income_type; return $this; } /** - * Gets disregarded_address + * Gets treaty_reasons * * @return string|null */ - public function getDisregardedAddress() + public function getTreatyReasons() { - return $this->container['disregarded_address']; + return $this->container['treaty_reasons']; } /** - * Sets disregarded_address + * Sets treaty_reasons * - * @param string|null $disregarded_address The address for disregarded entities. + * @param string|null $treaty_reasons The reasons for claiming treaty benefits. * * @return self */ - public function setDisregardedAddress($disregarded_address) + public function setTreatyReasons($treaty_reasons) { - $this->container['disregarded_address'] = $disregarded_address; + $this->container['treaty_reasons'] = $treaty_reasons; return $this; } /** - * Gets disregarded_city + * Gets ffi_sponsoring_entity * * @return string|null */ - public function getDisregardedCity() + public function getFfiSponsoringEntity() { - return $this->container['disregarded_city']; + return $this->container['ffi_sponsoring_entity']; } /** - * Sets disregarded_city + * Sets ffi_sponsoring_entity * - * @param string|null $disregarded_city The city for disregarded entities. + * @param string|null $ffi_sponsoring_entity The name of the entity that sponsors the foreign financial institution (FFI). * * @return self */ - public function setDisregardedCity($disregarded_city) + public function setFfiSponsoringEntity($ffi_sponsoring_entity) { - $this->container['disregarded_city'] = $disregarded_city; + $this->container['ffi_sponsoring_entity'] = $ffi_sponsoring_entity; return $this; } /** - * Gets disregarded_state + * Gets investment_entity_certification * - * @return string|null + * @return bool|null */ - public function getDisregardedState() + public function getInvestmentEntityCertification() { - return $this->container['disregarded_state']; + return $this->container['investment_entity_certification']; } /** - * Sets disregarded_state + * Sets investment_entity_certification * - * @param string|null $disregarded_state The state for disregarded entities. + * @param bool|null $investment_entity_certification Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity. * * @return self */ - public function setDisregardedState($disregarded_state) + public function setInvestmentEntityCertification($investment_entity_certification) { - $this->container['disregarded_state'] = $disregarded_state; + $this->container['investment_entity_certification'] = $investment_entity_certification; return $this; } /** - * Gets disregarded_zip + * Gets controlled_foreign_corporation_certification * - * @return string|null + * @return bool|null */ - public function getDisregardedZip() + public function getControlledForeignCorporationCertification() { - return $this->container['disregarded_zip']; + return $this->container['controlled_foreign_corporation_certification']; } /** - * Sets disregarded_zip + * Sets controlled_foreign_corporation_certification * - * @param string|null $disregarded_zip The ZIP code for disregarded entities. + * @param bool|null $controlled_foreign_corporation_certification Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency. * * @return self */ - public function setDisregardedZip($disregarded_zip) + public function setControlledForeignCorporationCertification($controlled_foreign_corporation_certification) { - $this->container['disregarded_zip'] = $disregarded_zip; + $this->container['controlled_foreign_corporation_certification'] = $controlled_foreign_corporation_certification; return $this; } /** - * Gets disregarded_country + * Gets compliant_nonregistering_local_bank_certification * - * @return string|null + * @return bool|null */ - public function getDisregardedCountry() + public function getCompliantNonregisteringLocalBankCertification() { - return $this->container['disregarded_country']; + return $this->container['compliant_nonregistering_local_bank_certification']; } /** - * Sets disregarded_country + * Sets compliant_nonregistering_local_bank_certification * - * @param string|null $disregarded_country The country for disregarded entities. + * @param bool|null $compliant_nonregistering_local_bank_certification Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization. * * @return self */ - public function setDisregardedCountry($disregarded_country) + public function setCompliantNonregisteringLocalBankCertification($compliant_nonregistering_local_bank_certification) { - $this->container['disregarded_country'] = $disregarded_country; + $this->container['compliant_nonregistering_local_bank_certification'] = $compliant_nonregistering_local_bank_certification; return $this; } /** - * Gets disregarded_entity_giin + * Gets compliant_ffi_low_value_accounts_certification * - * @return string|null + * @return bool|null */ - public function getDisregardedEntityGiin() + public function getCompliantFfiLowValueAccountsCertification() { - return $this->container['disregarded_entity_giin']; + return $this->container['compliant_ffi_low_value_accounts_certification']; } /** - * Sets disregarded_entity_giin + * Sets compliant_ffi_low_value_accounts_certification * - * @param string|null $disregarded_entity_giin The GIIN for disregarded entities. + * @param bool|null $compliant_ffi_low_value_accounts_certification Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group. * * @return self */ - public function setDisregardedEntityGiin($disregarded_entity_giin) + public function setCompliantFfiLowValueAccountsCertification($compliant_ffi_low_value_accounts_certification) { - $this->container['disregarded_entity_giin'] = $disregarded_entity_giin; + $this->container['compliant_ffi_low_value_accounts_certification'] = $compliant_ffi_low_value_accounts_certification; return $this; } /** - * Gets treaty_country_certification + * Gets sponsored_closely_held_entity_sponsoring_entity * - * @return bool|null + * @return string|null */ - public function getTreatyCountryCertification() + public function getSponsoredCloselyHeldEntitySponsoringEntity() { - return $this->container['treaty_country_certification']; + return $this->container['sponsored_closely_held_entity_sponsoring_entity']; } /** - * Sets treaty_country_certification + * Sets sponsored_closely_held_entity_sponsoring_entity * - * @param bool|null $treaty_country_certification Certifies the beneficial owner's country under the U.S. tax treaty. + * @param string|null $sponsored_closely_held_entity_sponsoring_entity The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle. * * @return self */ - public function setTreatyCountryCertification($treaty_country_certification) + public function setSponsoredCloselyHeldEntitySponsoringEntity($sponsored_closely_held_entity_sponsoring_entity) { - $this->container['treaty_country_certification'] = $treaty_country_certification; + $this->container['sponsored_closely_held_entity_sponsoring_entity'] = $sponsored_closely_held_entity_sponsoring_entity; return $this; } /** - * Gets treaty_country + * Gets sponsored_closely_held_investment_vehicle_certification * - * @return string|null + * @return bool|null */ - public function getTreatyCountry() + public function getSponsoredCloselyHeldInvestmentVehicleCertification() { - return $this->container['treaty_country']; + return $this->container['sponsored_closely_held_investment_vehicle_certification']; } /** - * Sets treaty_country + * Sets sponsored_closely_held_investment_vehicle_certification * - * @param string|null $treaty_country The country for which the treaty applies. + * @param bool|null $sponsored_closely_held_investment_vehicle_certification Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity. * * @return self */ - public function setTreatyCountry($treaty_country) + public function setSponsoredCloselyHeldInvestmentVehicleCertification($sponsored_closely_held_investment_vehicle_certification) { - $this->container['treaty_country'] = $treaty_country; + $this->container['sponsored_closely_held_investment_vehicle_certification'] = $sponsored_closely_held_investment_vehicle_certification; return $this; } /** - * Gets benefit_limitation_certification + * Gets compliant_limited_life_debt_entity_certification * * @return bool|null */ - public function getBenefitLimitationCertification() + public function getCompliantLimitedLifeDebtEntityCertification() { - return $this->container['benefit_limitation_certification']; + return $this->container['compliant_limited_life_debt_entity_certification']; } /** - * Sets benefit_limitation_certification + * Sets compliant_limited_life_debt_entity_certification * - * @param bool|null $benefit_limitation_certification Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements. + * @param bool|null $compliant_limited_life_debt_entity_certification Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements. * * @return self */ - public function setBenefitLimitationCertification($benefit_limitation_certification) + public function setCompliantLimitedLifeDebtEntityCertification($compliant_limited_life_debt_entity_certification) { - $this->container['benefit_limitation_certification'] = $benefit_limitation_certification; + $this->container['compliant_limited_life_debt_entity_certification'] = $compliant_limited_life_debt_entity_certification; return $this; } /** - * Gets benefit_limitation + * Gets investment_entity_no_financial_accounts_certification * - * @return string|null + * @return bool|null */ - public function getBenefitLimitation() + public function getInvestmentEntityNoFinancialAccountsCertification() { - return $this->container['benefit_limitation']; + return $this->container['investment_entity_no_financial_accounts_certification']; } /** - * Sets benefit_limitation + * Sets investment_entity_no_financial_accounts_certification * - * @param string|null $benefit_limitation The benefit limitation for tax treaty claims. + * @param bool|null $investment_entity_no_financial_accounts_certification Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts. * * @return self */ - public function setBenefitLimitation($benefit_limitation) + public function setInvestmentEntityNoFinancialAccountsCertification($investment_entity_no_financial_accounts_certification) { - $this->container['benefit_limitation'] = $benefit_limitation; + $this->container['investment_entity_no_financial_accounts_certification'] = $investment_entity_no_financial_accounts_certification; return $this; } /** - * Gets qualified_resident_status_certification + * Gets owner_documented_ffi_certification * * @return bool|null */ - public function getQualifiedResidentStatusCertification() + public function getOwnerDocumentedFfiCertification() { - return $this->container['qualified_resident_status_certification']; + return $this->container['owner_documented_ffi_certification']; } /** - * Sets qualified_resident_status_certification + * Sets owner_documented_ffi_certification * - * @param bool|null $qualified_resident_status_certification Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income. + * @param bool|null $owner_documented_ffi_certification Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships. * * @return self */ - public function setQualifiedResidentStatusCertification($qualified_resident_status_certification) + public function setOwnerDocumentedFfiCertification($owner_documented_ffi_certification) { - $this->container['qualified_resident_status_certification'] = $qualified_resident_status_certification; + $this->container['owner_documented_ffi_certification'] = $owner_documented_ffi_certification; return $this; } /** - * Gets treaty_article + * Gets owner_documented_ffi_reporting_statement_certification * - * @return string|null + * @return bool|null */ - public function getTreatyArticle() + public function getOwnerDocumentedFfiReportingStatementCertification() { - return $this->container['treaty_article']; + return $this->container['owner_documented_ffi_reporting_statement_certification']; } /** - * Sets treaty_article + * Sets owner_documented_ffi_reporting_statement_certification * - * @param string|null $treaty_article The specific article of the treaty being claimed. + * @param bool|null $owner_documented_ffi_reporting_statement_certification Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder. * * @return self */ - public function setTreatyArticle($treaty_article) + public function setOwnerDocumentedFfiReportingStatementCertification($owner_documented_ffi_reporting_statement_certification) { - $this->container['treaty_article'] = $treaty_article; + $this->container['owner_documented_ffi_reporting_statement_certification'] = $owner_documented_ffi_reporting_statement_certification; return $this; } /** - * Gets withholding_rate + * Gets owner_documented_ffi_auditor_letter_certification * - * @return string|null + * @return bool|null */ - public function getWithholdingRate() + public function getOwnerDocumentedFfiAuditorLetterCertification() { - return $this->container['withholding_rate']; + return $this->container['owner_documented_ffi_auditor_letter_certification']; } /** - * Sets withholding_rate + * Sets owner_documented_ffi_auditor_letter_certification * - * @param string|null $withholding_rate The withholding rate applied as per the treaty. + * @param bool|null $owner_documented_ffi_auditor_letter_certification Certifies that the FFI has provided or will provide an auditor’s letter and required owner documentation, including a reporting statement and Form W-9s, to meet owner-documented FFI requirements under the regulations. * * @return self */ - public function setWithholdingRate($withholding_rate) + public function setOwnerDocumentedFfiAuditorLetterCertification($owner_documented_ffi_auditor_letter_certification) { - $this->container['withholding_rate'] = $withholding_rate; + $this->container['owner_documented_ffi_auditor_letter_certification'] = $owner_documented_ffi_auditor_letter_certification; return $this; } /** - * Gets income_type + * Gets owner_documented_ffi_trust_beneficiaries_certification * - * @return string|null + * @return bool|null */ - public function getIncomeType() + public function getOwnerDocumentedFfiTrustBeneficiariesCertification() { - return $this->container['income_type']; + return $this->container['owner_documented_ffi_trust_beneficiaries_certification']; } /** - * Sets income_type + * Sets owner_documented_ffi_trust_beneficiaries_certification * - * @param string|null $income_type The type of income covered by the treaty. + * @param bool|null $owner_documented_ffi_trust_beneficiaries_certification Certifies that the trust has no contingent or unidentified beneficiaries or designated classes of beneficiaries. * * @return self */ - public function setIncomeType($income_type) + public function setOwnerDocumentedFfiTrustBeneficiariesCertification($owner_documented_ffi_trust_beneficiaries_certification) { - $this->container['income_type'] = $income_type; + $this->container['owner_documented_ffi_trust_beneficiaries_certification'] = $owner_documented_ffi_trust_beneficiaries_certification; return $this; } /** - * Gets treaty_reasons + * Gets restricted_distributor_certification * - * @return string|null + * @return bool|null */ - public function getTreatyReasons() + public function getRestrictedDistributorCertification() { - return $this->container['treaty_reasons']; + return $this->container['restricted_distributor_certification']; } /** - * Sets treaty_reasons + * Sets restricted_distributor_certification * - * @param string|null $treaty_reasons The reasons for claiming treaty benefits. + * @param bool|null $restricted_distributor_certification Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations. * * @return self */ - public function setTreatyReasons($treaty_reasons) + public function setRestrictedDistributorCertification($restricted_distributor_certification) { - $this->container['treaty_reasons'] = $treaty_reasons; + $this->container['restricted_distributor_certification'] = $restricted_distributor_certification; return $this; } /** - * Gets ffi_sponsoring_entity + * Gets restricted_distributor_agreement_certification * - * @return string|null + * @return bool|null */ - public function getFfiSponsoringEntity() + public function getRestrictedDistributorAgreementCertification() { - return $this->container['ffi_sponsoring_entity']; + return $this->container['restricted_distributor_agreement_certification']; } /** - * Sets ffi_sponsoring_entity + * Sets restricted_distributor_agreement_certification * - * @param string|null $ffi_sponsoring_entity The name of the entity that sponsors the foreign financial institution (FFI). + * @param bool|null $restricted_distributor_agreement_certification Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities. * * @return self */ - public function setFfiSponsoringEntity($ffi_sponsoring_entity) + public function setRestrictedDistributorAgreementCertification($restricted_distributor_agreement_certification) { - $this->container['ffi_sponsoring_entity'] = $ffi_sponsoring_entity; + $this->container['restricted_distributor_agreement_certification'] = $restricted_distributor_agreement_certification; return $this; } /** - * Gets investment_entity_certification + * Gets restricted_distributor_preexisting_sales_compliance_certification * * @return bool|null */ - public function getInvestmentEntityCertification() + public function getRestrictedDistributorPreexistingSalesComplianceCertification() { - return $this->container['investment_entity_certification']; + return $this->container['restricted_distributor_preexisting_sales_compliance_certification']; } /** - * Sets investment_entity_certification + * Sets restricted_distributor_preexisting_sales_compliance_certification * - * @param bool|null $investment_entity_certification Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity. + * @param bool|null $restricted_distributor_preexisting_sales_compliance_certification Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations. * * @return self */ - public function setInvestmentEntityCertification($investment_entity_certification) + public function setRestrictedDistributorPreexistingSalesComplianceCertification($restricted_distributor_preexisting_sales_compliance_certification) { - $this->container['investment_entity_certification'] = $investment_entity_certification; + $this->container['restricted_distributor_preexisting_sales_compliance_certification'] = $restricted_distributor_preexisting_sales_compliance_certification; return $this; } /** - * Gets controlled_foreign_corporation_certification + * Gets nonreporting_iga_ffi_certification * * @return bool|null */ - public function getControlledForeignCorporationCertification() + public function getNonreportingIgaFfiCertification() { - return $this->container['controlled_foreign_corporation_certification']; + return $this->container['nonreporting_iga_ffi_certification']; } /** - * Sets controlled_foreign_corporation_certification + * Sets nonreporting_iga_ffi_certification * - * @param bool|null $controlled_foreign_corporation_certification Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency. + * @param bool|null $nonreporting_iga_ffi_certification Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. * * @return self */ - public function setControlledForeignCorporationCertification($controlled_foreign_corporation_certification) + public function setNonreportingIgaFfiCertification($nonreporting_iga_ffi_certification) { - $this->container['controlled_foreign_corporation_certification'] = $controlled_foreign_corporation_certification; + $this->container['nonreporting_iga_ffi_certification'] = $nonreporting_iga_ffi_certification; return $this; } /** - * Gets compliant_nonregistering_local_bank_certification + * Gets iga_country * - * @return bool|null + * @return string|null */ - public function getCompliantNonregisteringLocalBankCertification() + public function getIgaCountry() { - return $this->container['compliant_nonregistering_local_bank_certification']; + return $this->container['iga_country']; } /** - * Sets compliant_nonregistering_local_bank_certification + * Sets iga_country * - * @param bool|null $compliant_nonregistering_local_bank_certification Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization. + * @param string|null $iga_country The country for the applicable IGA with the United States. * * @return self */ - public function setCompliantNonregisteringLocalBankCertification($compliant_nonregistering_local_bank_certification) + public function setIgaCountry($iga_country) { - $this->container['compliant_nonregistering_local_bank_certification'] = $compliant_nonregistering_local_bank_certification; + $this->container['iga_country'] = $iga_country; return $this; } /** - * Gets compliant_ffi_low_value_accounts_certification + * Gets iga_model * - * @return bool|null + * @return string|null */ - public function getCompliantFfiLowValueAccountsCertification() + public function getIgaModel() { - return $this->container['compliant_ffi_low_value_accounts_certification']; + return $this->container['iga_model']; } /** - * Sets compliant_ffi_low_value_accounts_certification + * Sets iga_model * - * @param bool|null $compliant_ffi_low_value_accounts_certification Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group. + * @param string|null $iga_model The applicable IGA model. * * @return self */ - public function setCompliantFfiLowValueAccountsCertification($compliant_ffi_low_value_accounts_certification) + public function setIgaModel($iga_model) { - $this->container['compliant_ffi_low_value_accounts_certification'] = $compliant_ffi_low_value_accounts_certification; + $this->container['iga_model'] = $iga_model; return $this; } /** - * Gets sponsored_closely_held_entity_sponsoring_entity + * Gets iga_legal_status_treatment * * @return string|null */ - public function getSponsoredCloselyHeldEntitySponsoringEntity() + public function getIgaLegalStatusTreatment() { - return $this->container['sponsored_closely_held_entity_sponsoring_entity']; + return $this->container['iga_legal_status_treatment']; } /** - * Sets sponsored_closely_held_entity_sponsoring_entity + * Sets iga_legal_status_treatment * - * @param string|null $sponsored_closely_held_entity_sponsoring_entity The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle. + * @param string|null $iga_legal_status_treatment Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. * * @return self */ - public function setSponsoredCloselyHeldEntitySponsoringEntity($sponsored_closely_held_entity_sponsoring_entity) + public function setIgaLegalStatusTreatment($iga_legal_status_treatment) { - $this->container['sponsored_closely_held_entity_sponsoring_entity'] = $sponsored_closely_held_entity_sponsoring_entity; + $this->container['iga_legal_status_treatment'] = $iga_legal_status_treatment; return $this; } /** - * Gets sponsored_closely_held_investment_vehicle_certification + * Gets iga_ffi_trustee_or_sponsor * - * @return bool|null + * @return string|null */ - public function getSponsoredCloselyHeldInvestmentVehicleCertification() + public function getIgaFfiTrusteeOrSponsor() { - return $this->container['sponsored_closely_held_investment_vehicle_certification']; + return $this->container['iga_ffi_trustee_or_sponsor']; } /** - * Sets sponsored_closely_held_investment_vehicle_certification + * Sets iga_ffi_trustee_or_sponsor * - * @param bool|null $sponsored_closely_held_investment_vehicle_certification Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity. + * @param string|null $iga_ffi_trustee_or_sponsor The trustee or sponsor name for the nonreporting IGA FFI. * * @return self */ - public function setSponsoredCloselyHeldInvestmentVehicleCertification($sponsored_closely_held_investment_vehicle_certification) + public function setIgaFfiTrusteeOrSponsor($iga_ffi_trustee_or_sponsor) { - $this->container['sponsored_closely_held_investment_vehicle_certification'] = $sponsored_closely_held_investment_vehicle_certification; + $this->container['iga_ffi_trustee_or_sponsor'] = $iga_ffi_trustee_or_sponsor; return $this; } /** - * Gets compliant_limited_life_debt_entity_certification + * Gets iga_ffi_trustee_is_foreign * * @return bool|null */ - public function getCompliantLimitedLifeDebtEntityCertification() + public function getIgaFfiTrusteeIsForeign() { - return $this->container['compliant_limited_life_debt_entity_certification']; + return $this->container['iga_ffi_trustee_is_foreign']; } /** - * Sets compliant_limited_life_debt_entity_certification + * Sets iga_ffi_trustee_is_foreign * - * @param bool|null $compliant_limited_life_debt_entity_certification Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements. + * @param bool|null $iga_ffi_trustee_is_foreign Indicates whether the trustee for the nonreporting IGA FFI is foreign. * * @return self */ - public function setCompliantLimitedLifeDebtEntityCertification($compliant_limited_life_debt_entity_certification) + public function setIgaFfiTrusteeIsForeign($iga_ffi_trustee_is_foreign) { - $this->container['compliant_limited_life_debt_entity_certification'] = $compliant_limited_life_debt_entity_certification; + $this->container['iga_ffi_trustee_is_foreign'] = $iga_ffi_trustee_is_foreign; return $this; } /** - * Gets investment_entity_no_financial_accounts_certification + * Gets non_commercial_financial_activity_certification * * @return bool|null */ - public function getInvestmentEntityNoFinancialAccountsCertification() + public function getNonCommercialFinancialActivityCertification() { - return $this->container['investment_entity_no_financial_accounts_certification']; + return $this->container['non_commercial_financial_activity_certification']; } /** - * Sets investment_entity_no_financial_accounts_certification + * Sets non_commercial_financial_activity_certification * - * @param bool|null $investment_entity_no_financial_accounts_certification Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts. + * @param bool|null $non_commercial_financial_activity_certification Certifies that the entity is the beneficial owner and is not engaged in commercial financial activities related to the specified payments, accounts or obligations for which this form is submitted. * * @return self */ - public function setInvestmentEntityNoFinancialAccountsCertification($investment_entity_no_financial_accounts_certification) + public function setNonCommercialFinancialActivityCertification($non_commercial_financial_activity_certification) { - $this->container['investment_entity_no_financial_accounts_certification'] = $investment_entity_no_financial_accounts_certification; + $this->container['non_commercial_financial_activity_certification'] = $non_commercial_financial_activity_certification; return $this; } /** - * Gets owner_documented_ffi_certification + * Gets internation_organization_certification * * @return bool|null */ - public function getOwnerDocumentedFfiCertification() + public function getInternationOrganizationCertification() { - return $this->container['owner_documented_ffi_certification']; + return $this->container['internation_organization_certification']; } /** - * Sets owner_documented_ffi_certification + * Sets internation_organization_certification * - * @param bool|null $owner_documented_ffi_certification Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships. + * @param bool|null $internation_organization_certification Certifies that the entity is an international organization described in section 7701(a)(18). * * @return self */ - public function setOwnerDocumentedFfiCertification($owner_documented_ffi_certification) + public function setInternationOrganizationCertification($internation_organization_certification) { - $this->container['owner_documented_ffi_certification'] = $owner_documented_ffi_certification; + $this->container['internation_organization_certification'] = $internation_organization_certification; return $this; } /** - * Gets owner_documented_ffi_reporting_statement_certification + * Gets intergovernmental_organization_certification * * @return bool|null */ - public function getOwnerDocumentedFfiReportingStatementCertification() + public function getIntergovernmentalOrganizationCertification() { - return $this->container['owner_documented_ffi_reporting_statement_certification']; + return $this->container['intergovernmental_organization_certification']; } /** - * Sets owner_documented_ffi_reporting_statement_certification + * Sets intergovernmental_organization_certification * - * @param bool|null $owner_documented_ffi_reporting_statement_certification Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder. + * @param bool|null $intergovernmental_organization_certification Certifies that the entity is an intergovernmental or supranational organization primarily comprised of foreign governments, is the beneficial owner, and is not engaged in commercial financial activities. * * @return self */ - public function setOwnerDocumentedFfiReportingStatementCertification($owner_documented_ffi_reporting_statement_certification) + public function setIntergovernmentalOrganizationCertification($intergovernmental_organization_certification) { - $this->container['owner_documented_ffi_reporting_statement_certification'] = $owner_documented_ffi_reporting_statement_certification; + $this->container['intergovernmental_organization_certification'] = $intergovernmental_organization_certification; return $this; } /** - * Gets owner_documented_ffi_auditor_letter_certification + * Gets treaty_qualified_pension_fund_certification * * @return bool|null */ - public function getOwnerDocumentedFfiAuditorLetterCertification() + public function getTreatyQualifiedPensionFundCertification() { - return $this->container['owner_documented_ffi_auditor_letter_certification']; + return $this->container['treaty_qualified_pension_fund_certification']; } /** - * Sets owner_documented_ffi_auditor_letter_certification + * Sets treaty_qualified_pension_fund_certification * - * @param bool|null $owner_documented_ffi_auditor_letter_certification Certifies that the FFI has provided or will provide an auditor’s letter and required owner documentation, including a reporting statement and Form W-9s, to meet owner-documented FFI requirements under the regulations. + * @param bool|null $treaty_qualified_pension_fund_certification Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income. * * @return self */ - public function setOwnerDocumentedFfiAuditorLetterCertification($owner_documented_ffi_auditor_letter_certification) + public function setTreatyQualifiedPensionFundCertification($treaty_qualified_pension_fund_certification) { - $this->container['owner_documented_ffi_auditor_letter_certification'] = $owner_documented_ffi_auditor_letter_certification; + $this->container['treaty_qualified_pension_fund_certification'] = $treaty_qualified_pension_fund_certification; return $this; } /** - * Gets owner_documented_ffi_trust_beneficiaries_certification + * Gets qualified_retirement_fund_certification * * @return bool|null */ - public function getOwnerDocumentedFfiTrustBeneficiariesCertification() + public function getQualifiedRetirementFundCertification() { - return $this->container['owner_documented_ffi_trust_beneficiaries_certification']; + return $this->container['qualified_retirement_fund_certification']; } /** - * Sets owner_documented_ffi_trust_beneficiaries_certification + * Sets qualified_retirement_fund_certification * - * @param bool|null $owner_documented_ffi_trust_beneficiaries_certification Certifies that the trust has no contingent or unidentified beneficiaries or designated classes of beneficiaries. + * @param bool|null $qualified_retirement_fund_certification Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions. * * @return self */ - public function setOwnerDocumentedFfiTrustBeneficiariesCertification($owner_documented_ffi_trust_beneficiaries_certification) + public function setQualifiedRetirementFundCertification($qualified_retirement_fund_certification) { - $this->container['owner_documented_ffi_trust_beneficiaries_certification'] = $owner_documented_ffi_trust_beneficiaries_certification; + $this->container['qualified_retirement_fund_certification'] = $qualified_retirement_fund_certification; return $this; } /** - * Gets restricted_distributor_certification + * Gets narrow_participation_retirement_fund_certification * * @return bool|null */ - public function getRestrictedDistributorCertification() + public function getNarrowParticipationRetirementFundCertification() { - return $this->container['restricted_distributor_certification']; + return $this->container['narrow_participation_retirement_fund_certification']; } /** - * Sets restricted_distributor_certification + * Sets narrow_participation_retirement_fund_certification * - * @param bool|null $restricted_distributor_certification Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations. + * @param bool|null $narrow_participation_retirement_fund_certification Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs. * * @return self */ - public function setRestrictedDistributorCertification($restricted_distributor_certification) + public function setNarrowParticipationRetirementFundCertification($narrow_participation_retirement_fund_certification) { - $this->container['restricted_distributor_certification'] = $restricted_distributor_certification; + $this->container['narrow_participation_retirement_fund_certification'] = $narrow_participation_retirement_fund_certification; return $this; } /** - * Gets restricted_distributor_agreement_certification + * Gets section401_a_equivalent_pension_plan_certification * * @return bool|null */ - public function getRestrictedDistributorAgreementCertification() + public function getSection401AEquivalentPensionPlanCertification() { - return $this->container['restricted_distributor_agreement_certification']; + return $this->container['section401_a_equivalent_pension_plan_certification']; } /** - * Sets restricted_distributor_agreement_certification + * Sets section401_a_equivalent_pension_plan_certification * - * @param bool|null $restricted_distributor_agreement_certification Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities. + * @param bool|null $section401_a_equivalent_pension_plan_certification Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded. * * @return self */ - public function setRestrictedDistributorAgreementCertification($restricted_distributor_agreement_certification) + public function setSection401AEquivalentPensionPlanCertification($section401_a_equivalent_pension_plan_certification) { - $this->container['restricted_distributor_agreement_certification'] = $restricted_distributor_agreement_certification; + $this->container['section401_a_equivalent_pension_plan_certification'] = $section401_a_equivalent_pension_plan_certification; return $this; } /** - * Gets restricted_distributor_preexisting_sales_compliance_certification + * Gets investment_entity_for_retirement_funds_certification * * @return bool|null */ - public function getRestrictedDistributorPreexistingSalesComplianceCertification() + public function getInvestmentEntityForRetirementFundsCertification() { - return $this->container['restricted_distributor_preexisting_sales_compliance_certification']; + return $this->container['investment_entity_for_retirement_funds_certification']; } /** - * Sets restricted_distributor_preexisting_sales_compliance_certification + * Sets investment_entity_for_retirement_funds_certification * - * @param bool|null $restricted_distributor_preexisting_sales_compliance_certification Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations. + * @param bool|null $investment_entity_for_retirement_funds_certification Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs. * * @return self */ - public function setRestrictedDistributorPreexistingSalesComplianceCertification($restricted_distributor_preexisting_sales_compliance_certification) + public function setInvestmentEntityForRetirementFundsCertification($investment_entity_for_retirement_funds_certification) { - $this->container['restricted_distributor_preexisting_sales_compliance_certification'] = $restricted_distributor_preexisting_sales_compliance_certification; + $this->container['investment_entity_for_retirement_funds_certification'] = $investment_entity_for_retirement_funds_certification; return $this; } /** - * Gets nonreporting_iga_ffi_certification + * Gets exempt_beneficial_owner_sponsored_retirement_fund_certification * * @return bool|null */ - public function getNonreportingIgaFfiCertification() + public function getExemptBeneficialOwnerSponsoredRetirementFundCertification() { - return $this->container['nonreporting_iga_ffi_certification']; + return $this->container['exempt_beneficial_owner_sponsored_retirement_fund_certification']; } /** - * Sets nonreporting_iga_ffi_certification + * Sets exempt_beneficial_owner_sponsored_retirement_fund_certification * - * @param bool|null $nonreporting_iga_ffi_certification Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. + * @param bool|null $exempt_beneficial_owner_sponsored_retirement_fund_certification Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. * * @return self */ - public function setNonreportingIgaFfiCertification($nonreporting_iga_ffi_certification) + public function setExemptBeneficialOwnerSponsoredRetirementFundCertification($exempt_beneficial_owner_sponsored_retirement_fund_certification) { - $this->container['nonreporting_iga_ffi_certification'] = $nonreporting_iga_ffi_certification; + $this->container['exempt_beneficial_owner_sponsored_retirement_fund_certification'] = $exempt_beneficial_owner_sponsored_retirement_fund_certification; return $this; } /** - * Gets iga_country + * Gets exempt_beneficial_owner_owned_investment_entity_certification * - * @return string|null + * @return bool|null */ - public function getIgaCountry() + public function getExemptBeneficialOwnerOwnedInvestmentEntityCertification() { - return $this->container['iga_country']; + return $this->container['exempt_beneficial_owner_owned_investment_entity_certification']; } /** - * Sets iga_country + * Sets exempt_beneficial_owner_owned_investment_entity_certification * - * @param string|null $iga_country The country for the applicable IGA with the United States. + * @param bool|null $exempt_beneficial_owner_owned_investment_entity_certification Certifies that the entity is an investment entity wholly owned by exempt beneficial owners and has provided complete ownership and documentation details as required under FATCA regulations. * * @return self */ - public function setIgaCountry($iga_country) + public function setExemptBeneficialOwnerOwnedInvestmentEntityCertification($exempt_beneficial_owner_owned_investment_entity_certification) { - $this->container['iga_country'] = $iga_country; + $this->container['exempt_beneficial_owner_owned_investment_entity_certification'] = $exempt_beneficial_owner_owned_investment_entity_certification; return $this; } /** - * Gets iga_model + * Gets territory_financial_institution_certification * - * @return string|null + * @return bool|null */ - public function getIgaModel() + public function getTerritoryFinancialInstitutionCertification() { - return $this->container['iga_model']; + return $this->container['territory_financial_institution_certification']; } /** - * Sets iga_model + * Sets territory_financial_institution_certification * - * @param string|null $iga_model The applicable IGA model. + * @param bool|null $territory_financial_institution_certification Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. * * @return self */ - public function setIgaModel($iga_model) + public function setTerritoryFinancialInstitutionCertification($territory_financial_institution_certification) { - $this->container['iga_model'] = $iga_model; + $this->container['territory_financial_institution_certification'] = $territory_financial_institution_certification; return $this; } /** - * Gets iga_legal_status_treatment + * Gets excepted_nonfinancial_group_entity_certification * - * @return string|null + * @return bool|null */ - public function getIgaLegalStatusTreatment() + public function getExceptedNonfinancialGroupEntityCertification() { - return $this->container['iga_legal_status_treatment']; + return $this->container['excepted_nonfinancial_group_entity_certification']; } /** - * Sets iga_legal_status_treatment + * Sets excepted_nonfinancial_group_entity_certification * - * @param string|null $iga_legal_status_treatment Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. + * @param bool|null $excepted_nonfinancial_group_entity_certification Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. * * @return self */ - public function setIgaLegalStatusTreatment($iga_legal_status_treatment) + public function setExceptedNonfinancialGroupEntityCertification($excepted_nonfinancial_group_entity_certification) { - $this->container['iga_legal_status_treatment'] = $iga_legal_status_treatment; + $this->container['excepted_nonfinancial_group_entity_certification'] = $excepted_nonfinancial_group_entity_certification; return $this; } /** - * Gets iga_ffi_trustee_or_sponsor + * Gets excepted_nonfinancial_start_up_certification * - * @return string|null + * @return bool|null */ - public function getIgaFfiTrusteeOrSponsor() + public function getExceptedNonfinancialStartUpCertification() { - return $this->container['iga_ffi_trustee_or_sponsor']; + return $this->container['excepted_nonfinancial_start_up_certification']; } /** - * Sets iga_ffi_trustee_or_sponsor + * Sets excepted_nonfinancial_start_up_certification * - * @param string|null $iga_ffi_trustee_or_sponsor The trustee or sponsor name for the nonreporting IGA FFI. + * @param bool|null $excepted_nonfinancial_start_up_certification Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. * * @return self */ - public function setIgaFfiTrusteeOrSponsor($iga_ffi_trustee_or_sponsor) + public function setExceptedNonfinancialStartUpCertification($excepted_nonfinancial_start_up_certification) { - $this->container['iga_ffi_trustee_or_sponsor'] = $iga_ffi_trustee_or_sponsor; + $this->container['excepted_nonfinancial_start_up_certification'] = $excepted_nonfinancial_start_up_certification; return $this; } /** - * Gets iga_ffi_trustee_is_foreign + * Gets startup_formation_or_resolution_date * - * @return bool|null + * @return \DateTime|null */ - public function getIgaFfiTrusteeIsForeign() + public function getStartupFormationOrResolutionDate() { - return $this->container['iga_ffi_trustee_is_foreign']; + return $this->container['startup_formation_or_resolution_date']; } /** - * Sets iga_ffi_trustee_is_foreign + * Sets startup_formation_or_resolution_date * - * @param bool|null $iga_ffi_trustee_is_foreign Indicates whether the trustee for the nonreporting IGA FFI is foreign. + * @param \DateTime|null $startup_formation_or_resolution_date The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). * * @return self */ - public function setIgaFfiTrusteeIsForeign($iga_ffi_trustee_is_foreign) + public function setStartupFormationOrResolutionDate($startup_formation_or_resolution_date) { - $this->container['iga_ffi_trustee_is_foreign'] = $iga_ffi_trustee_is_foreign; + $this->container['startup_formation_or_resolution_date'] = $startup_formation_or_resolution_date; return $this; } /** - * Gets non_commercial_financial_activity_certification + * Gets excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification * * @return bool|null */ - public function getNonCommercialFinancialActivityCertification() + public function getExceptedNonfinancialEntityInLiquidationOrBankruptcyCertification() { - return $this->container['non_commercial_financial_activity_certification']; + return $this->container['excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification']; } /** - * Sets non_commercial_financial_activity_certification + * Sets excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification * - * @param bool|null $non_commercial_financial_activity_certification Certifies that the entity is the beneficial owner and is not engaged in commercial financial activities related to the specified payments, accounts or obligations for which this form is submitted. + * @param bool|null $excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. * * @return self */ - public function setNonCommercialFinancialActivityCertification($non_commercial_financial_activity_certification) + public function setExceptedNonfinancialEntityInLiquidationOrBankruptcyCertification($excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification) { - $this->container['non_commercial_financial_activity_certification'] = $non_commercial_financial_activity_certification; + $this->container['excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification'] = $excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification; return $this; } /** - * Gets internation_organization_certification + * Gets nonfinancial_entity_filing_date * - * @return bool|null + * @return \DateTime|null */ - public function getInternationOrganizationCertification() + public function getNonfinancialEntityFilingDate() { - return $this->container['internation_organization_certification']; + return $this->container['nonfinancial_entity_filing_date']; } /** - * Sets internation_organization_certification + * Sets nonfinancial_entity_filing_date * - * @param bool|null $internation_organization_certification Certifies that the entity is an international organization described in section 7701(a)(18). + * @param \DateTime|null $nonfinancial_entity_filing_date The filed date for a plan of reorganization, liquidation or bankruptcy. * * @return self */ - public function setInternationOrganizationCertification($internation_organization_certification) + public function setNonfinancialEntityFilingDate($nonfinancial_entity_filing_date) { - $this->container['internation_organization_certification'] = $internation_organization_certification; + $this->container['nonfinancial_entity_filing_date'] = $nonfinancial_entity_filing_date; return $this; } /** - * Gets intergovernmental_organization_certification + * Gets section501_c_organization_certification * * @return bool|null */ - public function getIntergovernmentalOrganizationCertification() + public function getSection501COrganizationCertification() { - return $this->container['intergovernmental_organization_certification']; + return $this->container['section501_c_organization_certification']; } /** - * Sets intergovernmental_organization_certification + * Sets section501_c_organization_certification * - * @param bool|null $intergovernmental_organization_certification Certifies that the entity is an intergovernmental or supranational organization primarily comprised of foreign governments, is the beneficial owner, and is not engaged in commercial financial activities. + * @param bool|null $section501_c_organization_certification Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel. * * @return self */ - public function setIntergovernmentalOrganizationCertification($intergovernmental_organization_certification) + public function setSection501COrganizationCertification($section501_c_organization_certification) { - $this->container['intergovernmental_organization_certification'] = $intergovernmental_organization_certification; + $this->container['section501_c_organization_certification'] = $section501_c_organization_certification; return $this; } /** - * Gets treaty_qualified_pension_fund_certification + * Gets determination_letter_date * - * @return bool|null + * @return \DateTime|null */ - public function getTreatyQualifiedPensionFundCertification() + public function getDeterminationLetterDate() { - return $this->container['treaty_qualified_pension_fund_certification']; + return $this->container['determination_letter_date']; } /** - * Sets treaty_qualified_pension_fund_certification + * Sets determination_letter_date * - * @param bool|null $treaty_qualified_pension_fund_certification Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income. + * @param \DateTime|null $determination_letter_date The date of the IRS determination letter confirming the entity’s section 501(c) status. * * @return self */ - public function setTreatyQualifiedPensionFundCertification($treaty_qualified_pension_fund_certification) + public function setDeterminationLetterDate($determination_letter_date) { - $this->container['treaty_qualified_pension_fund_certification'] = $treaty_qualified_pension_fund_certification; + $this->container['determination_letter_date'] = $determination_letter_date; return $this; } /** - * Gets qualified_retirement_fund_certification + * Gets nonprofit_organization_certification * * @return bool|null */ - public function getQualifiedRetirementFundCertification() + public function getNonprofitOrganizationCertification() { - return $this->container['qualified_retirement_fund_certification']; + return $this->container['nonprofit_organization_certification']; } /** - * Sets qualified_retirement_fund_certification + * Sets nonprofit_organization_certification * - * @param bool|null $qualified_retirement_fund_certification Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions. + * @param bool|null $nonprofit_organization_certification Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law. * * @return self */ - public function setQualifiedRetirementFundCertification($qualified_retirement_fund_certification) + public function setNonprofitOrganizationCertification($nonprofit_organization_certification) { - $this->container['qualified_retirement_fund_certification'] = $qualified_retirement_fund_certification; + $this->container['nonprofit_organization_certification'] = $nonprofit_organization_certification; return $this; } /** - * Gets narrow_participation_retirement_fund_certification + * Gets publicly_traded_nffe_certification * * @return bool|null */ - public function getNarrowParticipationRetirementFundCertification() + public function getPubliclyTradedNffeCertification() { - return $this->container['narrow_participation_retirement_fund_certification']; + return $this->container['publicly_traded_nffe_certification']; } /** - * Sets narrow_participation_retirement_fund_certification + * Sets publicly_traded_nffe_certification * - * @param bool|null $narrow_participation_retirement_fund_certification Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs. + * @param bool|null $publicly_traded_nffe_certification Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. * * @return self */ - public function setNarrowParticipationRetirementFundCertification($narrow_participation_retirement_fund_certification) + public function setPubliclyTradedNffeCertification($publicly_traded_nffe_certification) { - $this->container['narrow_participation_retirement_fund_certification'] = $narrow_participation_retirement_fund_certification; + $this->container['publicly_traded_nffe_certification'] = $publicly_traded_nffe_certification; return $this; } /** - * Gets section401_a_equivalent_pension_plan_certification + * Gets publicly_traded_nffe_securities_market * - * @return bool|null + * @return string|null */ - public function getSection401AEquivalentPensionPlanCertification() + public function getPubliclyTradedNffeSecuritiesMarket() { - return $this->container['section401_a_equivalent_pension_plan_certification']; + return $this->container['publicly_traded_nffe_securities_market']; } /** - * Sets section401_a_equivalent_pension_plan_certification + * Sets publicly_traded_nffe_securities_market * - * @param bool|null $section401_a_equivalent_pension_plan_certification Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded. + * @param string|null $publicly_traded_nffe_securities_market The name of the securities market where the corporation's stock is regularly traded. * * @return self */ - public function setSection401AEquivalentPensionPlanCertification($section401_a_equivalent_pension_plan_certification) + public function setPubliclyTradedNffeSecuritiesMarket($publicly_traded_nffe_securities_market) { - $this->container['section401_a_equivalent_pension_plan_certification'] = $section401_a_equivalent_pension_plan_certification; + $this->container['publicly_traded_nffe_securities_market'] = $publicly_traded_nffe_securities_market; return $this; } /** - * Gets investment_entity_for_retirement_funds_certification + * Gets nffe_affiliate_of_publicly_traded_entity_certification * * @return bool|null */ - public function getInvestmentEntityForRetirementFundsCertification() + public function getNffeAffiliateOfPubliclyTradedEntityCertification() { - return $this->container['investment_entity_for_retirement_funds_certification']; + return $this->container['nffe_affiliate_of_publicly_traded_entity_certification']; } /** - * Sets investment_entity_for_retirement_funds_certification + * Sets nffe_affiliate_of_publicly_traded_entity_certification * - * @param bool|null $investment_entity_for_retirement_funds_certification Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs. + * @param bool|null $nffe_affiliate_of_publicly_traded_entity_certification Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. * * @return self */ - public function setInvestmentEntityForRetirementFundsCertification($investment_entity_for_retirement_funds_certification) + public function setNffeAffiliateOfPubliclyTradedEntityCertification($nffe_affiliate_of_publicly_traded_entity_certification) { - $this->container['investment_entity_for_retirement_funds_certification'] = $investment_entity_for_retirement_funds_certification; + $this->container['nffe_affiliate_of_publicly_traded_entity_certification'] = $nffe_affiliate_of_publicly_traded_entity_certification; return $this; } /** - * Gets exempt_beneficial_owner_sponsored_retirement_fund_certification + * Gets publicly_traded_entity * - * @return bool|null + * @return string|null */ - public function getExemptBeneficialOwnerSponsoredRetirementFundCertification() + public function getPubliclyTradedEntity() { - return $this->container['exempt_beneficial_owner_sponsored_retirement_fund_certification']; + return $this->container['publicly_traded_entity']; } /** - * Sets exempt_beneficial_owner_sponsored_retirement_fund_certification + * Sets publicly_traded_entity * - * @param bool|null $exempt_beneficial_owner_sponsored_retirement_fund_certification Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. + * @param string|null $publicly_traded_entity The name of the affiliated entity whose stock is regularly traded on an established securities market. * * @return self */ - public function setExemptBeneficialOwnerSponsoredRetirementFundCertification($exempt_beneficial_owner_sponsored_retirement_fund_certification) + public function setPubliclyTradedEntity($publicly_traded_entity) { - $this->container['exempt_beneficial_owner_sponsored_retirement_fund_certification'] = $exempt_beneficial_owner_sponsored_retirement_fund_certification; + $this->container['publicly_traded_entity'] = $publicly_traded_entity; return $this; } /** - * Gets exempt_beneficial_owner_owned_investment_entity_certification + * Gets nffe_affiliate_of_publicly_traded_entity_securities_market * - * @return bool|null + * @return string|null */ - public function getExemptBeneficialOwnerOwnedInvestmentEntityCertification() + public function getNffeAffiliateOfPubliclyTradedEntitySecuritiesMarket() { - return $this->container['exempt_beneficial_owner_owned_investment_entity_certification']; + return $this->container['nffe_affiliate_of_publicly_traded_entity_securities_market']; } /** - * Sets exempt_beneficial_owner_owned_investment_entity_certification + * Sets nffe_affiliate_of_publicly_traded_entity_securities_market * - * @param bool|null $exempt_beneficial_owner_owned_investment_entity_certification Certifies that the entity is an investment entity wholly owned by exempt beneficial owners and has provided complete ownership and documentation details as required under FATCA regulations. + * @param string|null $nffe_affiliate_of_publicly_traded_entity_securities_market The name of the established securities market where the affiliated entity's stock is traded. * * @return self */ - public function setExemptBeneficialOwnerOwnedInvestmentEntityCertification($exempt_beneficial_owner_owned_investment_entity_certification) + public function setNffeAffiliateOfPubliclyTradedEntitySecuritiesMarket($nffe_affiliate_of_publicly_traded_entity_securities_market) { - $this->container['exempt_beneficial_owner_owned_investment_entity_certification'] = $exempt_beneficial_owner_owned_investment_entity_certification; + $this->container['nffe_affiliate_of_publicly_traded_entity_securities_market'] = $nffe_affiliate_of_publicly_traded_entity_securities_market; return $this; } /** - * Gets territory_financial_institution_certification + * Gets excepted_territory_nffe_certification * * @return bool|null */ - public function getTerritoryFinancialInstitutionCertification() + public function getExceptedTerritoryNffeCertification() { - return $this->container['territory_financial_institution_certification']; + return $this->container['excepted_territory_nffe_certification']; } /** - * Sets territory_financial_institution_certification + * Sets excepted_territory_nffe_certification * - * @param bool|null $territory_financial_institution_certification Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. + * @param bool|null $excepted_territory_nffe_certification Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession. * * @return self */ - public function setTerritoryFinancialInstitutionCertification($territory_financial_institution_certification) + public function setExceptedTerritoryNffeCertification($excepted_territory_nffe_certification) { - $this->container['territory_financial_institution_certification'] = $territory_financial_institution_certification; + $this->container['excepted_territory_nffe_certification'] = $excepted_territory_nffe_certification; return $this; } /** - * Gets excepted_nonfinancial_group_entity_certification + * Gets active_nffe_certification * * @return bool|null */ - public function getExceptedNonfinancialGroupEntityCertification() + public function getActiveNffeCertification() { - return $this->container['excepted_nonfinancial_group_entity_certification']; + return $this->container['active_nffe_certification']; } /** - * Sets excepted_nonfinancial_group_entity_certification + * Sets active_nffe_certification * - * @param bool|null $excepted_nonfinancial_group_entity_certification Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. + * @param bool|null $active_nffe_certification Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income. * * @return self */ - public function setExceptedNonfinancialGroupEntityCertification($excepted_nonfinancial_group_entity_certification) + public function setActiveNffeCertification($active_nffe_certification) { - $this->container['excepted_nonfinancial_group_entity_certification'] = $excepted_nonfinancial_group_entity_certification; + $this->container['active_nffe_certification'] = $active_nffe_certification; return $this; } /** - * Gets excepted_nonfinancial_start_up_certification + * Gets passive_nffe_certification * * @return bool|null */ - public function getExceptedNonfinancialStartUpCertification() + public function getPassiveNffeCertification() { - return $this->container['excepted_nonfinancial_start_up_certification']; + return $this->container['passive_nffe_certification']; } /** - * Sets excepted_nonfinancial_start_up_certification + * Sets passive_nffe_certification * - * @param bool|null $excepted_nonfinancial_start_up_certification Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. + * @param bool|null $passive_nffe_certification Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution. * * @return self */ - public function setExceptedNonfinancialStartUpCertification($excepted_nonfinancial_start_up_certification) + public function setPassiveNffeCertification($passive_nffe_certification) { - $this->container['excepted_nonfinancial_start_up_certification'] = $excepted_nonfinancial_start_up_certification; + $this->container['passive_nffe_certification'] = $passive_nffe_certification; return $this; } /** - * Gets startup_formation_or_resolution_date + * Gets passive_nffe_no_substantial_us_owners_certification * - * @return \DateTime|null + * @return bool|null */ - public function getStartupFormationOrResolutionDate() + public function getPassiveNffeNoSubstantialUsOwnersCertification() { - return $this->container['startup_formation_or_resolution_date']; + return $this->container['passive_nffe_no_substantial_us_owners_certification']; } /** - * Sets startup_formation_or_resolution_date + * Sets passive_nffe_no_substantial_us_owners_certification * - * @param \DateTime|null $startup_formation_or_resolution_date The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). + * @param bool|null $passive_nffe_no_substantial_us_owners_certification Certifies that the passive NFFE has no substantial U.S. owners or controlling U.S. persons. * * @return self */ - public function setStartupFormationOrResolutionDate($startup_formation_or_resolution_date) + public function setPassiveNffeNoSubstantialUsOwnersCertification($passive_nffe_no_substantial_us_owners_certification) { - $this->container['startup_formation_or_resolution_date'] = $startup_formation_or_resolution_date; + $this->container['passive_nffe_no_substantial_us_owners_certification'] = $passive_nffe_no_substantial_us_owners_certification; return $this; } /** - * Gets excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification + * Gets passive_nffe_substantial_us_owners_provided_certification * * @return bool|null */ - public function getExceptedNonfinancialEntityInLiquidationOrBankruptcyCertification() + public function getPassiveNffeSubstantialUsOwnersProvidedCertification() { - return $this->container['excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification']; + return $this->container['passive_nffe_substantial_us_owners_provided_certification']; } /** - * Sets excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification + * Sets passive_nffe_substantial_us_owners_provided_certification * - * @param bool|null $excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. + * @param bool|null $passive_nffe_substantial_us_owners_provided_certification Certifies that the passive NFFE has provided the name, address, and TIN of each substantial U.S. owner or controlling U.S. person. * * @return self */ - public function setExceptedNonfinancialEntityInLiquidationOrBankruptcyCertification($excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification) + public function setPassiveNffeSubstantialUsOwnersProvidedCertification($passive_nffe_substantial_us_owners_provided_certification) { - $this->container['excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification'] = $excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification; + $this->container['passive_nffe_substantial_us_owners_provided_certification'] = $passive_nffe_substantial_us_owners_provided_certification; return $this; } /** - * Gets nonfinancial_entity_filing_date + * Gets excepted_inter_affiliate_ffi_certification * - * @return \DateTime|null + * @return bool|null */ - public function getNonfinancialEntityFilingDate() + public function getExceptedInterAffiliateFfiCertification() { - return $this->container['nonfinancial_entity_filing_date']; + return $this->container['excepted_inter_affiliate_ffi_certification']; } /** - * Sets nonfinancial_entity_filing_date + * Sets excepted_inter_affiliate_ffi_certification * - * @param \DateTime|null $nonfinancial_entity_filing_date The filed date for a plan of reorganization, liquidation or bankruptcy. + * @param bool|null $excepted_inter_affiliate_ffi_certification Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. * * @return self */ - public function setNonfinancialEntityFilingDate($nonfinancial_entity_filing_date) + public function setExceptedInterAffiliateFfiCertification($excepted_inter_affiliate_ffi_certification) { - $this->container['nonfinancial_entity_filing_date'] = $nonfinancial_entity_filing_date; + $this->container['excepted_inter_affiliate_ffi_certification'] = $excepted_inter_affiliate_ffi_certification; return $this; } /** - * Gets section501_c_organization_certification + * Gets sponsored_direct_reporting_nffe_certification * * @return bool|null */ - public function getSection501COrganizationCertification() + public function getSponsoredDirectReportingNffeCertification() { - return $this->container['section501_c_organization_certification']; + return $this->container['sponsored_direct_reporting_nffe_certification']; } /** - * Sets section501_c_organization_certification + * Sets sponsored_direct_reporting_nffe_certification * - * @param bool|null $section501_c_organization_certification Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel. + * @param bool|null $sponsored_direct_reporting_nffe_certification Certifies that the entity is a sponsored direct reporting NFFE. * * @return self */ - public function setSection501COrganizationCertification($section501_c_organization_certification) + public function setSponsoredDirectReportingNffeCertification($sponsored_direct_reporting_nffe_certification) { - $this->container['section501_c_organization_certification'] = $section501_c_organization_certification; + $this->container['sponsored_direct_reporting_nffe_certification'] = $sponsored_direct_reporting_nffe_certification; return $this; } /** - * Gets determination_letter_date + * Gets direct_reporting_nffe_sponsoring_entity * - * @return \DateTime|null + * @return string|null */ - public function getDeterminationLetterDate() + public function getDirectReportingNffeSponsoringEntity() { - return $this->container['determination_letter_date']; + return $this->container['direct_reporting_nffe_sponsoring_entity']; } /** - * Sets determination_letter_date + * Sets direct_reporting_nffe_sponsoring_entity * - * @param \DateTime|null $determination_letter_date The date of the IRS determination letter confirming the entity’s section 501(c) status. + * @param string|null $direct_reporting_nffe_sponsoring_entity The name of the entity that sponsors the direct reporting NFFE. * * @return self */ - public function setDeterminationLetterDate($determination_letter_date) + public function setDirectReportingNffeSponsoringEntity($direct_reporting_nffe_sponsoring_entity) { - $this->container['determination_letter_date'] = $determination_letter_date; + $this->container['direct_reporting_nffe_sponsoring_entity'] = $direct_reporting_nffe_sponsoring_entity; return $this; } /** - * Gets nonprofit_organization_certification + * Gets substantial_us_owners * - * @return bool|null + * @return \Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerResponse[]|null */ - public function getNonprofitOrganizationCertification() + public function getSubstantialUsOwners() { - return $this->container['nonprofit_organization_certification']; + return $this->container['substantial_us_owners']; } /** - * Sets nonprofit_organization_certification + * Sets substantial_us_owners * - * @param bool|null $nonprofit_organization_certification Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law. + * @param \Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerResponse[]|null $substantial_us_owners The list of substantial U.S. owners of passive NFFE. * * @return self */ - public function setNonprofitOrganizationCertification($nonprofit_organization_certification) + public function setSubstantialUsOwners($substantial_us_owners) { - $this->container['nonprofit_organization_certification'] = $nonprofit_organization_certification; + $this->container['substantial_us_owners'] = $substantial_us_owners; return $this; } /** - * Gets publicly_traded_nffe_certification + * Gets signer_name * - * @return bool|null + * @return string|null */ - public function getPubliclyTradedNffeCertification() + public function getSignerName() { - return $this->container['publicly_traded_nffe_certification']; + return $this->container['signer_name']; } /** - * Sets publicly_traded_nffe_certification + * Sets signer_name * - * @param bool|null $publicly_traded_nffe_certification Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. + * @param string|null $signer_name The name of the signer. * * @return self */ - public function setPubliclyTradedNffeCertification($publicly_traded_nffe_certification) + public function setSignerName($signer_name) { - $this->container['publicly_traded_nffe_certification'] = $publicly_traded_nffe_certification; + $this->container['signer_name'] = $signer_name; return $this; } /** - * Gets publicly_traded_nffe_securities_market + * Gets capacity_to_sign_certification * - * @return string|null + * @return bool|null */ - public function getPubliclyTradedNffeSecuritiesMarket() + public function getCapacityToSignCertification() { - return $this->container['publicly_traded_nffe_securities_market']; + return $this->container['capacity_to_sign_certification']; } /** - * Sets publicly_traded_nffe_securities_market + * Sets capacity_to_sign_certification * - * @param string|null $publicly_traded_nffe_securities_market The name of the securities market where the corporation's stock is regularly traded. + * @param bool|null $capacity_to_sign_certification Certifies signer has the capacity to sign for the beneficial owner. * * @return self */ - public function setPubliclyTradedNffeSecuritiesMarket($publicly_traded_nffe_securities_market) + public function setCapacityToSignCertification($capacity_to_sign_certification) { - $this->container['publicly_traded_nffe_securities_market'] = $publicly_traded_nffe_securities_market; + $this->container['capacity_to_sign_certification'] = $capacity_to_sign_certification; return $this; } /** - * Gets nffe_affiliate_of_publicly_traded_entity_certification + * Gets id * - * @return bool|null + * @return string|null */ - public function getNffeAffiliateOfPubliclyTradedEntityCertification() + public function getId() { - return $this->container['nffe_affiliate_of_publicly_traded_entity_certification']; + return $this->container['id']; } /** - * Sets nffe_affiliate_of_publicly_traded_entity_certification + * Sets id * - * @param bool|null $nffe_affiliate_of_publicly_traded_entity_certification Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. + * @param string|null $id The unique identifier for the form. * * @return self */ - public function setNffeAffiliateOfPubliclyTradedEntityCertification($nffe_affiliate_of_publicly_traded_entity_certification) + public function setId($id) { - $this->container['nffe_affiliate_of_publicly_traded_entity_certification'] = $nffe_affiliate_of_publicly_traded_entity_certification; + $this->container['id'] = $id; return $this; } /** - * Gets publicly_traded_entity + * Gets entry_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\EntryStatusResponse|null */ - public function getPubliclyTradedEntity() + public function getEntryStatus() { - return $this->container['publicly_traded_entity']; + return $this->container['entry_status']; } /** - * Sets publicly_traded_entity + * Sets entry_status * - * @param string|null $publicly_traded_entity The name of the affiliated entity whose stock is regularly traded on an established securities market. + * @param \Avalara\SDK\Model\A1099\V2\EntryStatusResponse|null $entry_status The entry status information for the form. * * @return self */ - public function setPubliclyTradedEntity($publicly_traded_entity) + public function setEntryStatus($entry_status) { - $this->container['publicly_traded_entity'] = $publicly_traded_entity; + $this->container['entry_status'] = $entry_status; return $this; } /** - * Gets nffe_affiliate_of_publicly_traded_entity_securities_market + * Gets reference_id * * @return string|null */ - public function getNffeAffiliateOfPubliclyTradedEntitySecuritiesMarket() + public function getReferenceId() { - return $this->container['nffe_affiliate_of_publicly_traded_entity_securities_market']; + return $this->container['reference_id']; } /** - * Sets nffe_affiliate_of_publicly_traded_entity_securities_market + * Sets reference_id * - * @param string|null $nffe_affiliate_of_publicly_traded_entity_securities_market The name of the established securities market where the affiliated entity's stock is traded. + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setNffeAffiliateOfPubliclyTradedEntitySecuritiesMarket($nffe_affiliate_of_publicly_traded_entity_securities_market) + public function setReferenceId($reference_id) { - $this->container['nffe_affiliate_of_publicly_traded_entity_securities_market'] = $nffe_affiliate_of_publicly_traded_entity_securities_market; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets excepted_territory_nffe_certification + * Gets company_id * - * @return bool|null + * @return string|null */ - public function getExceptedTerritoryNffeCertification() + public function getCompanyId() { - return $this->container['excepted_territory_nffe_certification']; + return $this->container['company_id']; } /** - * Sets excepted_territory_nffe_certification + * Sets company_id * - * @param bool|null $excepted_territory_nffe_certification Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession. + * @param string|null $company_id The ID of the associated company. * * @return self */ - public function setExceptedTerritoryNffeCertification($excepted_territory_nffe_certification) + public function setCompanyId($company_id) { - $this->container['excepted_territory_nffe_certification'] = $excepted_territory_nffe_certification; + $this->container['company_id'] = $company_id; return $this; } /** - * Gets active_nffe_certification + * Gets display_name * - * @return bool|null + * @return string|null */ - public function getActiveNffeCertification() + public function getDisplayName() { - return $this->container['active_nffe_certification']; + return $this->container['display_name']; } /** - * Sets active_nffe_certification + * Sets display_name * - * @param bool|null $active_nffe_certification Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income. + * @param string|null $display_name The display name associated with the form. * * @return self */ - public function setActiveNffeCertification($active_nffe_certification) + public function setDisplayName($display_name) { - $this->container['active_nffe_certification'] = $active_nffe_certification; + $this->container['display_name'] = $display_name; return $this; } /** - * Gets passive_nffe_certification + * Gets email * - * @return bool|null + * @return string|null */ - public function getPassiveNffeCertification() + public function getEmail() { - return $this->container['passive_nffe_certification']; + return $this->container['email']; } /** - * Sets passive_nffe_certification + * Sets email * - * @param bool|null $passive_nffe_certification Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution. + * @param string|null $email The email address of the individual associated with the form. * * @return self */ - public function setPassiveNffeCertification($passive_nffe_certification) + public function setEmail($email) { - $this->container['passive_nffe_certification'] = $passive_nffe_certification; + $this->container['email'] = $email; return $this; } /** - * Gets passive_nffe_no_substantial_us_owners_certification + * Gets archived * * @return bool|null */ - public function getPassiveNffeNoSubstantialUsOwnersCertification() + public function getArchived() { - return $this->container['passive_nffe_no_substantial_us_owners_certification']; + return $this->container['archived']; } /** - * Sets passive_nffe_no_substantial_us_owners_certification + * Sets archived * - * @param bool|null $passive_nffe_no_substantial_us_owners_certification Certifies that the passive NFFE has no substantial U.S. owners or controlling U.S. persons. + * @param bool|null $archived Indicates whether the form is archived. * * @return self */ - public function setPassiveNffeNoSubstantialUsOwnersCertification($passive_nffe_no_substantial_us_owners_certification) + public function setArchived($archived) { - $this->container['passive_nffe_no_substantial_us_owners_certification'] = $passive_nffe_no_substantial_us_owners_certification; + $this->container['archived'] = $archived; return $this; } /** - * Gets passive_nffe_substantial_us_owners_provided_certification + * Gets ancestor_id * - * @return bool|null + * @return string|null */ - public function getPassiveNffeSubstantialUsOwnersProvidedCertification() + public function getAncestorId() { - return $this->container['passive_nffe_substantial_us_owners_provided_certification']; + return $this->container['ancestor_id']; } /** - * Sets passive_nffe_substantial_us_owners_provided_certification + * Sets ancestor_id * - * @param bool|null $passive_nffe_substantial_us_owners_provided_certification Certifies that the passive NFFE has provided the name, address, and TIN of each substantial U.S. owner or controlling U.S. person. + * @param string|null $ancestor_id Form ID of previous version. * * @return self */ - public function setPassiveNffeSubstantialUsOwnersProvidedCertification($passive_nffe_substantial_us_owners_provided_certification) + public function setAncestorId($ancestor_id) { - $this->container['passive_nffe_substantial_us_owners_provided_certification'] = $passive_nffe_substantial_us_owners_provided_certification; + $this->container['ancestor_id'] = $ancestor_id; return $this; } /** - * Gets excepted_inter_affiliate_ffi_certification + * Gets signature * - * @return bool|null + * @return string|null */ - public function getExceptedInterAffiliateFfiCertification() + public function getSignature() { - return $this->container['excepted_inter_affiliate_ffi_certification']; + return $this->container['signature']; } /** - * Sets excepted_inter_affiliate_ffi_certification + * Sets signature * - * @param bool|null $excepted_inter_affiliate_ffi_certification Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. + * @param string|null $signature The signature of the form. * * @return self */ - public function setExceptedInterAffiliateFfiCertification($excepted_inter_affiliate_ffi_certification) + public function setSignature($signature) { - $this->container['excepted_inter_affiliate_ffi_certification'] = $excepted_inter_affiliate_ffi_certification; + $this->container['signature'] = $signature; return $this; } /** - * Gets sponsored_direct_reporting_nffe_certification + * Gets signed_date * - * @return bool|null + * @return \DateTime|null */ - public function getSponsoredDirectReportingNffeCertification() + public function getSignedDate() { - return $this->container['sponsored_direct_reporting_nffe_certification']; + return $this->container['signed_date']; } /** - * Sets sponsored_direct_reporting_nffe_certification + * Sets signed_date * - * @param bool|null $sponsored_direct_reporting_nffe_certification Certifies that the entity is a sponsored direct reporting NFFE. + * @param \DateTime|null $signed_date The date the form was signed. * * @return self */ - public function setSponsoredDirectReportingNffeCertification($sponsored_direct_reporting_nffe_certification) + public function setSignedDate($signed_date) { - $this->container['sponsored_direct_reporting_nffe_certification'] = $sponsored_direct_reporting_nffe_certification; + $this->container['signed_date'] = $signed_date; return $this; } /** - * Gets direct_reporting_nffe_sponsoring_entity + * Gets e_delivery_consented_at * - * @return string|null + * @return \DateTime|null */ - public function getDirectReportingNffeSponsoringEntity() + public function getEDeliveryConsentedAt() { - return $this->container['direct_reporting_nffe_sponsoring_entity']; + return $this->container['e_delivery_consented_at']; } /** - * Sets direct_reporting_nffe_sponsoring_entity + * Sets e_delivery_consented_at * - * @param string|null $direct_reporting_nffe_sponsoring_entity The name of the entity that sponsors the direct reporting NFFE. + * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. * * @return self */ - public function setDirectReportingNffeSponsoringEntity($direct_reporting_nffe_sponsoring_entity) + public function setEDeliveryConsentedAt($e_delivery_consented_at) { - $this->container['direct_reporting_nffe_sponsoring_entity'] = $direct_reporting_nffe_sponsoring_entity; + $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; return $this; } /** - * Gets substantial_us_owners + * Gets created_at * - * @return \Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerResponse[]|null + * @return \DateTime|null */ - public function getSubstantialUsOwners() + public function getCreatedAt() { - return $this->container['substantial_us_owners']; + return $this->container['created_at']; } /** - * Sets substantial_us_owners + * Sets created_at * - * @param \Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerResponse[]|null $substantial_us_owners The list of substantial U.S. owners of passive NFFE. + * @param \DateTime|null $created_at The creation date of the form. * * @return self */ - public function setSubstantialUsOwners($substantial_us_owners) + public function setCreatedAt($created_at) { - $this->container['substantial_us_owners'] = $substantial_us_owners; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets signer_name + * Gets updated_at * - * @return string|null + * @return \DateTime|null */ - public function getSignerName() + public function getUpdatedAt() { - return $this->container['signer_name']; + return $this->container['updated_at']; } /** - * Sets signer_name + * Sets updated_at * - * @param string|null $signer_name The name of the signer. + * @param \DateTime|null $updated_at The last updated date of the form. * * @return self */ - public function setSignerName($signer_name) + public function setUpdatedAt($updated_at) { - $this->container['signer_name'] = $signer_name; + $this->container['updated_at'] = $updated_at; return $this; } /** - * Gets capacity_to_sign_certification + * Gets type * - * @return bool|null + * @return string|null */ - public function getCapacityToSignCertification() + public function getType() { - return $this->container['capacity_to_sign_certification']; + return $this->container['type']; } /** - * Sets capacity_to_sign_certification + * Sets type * - * @param bool|null $capacity_to_sign_certification Certifies signer has the capacity to sign for the beneficial owner. + * @param string|null $type The type of the response object. * * @return self */ - public function setCapacityToSignCertification($capacity_to_sign_certification) + public function setType($type) { - $this->container['capacity_to_sign_certification'] = $capacity_to_sign_certification; + $this->container['type'] = $type; return $this; } @@ -5491,6 +5005,30 @@ public function setForeignCountryIndicator($foreign_country_indicator) return $this; } + /** + * Gets address + * + * @return string|null + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param string|null $address The address of the individual or entity. + * + * @return self + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + /** * Gets foreign_address * @@ -5515,6 +5053,78 @@ public function setForeignAddress($foreign_address) return $this; } + /** + * Gets city + * + * @return string|null + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city The city of the address. + * + * @return self + */ + public function setCity($city) + { + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state The state of the address. + * + * @return self + */ + public function setState($state) + { + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets zip + * + * @return string|null + */ + public function getZip() + { + return $this->container['zip']; + } + + /** + * Sets zip + * + * @param string|null $zip The ZIP code of the address. + * + * @return self + */ + public function setZip($zip) + { + $this->container['zip'] = $zip; + + return $this; + } + /** * Gets account_number * diff --git a/lib/Model/A1099/V2/CreateW9FormRequest.php b/lib/Model/A1099/V2/CreateW9FormRequest.php index 9fb8d90..6986fcc 100644 --- a/lib/Model/A1099/V2/CreateW9FormRequest.php +++ b/lib/Model/A1099/V2/CreateW9FormRequest.php @@ -90,11 +90,11 @@ class CreateW9FormRequest implements ModelInterface, ArrayAccess, \JsonSerializa 'tin' => 'string', 'backup_withholding' => 'bool', 'is1099able' => 'bool', + 'e_delivery_consented_at' => '\DateTime', + 'signature' => 'string', 'company_id' => 'string', 'reference_id' => 'string', 'email' => 'string', - 'e_delivery_consented_at' => '\DateTime', - 'signature' => 'string', 'citizenship_country' => 'string', 'disregarded_entity' => 'string', 'entity_type' => 'string', @@ -270,11 +270,11 @@ class CreateW9FormRequest implements ModelInterface, ArrayAccess, \JsonSerializa 'tin' => null, 'backup_withholding' => null, 'is1099able' => null, + 'e_delivery_consented_at' => 'date-time', + 'signature' => null, 'company_id' => null, 'reference_id' => null, 'email' => null, - 'e_delivery_consented_at' => 'date-time', - 'signature' => null, 'citizenship_country' => null, 'disregarded_entity' => null, 'entity_type' => null, @@ -469,11 +469,11 @@ public static function openAPIFormats() 'tin' => 'tin', 'backup_withholding' => 'backupWithholding', 'is1099able' => 'is1099able', + 'e_delivery_consented_at' => 'eDeliveryConsentedAt', + 'signature' => 'signature', 'company_id' => 'companyId', 'reference_id' => 'referenceId', 'email' => 'email', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'signature' => 'signature', 'citizenship_country' => 'citizenshipCountry', 'disregarded_entity' => 'disregardedEntity', 'entity_type' => 'entityType', @@ -647,11 +647,11 @@ public static function openAPIFormats() 'tin' => 'setTin', 'backup_withholding' => 'setBackupWithholding', 'is1099able' => 'setIs1099able', + 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', + 'signature' => 'setSignature', 'company_id' => 'setCompanyId', 'reference_id' => 'setReferenceId', 'email' => 'setEmail', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'signature' => 'setSignature', 'citizenship_country' => 'setCitizenshipCountry', 'disregarded_entity' => 'setDisregardedEntity', 'entity_type' => 'setEntityType', @@ -825,11 +825,11 @@ public static function openAPIFormats() 'tin' => 'getTin', 'backup_withholding' => 'getBackupWithholding', 'is1099able' => 'getIs1099able', + 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', + 'signature' => 'getSignature', 'company_id' => 'getCompanyId', 'reference_id' => 'getReferenceId', 'email' => 'getEmail', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'signature' => 'getSignature', 'citizenship_country' => 'getCitizenshipCountry', 'disregarded_entity' => 'getDisregardedEntity', 'entity_type' => 'getEntityType', @@ -1075,11 +1075,11 @@ public function __construct(array $data = null) $this->container['tin'] = $data['tin'] ?? null; $this->container['backup_withholding'] = $data['backup_withholding'] ?? null; $this->container['is1099able'] = $data['is1099able'] ?? null; + $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; + $this->container['signature'] = $data['signature'] ?? null; $this->container['company_id'] = $data['company_id'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['email'] = $data['email'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; $this->container['citizenship_country'] = $data['citizenship_country'] ?? null; $this->container['disregarded_entity'] = $data['disregarded_entity'] ?? null; $this->container['entity_type'] = $data['entity_type'] ?? null; @@ -1246,6 +1246,13 @@ public function listInvalidProperties() ); } + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -1728,121 +1735,126 @@ public function setIs1099able($is1099able) } /** - * Gets company_id + * Gets e_delivery_consented_at * - * @return string|null + * @return \DateTime|null */ - public function getCompanyId() + public function getEDeliveryConsentedAt() { - return $this->container['company_id']; + return $this->container['e_delivery_consented_at']; } /** - * Sets company_id + * Sets e_delivery_consented_at * - * @param string|null $company_id The ID of the associated company. + * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. * * @return self */ - public function setCompanyId($company_id) + public function setEDeliveryConsentedAt($e_delivery_consented_at) { - $this->container['company_id'] = $company_id; + $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; return $this; } /** - * Gets reference_id + * Gets signature * * @return string|null */ - public function getReferenceId() + public function getSignature() { - return $this->container['reference_id']; + return $this->container['signature']; } /** - * Sets reference_id + * Sets signature * - * @param string|null $reference_id A reference identifier for the form. + * @param string|null $signature The signature of the form. * * @return self */ - public function setReferenceId($reference_id) + public function setSignature($signature) { - $this->container['reference_id'] = $reference_id; + $this->container['signature'] = $signature; return $this; } /** - * Gets email + * Gets company_id * - * @return string|null + * @return string */ - public function getEmail() + public function getCompanyId() { - return $this->container['email']; + return $this->container['company_id']; } /** - * Sets email + * Sets company_id * - * @param string|null $email The email address of the individual associated with the form. + * @param string $company_id The ID of the associated company. * * @return self */ - public function setEmail($email) + public function setCompanyId($company_id) { - $this->container['email'] = $email; + + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling CreateW9FormRequest., must be bigger than or equal to 1.'); + } + + $this->container['company_id'] = $company_id; return $this; } /** - * Gets e_delivery_consented_at + * Gets reference_id * - * @return \DateTime|null + * @return string|null */ - public function getEDeliveryConsentedAt() + public function getReferenceId() { - return $this->container['e_delivery_consented_at']; + return $this->container['reference_id']; } /** - * Sets e_delivery_consented_at + * Sets reference_id * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) + public function setReferenceId($reference_id) { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets signature + * Gets email * * @return string|null */ - public function getSignature() + public function getEmail() { - return $this->container['signature']; + return $this->container['email']; } /** - * Sets signature + * Sets email * - * @param string|null $signature The signature of the form. + * @param string|null $email The email address of the individual associated with the form. * * @return self */ - public function setSignature($signature) + public function setEmail($email) { - $this->container['signature'] = $signature; + $this->container['email'] = $email; return $this; } diff --git a/lib/Model/A1099/V2/StatusDetail.php b/lib/Model/A1099/V2/EntryStatusResponse.php similarity index 91% rename from lib/Model/A1099/V2/StatusDetail.php rename to lib/Model/A1099/V2/EntryStatusResponse.php index de3242f..56a1a3b 100644 --- a/lib/Model/A1099/V2/StatusDetail.php +++ b/lib/Model/A1099/V2/EntryStatusResponse.php @@ -1,6 +1,6 @@ 'string', - 'status' => 'string' + 'status' => 'string', + 'time' => '\DateTime' ]; /** @@ -83,8 +84,8 @@ class StatusDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'time' => null, - 'status' => null + 'status' => null, + 'time' => 'date-time' ]; /** @@ -114,8 +115,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'time' => 'time', - 'status' => 'status' + 'status' => 'status', + 'time' => 'time' ]; /** @@ -124,8 +125,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'time' => 'setTime', - 'status' => 'setStatus' + 'status' => 'setStatus', + 'time' => 'setTime' ]; /** @@ -134,8 +135,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'time' => 'getTime', - 'status' => 'getStatus' + 'status' => 'getStatus', + 'time' => 'getTime' ]; /** @@ -195,8 +196,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['time'] = $data['time'] ?? null; $this->container['status'] = $data['status'] ?? null; + $this->container['time'] = $data['time'] ?? null; } /** @@ -224,49 +225,49 @@ public function valid() /** - * Gets time + * Gets status * * @return string|null */ - public function getTime() + public function getStatus() { - return $this->container['time']; + return $this->container['status']; } /** - * Sets time + * Sets status * - * @param string|null $time time + * @param string|null $status The form status. * * @return self */ - public function setTime($time) + public function setStatus($status) { - $this->container['time'] = $time; + $this->container['status'] = $status; return $this; } /** - * Gets status + * Gets time * - * @return string|null + * @return \DateTime|null */ - public function getStatus() + public function getTime() { - return $this->container['status']; + return $this->container['time']; } /** - * Sets status + * Sets time * - * @param string|null $status status + * @param \DateTime|null $time The timestamp for the latest status update. * * @return self */ - public function setStatus($status) + public function setTime($time) { - $this->container['status'] = $status; + $this->container['time'] = $time; return $this; } diff --git a/lib/Model/A1099/V2/ErrorResponse.php b/lib/Model/A1099/V2/ErrorResponse.php index 7d33094..626e388 100644 --- a/lib/Model/A1099/V2/ErrorResponse.php +++ b/lib/Model/A1099/V2/ErrorResponse.php @@ -72,7 +72,7 @@ class ErrorResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'title' => 'string', - 'errors' => '\Avalara\SDK\Model\A1099\V2\ErrorResponseErrorsInner[]' + 'errors' => '\Avalara\SDK\Model\A1099\V2\ErrorResponseItem[]' ]; /** @@ -250,7 +250,7 @@ public function setTitle($title) /** * Gets errors * - * @return \Avalara\SDK\Model\A1099\V2\ErrorResponseErrorsInner[]|null + * @return \Avalara\SDK\Model\A1099\V2\ErrorResponseItem[]|null */ public function getErrors() { @@ -260,7 +260,7 @@ public function getErrors() /** * Sets errors * - * @param \Avalara\SDK\Model\A1099\V2\ErrorResponseErrorsInner[]|null $errors errors + * @param \Avalara\SDK\Model\A1099\V2\ErrorResponseItem[]|null $errors errors * * @return self */ diff --git a/lib/Model/A1099/V2/ValidationErrorResponse.php b/lib/Model/A1099/V2/ErrorResponseItem.php similarity index 86% rename from lib/Model/A1099/V2/ValidationErrorResponse.php rename to lib/Model/A1099/V2/ErrorResponseItem.php index a48af0a..bb1efc7 100644 --- a/lib/Model/A1099/V2/ValidationErrorResponse.php +++ b/lib/Model/A1099/V2/ErrorResponseItem.php @@ -1,6 +1,6 @@ 'string', - 'errors' => 'string[]' + 'type' => 'string', + 'detail' => 'string' ]; /** @@ -83,8 +83,8 @@ class ValidationErrorResponse implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $openAPIFormats = [ - 'field' => null, - 'errors' => null + 'type' => null, + 'detail' => null ]; /** @@ -114,8 +114,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'field' => 'field', - 'errors' => 'errors' + 'type' => 'type', + 'detail' => 'detail' ]; /** @@ -124,8 +124,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'field' => 'setField', - 'errors' => 'setErrors' + 'type' => 'setType', + 'detail' => 'setDetail' ]; /** @@ -134,8 +134,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'field' => 'getField', - 'errors' => 'getErrors' + 'type' => 'getType', + 'detail' => 'getDetail' ]; /** @@ -195,8 +195,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['field'] = $data['field'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; + $this->container['type'] = $data['type'] ?? null; + $this->container['detail'] = $data['detail'] ?? null; } /** @@ -224,51 +224,49 @@ public function valid() /** - * Gets field + * Gets type * * @return string|null */ - public function getField() + public function getType() { - return $this->container['field']; + return $this->container['type']; } /** - * Sets field + * Sets type * - * @param string|null $field The field containing the error + * @param string|null $type type * * @return self */ - public function setField($field) + public function setType($type) { - $this->container['field'] = $field; + $this->container['type'] = $type; return $this; } /** - * Gets errors + * Gets detail * - * @return string[]|null + * @return string|null */ - public function getErrors() + public function getDetail() { - return $this->container['errors']; + return $this->container['detail']; } /** - * Sets errors + * Sets detail * - * @param string[]|null $errors The list of error messages + * @param string|null $detail detail * * @return self */ - public function setErrors($errors) + public function setDetail($detail) { - - - $this->container['errors'] = $errors; + $this->container['detail'] = $detail; return $this; } diff --git a/lib/Model/A1099/V2/Form1042SListItemResponse.php b/lib/Model/A1099/V2/Form1042S.php similarity index 52% rename from lib/Model/A1099/V2/Form1042SListItemResponse.php rename to lib/Model/A1099/V2/Form1042S.php index 75976af..225d26f 100644 --- a/lib/Model/A1099/V2/Form1042SListItemResponse.php +++ b/lib/Model/A1099/V2/Form1042S.php @@ -1,6 +1,6 @@ 'string', 'unique_form_id' => 'string', - 'no_tin' => 'bool', 'recipient_date_of_birth' => '\DateTime', 'recipient_giin' => 'string', 'recipient_foreign_tin' => 'string', @@ -93,30 +94,16 @@ class Form1042SListItemResponse implements ModelInterface, ArrayAccess, \JsonSer 'tax_paid_agent' => 'float', 'chap3_status_code' => 'string', 'chap4_status_code' => 'string', - 'primary_withholding_agent' => '\Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentResponse', - 'intermediary_or_flow_through' => '\Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughResponse', - 'id' => 'string', + 'primary_withholding_agent' => '\Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgent', + 'intermediary_or_flow_through' => '\Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThrough', 'type' => 'string', - 'issuer_id' => 'int', + 'id' => 'string', + 'issuer_id' => 'string', 'issuer_reference_id' => 'string', 'issuer_tin' => 'string', 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', 'tin' => 'string', - 'second_tin_notice' => 'bool', 'recipient_name' => 'string', 'recipient_second_name' => 'string', 'address' => 'string', @@ -124,15 +111,29 @@ class Form1042SListItemResponse implements ModelInterface, ArrayAccess, \JsonSer 'city' => 'string', 'state' => 'string', 'zip' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', + 'email' => 'string', 'account_number' => 'string', 'office_code' => 'string', - 'fatca_filing_requirement' => 'bool', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]', + 'non_us_province' => 'string', + 'country_code' => 'string', + 'federal_efile_date' => '\DateTime', + 'postal_mail' => 'bool', + 'state_efile_date' => '\DateTime', + 'recipient_edelivery_date' => '\DateTime', + 'tin_match' => 'bool', + 'no_tin' => 'bool', + 'address_verification' => 'bool', + 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding', + 'second_tin_notice' => 'bool', + 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', + 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationError[]', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse' + 'updated_at' => '\DateTime' ]; /** @@ -143,9 +144,9 @@ class Form1042SListItemResponse implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ + 'tin_type' => null, 'unique_form_id' => null, - 'no_tin' => null, - 'recipient_date_of_birth' => 'date-time', + 'recipient_date_of_birth' => 'date', 'recipient_giin' => null, 'recipient_foreign_tin' => null, 'lob_code' => null, @@ -167,28 +168,14 @@ class Form1042SListItemResponse implements ModelInterface, ArrayAccess, \JsonSer 'chap4_status_code' => null, 'primary_withholding_agent' => null, 'intermediary_or_flow_through' => null, - 'id' => null, 'type' => null, - 'issuer_id' => 'int32', + 'id' => null, + 'issuer_id' => null, 'issuer_reference_id' => null, 'issuer_tin' => null, 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, - 'e_delivery_status' => null, 'reference_id' => null, - 'email' => null, - 'tin_type' => null, 'tin' => null, - 'second_tin_notice' => null, 'recipient_name' => null, 'recipient_second_name' => null, 'address' => null, @@ -196,15 +183,29 @@ class Form1042SListItemResponse implements ModelInterface, ArrayAccess, \JsonSer 'city' => null, 'state' => null, 'zip' => null, - 'non_us_province' => null, - 'country_code' => null, + 'email' => null, 'account_number' => null, 'office_code' => null, - 'fatca_filing_requirement' => null, + 'non_us_province' => null, + 'country_code' => null, + 'federal_efile_date' => 'date', + 'postal_mail' => null, + 'state_efile_date' => 'date', + 'recipient_edelivery_date' => 'date', + 'tin_match' => null, + 'no_tin' => null, + 'address_verification' => null, + 'state_and_local_withholding' => null, + 'second_tin_notice' => null, + 'federal_efile_status' => null, + 'state_efile_status' => null, + 'postal_mail_status' => null, + 'tin_match_status' => null, + 'address_verification_status' => null, + 'e_delivery_status' => null, 'validation_errors' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null + 'updated_at' => 'date-time' ]; /** @@ -234,8 +235,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'tin_type' => 'tinType', 'unique_form_id' => 'uniqueFormId', - 'no_tin' => 'noTin', 'recipient_date_of_birth' => 'recipientDateOfBirth', 'recipient_giin' => 'recipientGiin', 'recipient_foreign_tin' => 'recipientForeignTin', @@ -258,28 +259,14 @@ public static function openAPIFormats() 'chap4_status_code' => 'chap4StatusCode', 'primary_withholding_agent' => 'primaryWithholdingAgent', 'intermediary_or_flow_through' => 'intermediaryOrFlowThrough', - 'id' => 'id', 'type' => 'type', + 'id' => 'id', 'issuer_id' => 'issuerId', 'issuer_reference_id' => 'issuerReferenceId', 'issuer_tin' => 'issuerTin', 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', - 'e_delivery_status' => 'eDeliveryStatus', 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', 'tin' => 'tin', - 'second_tin_notice' => 'secondTinNotice', 'recipient_name' => 'recipientName', 'recipient_second_name' => 'recipientSecondName', 'address' => 'address', @@ -287,15 +274,29 @@ public static function openAPIFormats() 'city' => 'city', 'state' => 'state', 'zip' => 'zip', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', + 'email' => 'email', 'account_number' => 'accountNumber', 'office_code' => 'officeCode', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', + 'non_us_province' => 'nonUsProvince', + 'country_code' => 'countryCode', + 'federal_efile_date' => 'federalEfileDate', + 'postal_mail' => 'postalMail', + 'state_efile_date' => 'stateEfileDate', + 'recipient_edelivery_date' => 'recipientEdeliveryDate', + 'tin_match' => 'tinMatch', + 'no_tin' => 'noTin', + 'address_verification' => 'addressVerification', + 'state_and_local_withholding' => 'stateAndLocalWithholding', + 'second_tin_notice' => 'secondTinNotice', + 'federal_efile_status' => 'federalEfileStatus', + 'state_efile_status' => 'stateEfileStatus', + 'postal_mail_status' => 'postalMailStatus', + 'tin_match_status' => 'tinMatchStatus', + 'address_verification_status' => 'addressVerificationStatus', + 'e_delivery_status' => 'eDeliveryStatus', 'validation_errors' => 'validationErrors', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' + 'updated_at' => 'updatedAt' ]; /** @@ -304,8 +305,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'tin_type' => 'setTinType', 'unique_form_id' => 'setUniqueFormId', - 'no_tin' => 'setNoTin', 'recipient_date_of_birth' => 'setRecipientDateOfBirth', 'recipient_giin' => 'setRecipientGiin', 'recipient_foreign_tin' => 'setRecipientForeignTin', @@ -328,28 +329,14 @@ public static function openAPIFormats() 'chap4_status_code' => 'setChap4StatusCode', 'primary_withholding_agent' => 'setPrimaryWithholdingAgent', 'intermediary_or_flow_through' => 'setIntermediaryOrFlowThrough', - 'id' => 'setId', 'type' => 'setType', + 'id' => 'setId', 'issuer_id' => 'setIssuerId', 'issuer_reference_id' => 'setIssuerReferenceId', 'issuer_tin' => 'setIssuerTin', 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', - 'e_delivery_status' => 'setEDeliveryStatus', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', 'tin' => 'setTin', - 'second_tin_notice' => 'setSecondTinNotice', 'recipient_name' => 'setRecipientName', 'recipient_second_name' => 'setRecipientSecondName', 'address' => 'setAddress', @@ -357,15 +344,29 @@ public static function openAPIFormats() 'city' => 'setCity', 'state' => 'setState', 'zip' => 'setZip', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', + 'email' => 'setEmail', 'account_number' => 'setAccountNumber', 'office_code' => 'setOfficeCode', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', + 'non_us_province' => 'setNonUsProvince', + 'country_code' => 'setCountryCode', + 'federal_efile_date' => 'setFederalEfileDate', + 'postal_mail' => 'setPostalMail', + 'state_efile_date' => 'setStateEfileDate', + 'recipient_edelivery_date' => 'setRecipientEdeliveryDate', + 'tin_match' => 'setTinMatch', + 'no_tin' => 'setNoTin', + 'address_verification' => 'setAddressVerification', + 'state_and_local_withholding' => 'setStateAndLocalWithholding', + 'second_tin_notice' => 'setSecondTinNotice', + 'federal_efile_status' => 'setFederalEfileStatus', + 'state_efile_status' => 'setStateEfileStatus', + 'postal_mail_status' => 'setPostalMailStatus', + 'tin_match_status' => 'setTinMatchStatus', + 'address_verification_status' => 'setAddressVerificationStatus', + 'e_delivery_status' => 'setEDeliveryStatus', 'validation_errors' => 'setValidationErrors', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' + 'updated_at' => 'setUpdatedAt' ]; /** @@ -374,8 +375,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'tin_type' => 'getTinType', 'unique_form_id' => 'getUniqueFormId', - 'no_tin' => 'getNoTin', 'recipient_date_of_birth' => 'getRecipientDateOfBirth', 'recipient_giin' => 'getRecipientGiin', 'recipient_foreign_tin' => 'getRecipientForeignTin', @@ -398,28 +399,14 @@ public static function openAPIFormats() 'chap4_status_code' => 'getChap4StatusCode', 'primary_withholding_agent' => 'getPrimaryWithholdingAgent', 'intermediary_or_flow_through' => 'getIntermediaryOrFlowThrough', - 'id' => 'getId', 'type' => 'getType', + 'id' => 'getId', 'issuer_id' => 'getIssuerId', 'issuer_reference_id' => 'getIssuerReferenceId', 'issuer_tin' => 'getIssuerTin', 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', - 'e_delivery_status' => 'getEDeliveryStatus', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', 'tin' => 'getTin', - 'second_tin_notice' => 'getSecondTinNotice', 'recipient_name' => 'getRecipientName', 'recipient_second_name' => 'getRecipientSecondName', 'address' => 'getAddress', @@ -427,15 +414,29 @@ public static function openAPIFormats() 'city' => 'getCity', 'state' => 'getState', 'zip' => 'getZip', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', + 'email' => 'getEmail', 'account_number' => 'getAccountNumber', 'office_code' => 'getOfficeCode', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', + 'non_us_province' => 'getNonUsProvince', + 'country_code' => 'getCountryCode', + 'federal_efile_date' => 'getFederalEfileDate', + 'postal_mail' => 'getPostalMail', + 'state_efile_date' => 'getStateEfileDate', + 'recipient_edelivery_date' => 'getRecipientEdeliveryDate', + 'tin_match' => 'getTinMatch', + 'no_tin' => 'getNoTin', + 'address_verification' => 'getAddressVerification', + 'state_and_local_withholding' => 'getStateAndLocalWithholding', + 'second_tin_notice' => 'getSecondTinNotice', + 'federal_efile_status' => 'getFederalEfileStatus', + 'state_efile_status' => 'getStateEfileStatus', + 'postal_mail_status' => 'getPostalMailStatus', + 'tin_match_status' => 'getTinMatchStatus', + 'address_verification_status' => 'getAddressVerificationStatus', + 'e_delivery_status' => 'getEDeliveryStatus', 'validation_errors' => 'getValidationErrors', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' + 'updated_at' => 'getUpdatedAt' ]; /** @@ -479,6 +480,548 @@ public function getModelName() return self::$openAPIModelName; } + const TIN_TYPE__EMPTY = 'Empty'; + const TIN_TYPE_EIN = 'EIN'; + const TIN_TYPE_SSN = 'SSN'; + const TIN_TYPE_ITIN = 'ITIN'; + const TIN_TYPE_ATIN = 'ATIN'; + const LOB_CODE__01 = '01'; + const LOB_CODE__02 = '02'; + const LOB_CODE__03 = '03'; + const LOB_CODE__04 = '04'; + const LOB_CODE__05 = '05'; + const LOB_CODE__06 = '06'; + const LOB_CODE__07 = '07'; + const LOB_CODE__08 = '08'; + const LOB_CODE__09 = '09'; + const LOB_CODE__10 = '10'; + const LOB_CODE__11 = '11'; + const LOB_CODE__12 = '12'; + const INCOME_CODE__01 = '01'; + const INCOME_CODE__02 = '02'; + const INCOME_CODE__03 = '03'; + const INCOME_CODE__04 = '04'; + const INCOME_CODE__05 = '05'; + const INCOME_CODE__22 = '22'; + const INCOME_CODE__29 = '29'; + const INCOME_CODE__30 = '30'; + const INCOME_CODE__31 = '31'; + const INCOME_CODE__33 = '33'; + const INCOME_CODE__51 = '51'; + const INCOME_CODE__54 = '54'; + const INCOME_CODE__06 = '06'; + const INCOME_CODE__07 = '07'; + const INCOME_CODE__08 = '08'; + const INCOME_CODE__34 = '34'; + const INCOME_CODE__40 = '40'; + const INCOME_CODE__52 = '52'; + const INCOME_CODE__53 = '53'; + const INCOME_CODE__56 = '56'; + const INCOME_CODE__09 = '09'; + const INCOME_CODE__10 = '10'; + const INCOME_CODE__11 = '11'; + const INCOME_CODE__12 = '12'; + const INCOME_CODE__13 = '13'; + const INCOME_CODE__14 = '14'; + const INCOME_CODE__15 = '15'; + const INCOME_CODE__16 = '16'; + const INCOME_CODE__17 = '17'; + const INCOME_CODE__18 = '18'; + const INCOME_CODE__19 = '19'; + const INCOME_CODE__20 = '20'; + const INCOME_CODE__23 = '23'; + const INCOME_CODE__24 = '24'; + const INCOME_CODE__25 = '25'; + const INCOME_CODE__26 = '26'; + const INCOME_CODE__27 = '27'; + const INCOME_CODE__28 = '28'; + const INCOME_CODE__32 = '32'; + const INCOME_CODE__35 = '35'; + const INCOME_CODE__36 = '36'; + const INCOME_CODE__37 = '37'; + const INCOME_CODE__38 = '38'; + const INCOME_CODE__39 = '39'; + const INCOME_CODE__41 = '41'; + const INCOME_CODE__42 = '42'; + const INCOME_CODE__43 = '43'; + const INCOME_CODE__44 = '44'; + const INCOME_CODE__50 = '50'; + const INCOME_CODE__55 = '55'; + const INCOME_CODE__57 = '57'; + const INCOME_CODE__58 = '58'; + const WITHHOLDING_INDICATOR__3 = '3'; + const WITHHOLDING_INDICATOR__4 = '4'; + const EXEMPTION_CODE_CHAP3__00 = '00'; + const EXEMPTION_CODE_CHAP3__01 = '01'; + const EXEMPTION_CODE_CHAP3__02 = '02'; + const EXEMPTION_CODE_CHAP3__03 = '03'; + const EXEMPTION_CODE_CHAP3__04 = '04'; + const EXEMPTION_CODE_CHAP3__05 = '05'; + const EXEMPTION_CODE_CHAP3__06 = '06'; + const EXEMPTION_CODE_CHAP3__07 = '07'; + const EXEMPTION_CODE_CHAP3__08 = '08'; + const EXEMPTION_CODE_CHAP3__09 = '09'; + const EXEMPTION_CODE_CHAP3__10 = '10'; + const EXEMPTION_CODE_CHAP3__11 = '11'; + const EXEMPTION_CODE_CHAP3__12 = '12'; + const EXEMPTION_CODE_CHAP3__22 = '22'; + const EXEMPTION_CODE_CHAP3__23 = '23'; + const EXEMPTION_CODE_CHAP3__24 = '24'; + const EXEMPTION_CODE_CHAP4__00 = '00'; + const EXEMPTION_CODE_CHAP4__13 = '13'; + const EXEMPTION_CODE_CHAP4__14 = '14'; + const EXEMPTION_CODE_CHAP4__15 = '15'; + const EXEMPTION_CODE_CHAP4__16 = '16'; + const EXEMPTION_CODE_CHAP4__17 = '17'; + const EXEMPTION_CODE_CHAP4__18 = '18'; + const EXEMPTION_CODE_CHAP4__19 = '19'; + const EXEMPTION_CODE_CHAP4__20 = '20'; + const EXEMPTION_CODE_CHAP4__21 = '21'; + const TAX_RATE_CHAP3__00_00 = '00.00'; + const TAX_RATE_CHAP3__02_00 = '02.00'; + const TAX_RATE_CHAP3__04_00 = '04.00'; + const TAX_RATE_CHAP3__04_90 = '04.90'; + const TAX_RATE_CHAP3__04_95 = '04.95'; + const TAX_RATE_CHAP3__05_00 = '05.00'; + const TAX_RATE_CHAP3__07_00 = '07.00'; + const TAX_RATE_CHAP3__08_00 = '08.00'; + const TAX_RATE_CHAP3__10_00 = '10.00'; + const TAX_RATE_CHAP3__12_00 = '12.00'; + const TAX_RATE_CHAP3__12_50 = '12.50'; + const TAX_RATE_CHAP3__14_00 = '14.00'; + const TAX_RATE_CHAP3__15_00 = '15.00'; + const TAX_RATE_CHAP3__17_50 = '17.50'; + const TAX_RATE_CHAP3__20_00 = '20.00'; + const TAX_RATE_CHAP3__21_00 = '21.00'; + const TAX_RATE_CHAP3__24_00 = '24.00'; + const TAX_RATE_CHAP3__25_00 = '25.00'; + const TAX_RATE_CHAP3__27_50 = '27.50'; + const TAX_RATE_CHAP3__28_00 = '28.00'; + const TAX_RATE_CHAP3__30_00 = '30.00'; + const TAX_RATE_CHAP3__37_00 = '37.00'; + const CHAP3_STATUS_CODE__01 = '01'; + const CHAP3_STATUS_CODE__02 = '02'; + const CHAP3_STATUS_CODE__34 = '34'; + const CHAP3_STATUS_CODE__03 = '03'; + const CHAP3_STATUS_CODE__04 = '04'; + const CHAP3_STATUS_CODE__05 = '05'; + const CHAP3_STATUS_CODE__06 = '06'; + const CHAP3_STATUS_CODE__07 = '07'; + const CHAP3_STATUS_CODE__08 = '08'; + const CHAP3_STATUS_CODE__09 = '09'; + const CHAP3_STATUS_CODE__10 = '10'; + const CHAP3_STATUS_CODE__11 = '11'; + const CHAP3_STATUS_CODE__12 = '12'; + const CHAP3_STATUS_CODE__13 = '13'; + const CHAP3_STATUS_CODE__14 = '14'; + const CHAP3_STATUS_CODE__15 = '15'; + const CHAP3_STATUS_CODE__16 = '16'; + const CHAP3_STATUS_CODE__17 = '17'; + const CHAP3_STATUS_CODE__18 = '18'; + const CHAP3_STATUS_CODE__19 = '19'; + const CHAP3_STATUS_CODE__20 = '20'; + const CHAP3_STATUS_CODE__21 = '21'; + const CHAP3_STATUS_CODE__22 = '22'; + const CHAP3_STATUS_CODE__23 = '23'; + const CHAP3_STATUS_CODE__24 = '24'; + const CHAP3_STATUS_CODE__25 = '25'; + const CHAP3_STATUS_CODE__26 = '26'; + const CHAP3_STATUS_CODE__27 = '27'; + const CHAP3_STATUS_CODE__28 = '28'; + const CHAP3_STATUS_CODE__29 = '29'; + const CHAP3_STATUS_CODE__30 = '30'; + const CHAP3_STATUS_CODE__31 = '31'; + const CHAP3_STATUS_CODE__32 = '32'; + const CHAP3_STATUS_CODE__35 = '35'; + const CHAP3_STATUS_CODE__36 = '36'; + const CHAP3_STATUS_CODE__37 = '37'; + const CHAP3_STATUS_CODE__38 = '38'; + const CHAP3_STATUS_CODE__39 = '39'; + const CHAP4_STATUS_CODE__01 = '01'; + const CHAP4_STATUS_CODE__02 = '02'; + const CHAP4_STATUS_CODE__03 = '03'; + const CHAP4_STATUS_CODE__04 = '04'; + const CHAP4_STATUS_CODE__05 = '05'; + const CHAP4_STATUS_CODE__06 = '06'; + const CHAP4_STATUS_CODE__07 = '07'; + const CHAP4_STATUS_CODE__08 = '08'; + const CHAP4_STATUS_CODE__09 = '09'; + const CHAP4_STATUS_CODE__10 = '10'; + const CHAP4_STATUS_CODE__11 = '11'; + const CHAP4_STATUS_CODE__12 = '12'; + const CHAP4_STATUS_CODE__13 = '13'; + const CHAP4_STATUS_CODE__14 = '14'; + const CHAP4_STATUS_CODE__15 = '15'; + const CHAP4_STATUS_CODE__16 = '16'; + const CHAP4_STATUS_CODE__17 = '17'; + const CHAP4_STATUS_CODE__18 = '18'; + const CHAP4_STATUS_CODE__19 = '19'; + const CHAP4_STATUS_CODE__20 = '20'; + const CHAP4_STATUS_CODE__21 = '21'; + const CHAP4_STATUS_CODE__22 = '22'; + const CHAP4_STATUS_CODE__23 = '23'; + const CHAP4_STATUS_CODE__24 = '24'; + const CHAP4_STATUS_CODE__25 = '25'; + const CHAP4_STATUS_CODE__26 = '26'; + const CHAP4_STATUS_CODE__27 = '27'; + const CHAP4_STATUS_CODE__28 = '28'; + const CHAP4_STATUS_CODE__29 = '29'; + const CHAP4_STATUS_CODE__30 = '30'; + const CHAP4_STATUS_CODE__31 = '31'; + const CHAP4_STATUS_CODE__32 = '32'; + const CHAP4_STATUS_CODE__33 = '33'; + const CHAP4_STATUS_CODE__34 = '34'; + const CHAP4_STATUS_CODE__35 = '35'; + const CHAP4_STATUS_CODE__36 = '36'; + const CHAP4_STATUS_CODE__37 = '37'; + const CHAP4_STATUS_CODE__38 = '38'; + const CHAP4_STATUS_CODE__39 = '39'; + const CHAP4_STATUS_CODE__40 = '40'; + const CHAP4_STATUS_CODE__41 = '41'; + const CHAP4_STATUS_CODE__42 = '42'; + const CHAP4_STATUS_CODE__43 = '43'; + const CHAP4_STATUS_CODE__44 = '44'; + const CHAP4_STATUS_CODE__45 = '45'; + const CHAP4_STATUS_CODE__46 = '46'; + const CHAP4_STATUS_CODE__47 = '47'; + const CHAP4_STATUS_CODE__48 = '48'; + const CHAP4_STATUS_CODE__49 = '49'; + const CHAP4_STATUS_CODE__50 = '50'; + const TYPE__1099_NEC = '1099-NEC'; + const TYPE__1099_MISC = '1099-MISC'; + const TYPE__1099_DIV = '1099-DIV'; + const TYPE__1099_R = '1099-R'; + const TYPE__1099_K = '1099-K'; + const TYPE__1095_B = '1095-B'; + const TYPE__1042_S = '1042-S'; + const TYPE__1095_C = '1095-C'; + const TYPE__1099_INT = '1099-INT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTinTypeAllowableValues() + { + return [ + self::TIN_TYPE__EMPTY, + self::TIN_TYPE_EIN, + self::TIN_TYPE_SSN, + self::TIN_TYPE_ITIN, + self::TIN_TYPE_ATIN, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLobCodeAllowableValues() + { + return [ + self::LOB_CODE__01, + self::LOB_CODE__02, + self::LOB_CODE__03, + self::LOB_CODE__04, + self::LOB_CODE__05, + self::LOB_CODE__06, + self::LOB_CODE__07, + self::LOB_CODE__08, + self::LOB_CODE__09, + self::LOB_CODE__10, + self::LOB_CODE__11, + self::LOB_CODE__12, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIncomeCodeAllowableValues() + { + return [ + self::INCOME_CODE__01, + self::INCOME_CODE__02, + self::INCOME_CODE__03, + self::INCOME_CODE__04, + self::INCOME_CODE__05, + self::INCOME_CODE__22, + self::INCOME_CODE__29, + self::INCOME_CODE__30, + self::INCOME_CODE__31, + self::INCOME_CODE__33, + self::INCOME_CODE__51, + self::INCOME_CODE__54, + self::INCOME_CODE__06, + self::INCOME_CODE__07, + self::INCOME_CODE__08, + self::INCOME_CODE__34, + self::INCOME_CODE__40, + self::INCOME_CODE__52, + self::INCOME_CODE__53, + self::INCOME_CODE__56, + self::INCOME_CODE__09, + self::INCOME_CODE__10, + self::INCOME_CODE__11, + self::INCOME_CODE__12, + self::INCOME_CODE__13, + self::INCOME_CODE__14, + self::INCOME_CODE__15, + self::INCOME_CODE__16, + self::INCOME_CODE__17, + self::INCOME_CODE__18, + self::INCOME_CODE__19, + self::INCOME_CODE__20, + self::INCOME_CODE__23, + self::INCOME_CODE__24, + self::INCOME_CODE__25, + self::INCOME_CODE__26, + self::INCOME_CODE__27, + self::INCOME_CODE__28, + self::INCOME_CODE__32, + self::INCOME_CODE__35, + self::INCOME_CODE__36, + self::INCOME_CODE__37, + self::INCOME_CODE__38, + self::INCOME_CODE__39, + self::INCOME_CODE__41, + self::INCOME_CODE__42, + self::INCOME_CODE__43, + self::INCOME_CODE__44, + self::INCOME_CODE__50, + self::INCOME_CODE__55, + self::INCOME_CODE__57, + self::INCOME_CODE__58, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getWithholdingIndicatorAllowableValues() + { + return [ + self::WITHHOLDING_INDICATOR__3, + self::WITHHOLDING_INDICATOR__4, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getExemptionCodeChap3AllowableValues() + { + return [ + self::EXEMPTION_CODE_CHAP3__00, + self::EXEMPTION_CODE_CHAP3__01, + self::EXEMPTION_CODE_CHAP3__02, + self::EXEMPTION_CODE_CHAP3__03, + self::EXEMPTION_CODE_CHAP3__04, + self::EXEMPTION_CODE_CHAP3__05, + self::EXEMPTION_CODE_CHAP3__06, + self::EXEMPTION_CODE_CHAP3__07, + self::EXEMPTION_CODE_CHAP3__08, + self::EXEMPTION_CODE_CHAP3__09, + self::EXEMPTION_CODE_CHAP3__10, + self::EXEMPTION_CODE_CHAP3__11, + self::EXEMPTION_CODE_CHAP3__12, + self::EXEMPTION_CODE_CHAP3__22, + self::EXEMPTION_CODE_CHAP3__23, + self::EXEMPTION_CODE_CHAP3__24, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getExemptionCodeChap4AllowableValues() + { + return [ + self::EXEMPTION_CODE_CHAP4__00, + self::EXEMPTION_CODE_CHAP4__13, + self::EXEMPTION_CODE_CHAP4__14, + self::EXEMPTION_CODE_CHAP4__15, + self::EXEMPTION_CODE_CHAP4__16, + self::EXEMPTION_CODE_CHAP4__17, + self::EXEMPTION_CODE_CHAP4__18, + self::EXEMPTION_CODE_CHAP4__19, + self::EXEMPTION_CODE_CHAP4__20, + self::EXEMPTION_CODE_CHAP4__21, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTaxRateChap3AllowableValues() + { + return [ + self::TAX_RATE_CHAP3__00_00, + self::TAX_RATE_CHAP3__02_00, + self::TAX_RATE_CHAP3__04_00, + self::TAX_RATE_CHAP3__04_90, + self::TAX_RATE_CHAP3__04_95, + self::TAX_RATE_CHAP3__05_00, + self::TAX_RATE_CHAP3__07_00, + self::TAX_RATE_CHAP3__08_00, + self::TAX_RATE_CHAP3__10_00, + self::TAX_RATE_CHAP3__12_00, + self::TAX_RATE_CHAP3__12_50, + self::TAX_RATE_CHAP3__14_00, + self::TAX_RATE_CHAP3__15_00, + self::TAX_RATE_CHAP3__17_50, + self::TAX_RATE_CHAP3__20_00, + self::TAX_RATE_CHAP3__21_00, + self::TAX_RATE_CHAP3__24_00, + self::TAX_RATE_CHAP3__25_00, + self::TAX_RATE_CHAP3__27_50, + self::TAX_RATE_CHAP3__28_00, + self::TAX_RATE_CHAP3__30_00, + self::TAX_RATE_CHAP3__37_00, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChap3StatusCodeAllowableValues() + { + return [ + self::CHAP3_STATUS_CODE__01, + self::CHAP3_STATUS_CODE__02, + self::CHAP3_STATUS_CODE__34, + self::CHAP3_STATUS_CODE__03, + self::CHAP3_STATUS_CODE__04, + self::CHAP3_STATUS_CODE__05, + self::CHAP3_STATUS_CODE__06, + self::CHAP3_STATUS_CODE__07, + self::CHAP3_STATUS_CODE__08, + self::CHAP3_STATUS_CODE__09, + self::CHAP3_STATUS_CODE__10, + self::CHAP3_STATUS_CODE__11, + self::CHAP3_STATUS_CODE__12, + self::CHAP3_STATUS_CODE__13, + self::CHAP3_STATUS_CODE__14, + self::CHAP3_STATUS_CODE__15, + self::CHAP3_STATUS_CODE__16, + self::CHAP3_STATUS_CODE__17, + self::CHAP3_STATUS_CODE__18, + self::CHAP3_STATUS_CODE__19, + self::CHAP3_STATUS_CODE__20, + self::CHAP3_STATUS_CODE__21, + self::CHAP3_STATUS_CODE__22, + self::CHAP3_STATUS_CODE__23, + self::CHAP3_STATUS_CODE__24, + self::CHAP3_STATUS_CODE__25, + self::CHAP3_STATUS_CODE__26, + self::CHAP3_STATUS_CODE__27, + self::CHAP3_STATUS_CODE__28, + self::CHAP3_STATUS_CODE__29, + self::CHAP3_STATUS_CODE__30, + self::CHAP3_STATUS_CODE__31, + self::CHAP3_STATUS_CODE__32, + self::CHAP3_STATUS_CODE__35, + self::CHAP3_STATUS_CODE__36, + self::CHAP3_STATUS_CODE__37, + self::CHAP3_STATUS_CODE__38, + self::CHAP3_STATUS_CODE__39, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChap4StatusCodeAllowableValues() + { + return [ + self::CHAP4_STATUS_CODE__01, + self::CHAP4_STATUS_CODE__02, + self::CHAP4_STATUS_CODE__03, + self::CHAP4_STATUS_CODE__04, + self::CHAP4_STATUS_CODE__05, + self::CHAP4_STATUS_CODE__06, + self::CHAP4_STATUS_CODE__07, + self::CHAP4_STATUS_CODE__08, + self::CHAP4_STATUS_CODE__09, + self::CHAP4_STATUS_CODE__10, + self::CHAP4_STATUS_CODE__11, + self::CHAP4_STATUS_CODE__12, + self::CHAP4_STATUS_CODE__13, + self::CHAP4_STATUS_CODE__14, + self::CHAP4_STATUS_CODE__15, + self::CHAP4_STATUS_CODE__16, + self::CHAP4_STATUS_CODE__17, + self::CHAP4_STATUS_CODE__18, + self::CHAP4_STATUS_CODE__19, + self::CHAP4_STATUS_CODE__20, + self::CHAP4_STATUS_CODE__21, + self::CHAP4_STATUS_CODE__22, + self::CHAP4_STATUS_CODE__23, + self::CHAP4_STATUS_CODE__24, + self::CHAP4_STATUS_CODE__25, + self::CHAP4_STATUS_CODE__26, + self::CHAP4_STATUS_CODE__27, + self::CHAP4_STATUS_CODE__28, + self::CHAP4_STATUS_CODE__29, + self::CHAP4_STATUS_CODE__30, + self::CHAP4_STATUS_CODE__31, + self::CHAP4_STATUS_CODE__32, + self::CHAP4_STATUS_CODE__33, + self::CHAP4_STATUS_CODE__34, + self::CHAP4_STATUS_CODE__35, + self::CHAP4_STATUS_CODE__36, + self::CHAP4_STATUS_CODE__37, + self::CHAP4_STATUS_CODE__38, + self::CHAP4_STATUS_CODE__39, + self::CHAP4_STATUS_CODE__40, + self::CHAP4_STATUS_CODE__41, + self::CHAP4_STATUS_CODE__42, + self::CHAP4_STATUS_CODE__43, + self::CHAP4_STATUS_CODE__44, + self::CHAP4_STATUS_CODE__45, + self::CHAP4_STATUS_CODE__46, + self::CHAP4_STATUS_CODE__47, + self::CHAP4_STATUS_CODE__48, + self::CHAP4_STATUS_CODE__49, + self::CHAP4_STATUS_CODE__50, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE__1099_NEC, + self::TYPE__1099_MISC, + self::TYPE__1099_DIV, + self::TYPE__1099_R, + self::TYPE__1099_K, + self::TYPE__1095_B, + self::TYPE__1042_S, + self::TYPE__1095_C, + self::TYPE__1099_INT, + ]; + } /** * Associative array for storing property values @@ -495,8 +1038,8 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['unique_form_id'] = $data['unique_form_id'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; $this->container['recipient_date_of_birth'] = $data['recipient_date_of_birth'] ?? null; $this->container['recipient_giin'] = $data['recipient_giin'] ?? null; $this->container['recipient_foreign_tin'] = $data['recipient_foreign_tin'] ?? null; @@ -519,28 +1062,14 @@ public function __construct(array $data = null) $this->container['chap4_status_code'] = $data['chap4_status_code'] ?? null; $this->container['primary_withholding_agent'] = $data['primary_withholding_agent'] ?? null; $this->container['intermediary_or_flow_through'] = $data['intermediary_or_flow_through'] ?? null; - $this->container['id'] = $data['id'] ?? null; $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; $this->container['issuer_id'] = $data['issuer_id'] ?? null; $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['tin'] = $data['tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; $this->container['recipient_name'] = $data['recipient_name'] ?? null; $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; $this->container['address'] = $data['address'] ?? null; @@ -548,15 +1077,29 @@ public function __construct(array $data = null) $this->container['city'] = $data['city'] ?? null; $this->container['state'] = $data['state'] ?? null; $this->container['zip'] = $data['zip'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['email'] = $data['email'] ?? null; $this->container['account_number'] = $data['account_number'] ?? null; $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; + $this->container['non_us_province'] = $data['non_us_province'] ?? null; + $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['federal_efile_date'] = $data['federal_efile_date'] ?? null; + $this->container['postal_mail'] = $data['postal_mail'] ?? null; + $this->container['state_efile_date'] = $data['state_efile_date'] ?? null; + $this->container['recipient_edelivery_date'] = $data['recipient_edelivery_date'] ?? null; + $this->container['tin_match'] = $data['tin_match'] ?? null; + $this->container['no_tin'] = $data['no_tin'] ?? null; + $this->container['address_verification'] = $data['address_verification'] ?? null; + $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; + $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; + $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; + $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; + $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; + $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; + $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; + $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['validation_errors'] = $data['validation_errors'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; } /** @@ -568,37 +1111,125 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tin_type', must be one of '%s'", + $this->container['tin_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['unique_form_id'] === null) { + $invalidProperties[] = "'unique_form_id' can't be null"; } - if ((mb_strlen($this->container['id']) < 1)) { - $invalidProperties[] = "invalid value for 'id', the character length must be bigger than or equal to 1."; + $allowedValues = $this->getLobCodeAllowableValues(); + if (!is_null($this->container['lob_code']) && !in_array($this->container['lob_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'lob_code', must be one of '%s'", + $this->container['lob_code'], + implode("', '", $allowedValues) + ); } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; + if ($this->container['income_code'] === null) { + $invalidProperties[] = "'income_code' can't be null"; + } + $allowedValues = $this->getIncomeCodeAllowableValues(); + if (!is_null($this->container['income_code']) && !in_array($this->container['income_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'income_code', must be one of '%s'", + $this->container['income_code'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['gross_income'] === null) { + $invalidProperties[] = "'gross_income' can't be null"; + } + if ($this->container['withholding_indicator'] === null) { + $invalidProperties[] = "'withholding_indicator' can't be null"; + } + $allowedValues = $this->getWithholdingIndicatorAllowableValues(); + if (!is_null($this->container['withholding_indicator']) && !in_array($this->container['withholding_indicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'withholding_indicator', must be one of '%s'", + $this->container['withholding_indicator'], + implode("', '", $allowedValues) + ); } - if ((mb_strlen($this->container['type']) < 1)) { - $invalidProperties[] = "invalid value for 'type', the character length must be bigger than or equal to 1."; + + if ($this->container['tax_country_code'] === null) { + $invalidProperties[] = "'tax_country_code' can't be null"; + } + $allowedValues = $this->getExemptionCodeChap3AllowableValues(); + if (!is_null($this->container['exemption_code_chap3']) && !in_array($this->container['exemption_code_chap3'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'exemption_code_chap3', must be one of '%s'", + $this->container['exemption_code_chap3'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getExemptionCodeChap4AllowableValues(); + if (!is_null($this->container['exemption_code_chap4']) && !in_array($this->container['exemption_code_chap4'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'exemption_code_chap4', must be one of '%s'", + $this->container['exemption_code_chap4'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTaxRateChap3AllowableValues(); + if (!is_null($this->container['tax_rate_chap3']) && !in_array($this->container['tax_rate_chap3'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tax_rate_chap3', must be one of '%s'", + $this->container['tax_rate_chap3'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getChap3StatusCodeAllowableValues(); + if (!is_null($this->container['chap3_status_code']) && !in_array($this->container['chap3_status_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'chap3_status_code', must be one of '%s'", + $this->container['chap3_status_code'], + implode("', '", $allowedValues) + ); } - if ($this->container['issuer_id'] === null) { - $invalidProperties[] = "'issuer_id' can't be null"; + $allowedValues = $this->getChap4StatusCodeAllowableValues(); + if (!is_null($this->container['chap4_status_code']) && !in_array($this->container['chap4_status_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'chap4_status_code', must be one of '%s'", + $this->container['chap4_status_code'], + implode("', '", $allowedValues) + ); } - if ($this->container['federal_efile'] === null) { - $invalidProperties[] = "'federal_efile' can't be null"; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); } - if ($this->container['state_efile'] === null) { - $invalidProperties[] = "'state_efile' can't be null"; + + if ($this->container['recipient_name'] === null) { + $invalidProperties[] = "'recipient_name' can't be null"; } - if ($this->container['postal_mail'] === null) { - $invalidProperties[] = "'postal_mail' can't be null"; + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; } - if ($this->container['tin_match'] === null) { - $invalidProperties[] = "'tin_match' can't be null"; + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; } - if ($this->container['address_verification'] === null) { - $invalidProperties[] = "'address_verification' can't be null"; + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; } return $invalidProperties; } @@ -616,49 +1247,59 @@ public function valid() /** - * Gets unique_form_id + * Gets tin_type * * @return string|null */ - public function getUniqueFormId() + public function getTinType() { - return $this->container['unique_form_id']; + return $this->container['tin_type']; } /** - * Sets unique_form_id + * Sets tin_type * - * @param string|null $unique_form_id Unique form identifier + * @param string|null $tin_type tin_type * * @return self */ - public function setUniqueFormId($unique_form_id) + public function setTinType($tin_type) { - $this->container['unique_form_id'] = $unique_form_id; + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tin_type', must be one of '%s'", + $tin_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tin_type'] = $tin_type; return $this; } /** - * Gets no_tin + * Gets unique_form_id * - * @return bool|null + * @return string */ - public function getNoTin() + public function getUniqueFormId() { - return $this->container['no_tin']; + return $this->container['unique_form_id']; } /** - * Sets no_tin + * Sets unique_form_id * - * @param bool|null $no_tin No TIN indicator + * @param string $unique_form_id Unique form identifier * * @return self */ - public function setNoTin($no_tin) + public function setUniqueFormId($unique_form_id) { - $this->container['no_tin'] = $no_tin; + $this->container['unique_form_id'] = $unique_form_id; return $this; } @@ -700,7 +1341,7 @@ public function getRecipientGiin() /** * Sets recipient_giin * - * @param string|null $recipient_giin Recipient's GIIN (Global Intermediary Identification Number) + * @param string|null $recipient_giin Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'. * * @return self */ @@ -724,7 +1365,7 @@ public function getRecipientForeignTin() /** * Sets recipient_foreign_tin * - * @param string|null $recipient_foreign_tin Recipient's foreign TIN + * @param string|null $recipient_foreign_tin Recipient's foreign TIN. Required if email is specified, must fill either this or Chap3StatusCode. * * @return self */ @@ -748,12 +1389,22 @@ public function getLobCode() /** * Sets lob_code * - * @param string|null $lob_code Limitation on benefits code + * @param string|null $lob_code Limitation on Benefits (LOB) code for tax treaty purposes. Available values: - 01: Individual (Deprecated - valid only for tax years prior to 2019) - 02: Government - contracting state/political subdivision/local authority - 03: Tax exempt pension trust/Pension fund - 04: Tax exempt/Charitable organization - 05: Publicly-traded corporation - 06: Subsidiary of publicly-traded corporation - 07: Company that meets the ownership and base erosion test - 08: Company that meets the derivative benefits test - 09: Company with an item of income that meets the active trade or business test - 10: Discretionary determination - 11: Other - 12: No LOB article in treaty * * @return self */ public function setLobCode($lob_code) { + $allowedValues = $this->getLobCodeAllowableValues(); + if (!is_null($lob_code) && !in_array($lob_code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'lob_code', must be one of '%s'", + $lob_code, + implode("', '", $allowedValues) + ) + ); + } $this->container['lob_code'] = $lob_code; return $this; @@ -762,7 +1413,7 @@ public function setLobCode($lob_code) /** * Gets income_code * - * @return string|null + * @return string */ public function getIncomeCode() { @@ -772,12 +1423,22 @@ public function getIncomeCode() /** * Sets income_code * - * @param string|null $income_code Income code + * @param string $income_code Income code. Available values: Interest: - 01: Interest paid by US obligors - general - 02: Interest paid on real property mortgages - 03: Interest paid to controlling foreign corporations - 04: Interest paid by foreign corporations - 05: Interest on tax-free covenant bonds - 22: Interest paid on deposit with a foreign branch of a domestic corporation or partnership - 29: Deposit interest - 30: Original issue discount (OID) - 31: Short-term OID - 33: Substitute payment - interest - 51: Interest paid on certain actively traded or publicly offered securities(1) - 54: Substitute payments - interest from certain actively traded or publicly offered securities(1) Dividend: - 06: Dividends paid by U.S. corporations - general - 07: Dividends qualifying for direct dividend rate - 08: Dividends paid by foreign corporations - 34: Substitute payment - dividends - 40: Other dividend equivalents under IRC section 871(m) (formerly 871(l)) - 52: Dividends paid on certain actively traded or publicly offered securities(1) - 53: Substitute payments - dividends from certain actively traded or publicly offered securities(1) - 56: Dividend equivalents under IRC section 871(m) as a result of applying the combined transaction rules Other: - 09: Capital gains - 10: Industrial royalties - 11: Motion picture or television copyright royalties - 12: Other royalties (for example, copyright, software, broadcasting, endorsement payments) - 13: Royalties paid on certain publicly offered securities(1) - 14: Real property income and natural resources royalties - 15: Pensions, annuities, alimony, and/or insurance premiums - 16: Scholarship or fellowship grants - 17: Compensation for independent personal services(2) - 18: Compensation for dependent personal services(2) - 19: Compensation for teaching(2) - 20: Compensation during studying and training(2) - 23: Other income - 24: Qualified investment entity (QIE) distributions of capital gains - 25: Trust distributions subject to IRC section 1445 - 26: Unsevered growing crops and timber distributions by a trust subject to IRC section 1445 - 27: Publicly traded partnership distributions subject to IRC section 1446 - 28: Gambling winnings(3) - 32: Notional principal contract income(4) - 35: Substitute payment - other - 36: Capital gains distributions - 37: Return of capital - 38: Eligible deferred compensation items subject to IRC section 877A(d)(1) - 39: Distributions from a nongrantor trust subject to IRC section 877A(f)(1) - 41: Guarantee of indebtedness - 42: Earnings as an artist or athlete - no central withholding agreement(5) - 43: Earnings as an artist or athlete - central withholding agreement(5) - 44: Specified Federal procurement payments - 50: Income previously reported under escrow procedure(6) - 55: Taxable death benefits on life insurance contracts - 57: Amount realized under IRC section 1446(f) - 58: Publicly traded partnership distributions-undetermined * * @return self */ public function setIncomeCode($income_code) { + $allowedValues = $this->getIncomeCodeAllowableValues(); + if (!in_array($income_code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'income_code', must be one of '%s'", + $income_code, + implode("', '", $allowedValues) + ) + ); + } $this->container['income_code'] = $income_code; return $this; @@ -786,7 +1447,7 @@ public function setIncomeCode($income_code) /** * Gets gross_income * - * @return float|null + * @return float */ public function getGrossIncome() { @@ -796,7 +1457,7 @@ public function getGrossIncome() /** * Sets gross_income * - * @param float|null $gross_income Gross income + * @param float $gross_income Gross income * * @return self */ @@ -810,7 +1471,7 @@ public function setGrossIncome($gross_income) /** * Gets withholding_indicator * - * @return string|null + * @return string */ public function getWithholdingIndicator() { @@ -820,12 +1481,22 @@ public function getWithholdingIndicator() /** * Sets withholding_indicator * - * @param string|null $withholding_indicator Withholding indicator + * @param string $withholding_indicator Withholding indicator Available values: - 3: Chapter 3 - 4: Chapter 4 * * @return self */ public function setWithholdingIndicator($withholding_indicator) { + $allowedValues = $this->getWithholdingIndicatorAllowableValues(); + if (!in_array($withholding_indicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'withholding_indicator', must be one of '%s'", + $withholding_indicator, + implode("', '", $allowedValues) + ) + ); + } $this->container['withholding_indicator'] = $withholding_indicator; return $this; @@ -834,7 +1505,7 @@ public function setWithholdingIndicator($withholding_indicator) /** * Gets tax_country_code * - * @return string|null + * @return string */ public function getTaxCountryCode() { @@ -844,7 +1515,7 @@ public function getTaxCountryCode() /** * Sets tax_country_code * - * @param string|null $tax_country_code Country code + * @param string $tax_country_code Country code * * @return self */ @@ -868,12 +1539,22 @@ public function getExemptionCodeChap3() /** * Sets exemption_code_chap3 * - * @param string|null $exemption_code_chap3 Exemption code (Chapter 3) + * @param string|null $exemption_code_chap3 Exemption code (Chapter 3). Required if WithholdingIndicator is 3 (Chapter 3). Required when using TaxRateChap3. Available values: - Empty: Tax rate is due to backup withholding - 00: Not exempt - 01: Effectively connected income - 02: Exempt under IRC (other than portfolio interest) - 03: Income is not from US sources - 04: Exempt under tax treaty - 05: Portfolio interest exempt under IRC - 06: QI that assumes primary withholding responsibility - 07: WFP or WFT - 08: U.S. branch treated as U.S. Person - 09: Territory FI treated as U.S. Person - 10: QI represents that income is exempt - 11: QSL that assumes primary withholding responsibility - 12: Payee subjected to chapter 4 withholding - 22: QDD that assumes primary withholding responsibility - 23: Exempt under section 897(l) - 24: Exempt under section 892 * * @return self */ public function setExemptionCodeChap3($exemption_code_chap3) { + $allowedValues = $this->getExemptionCodeChap3AllowableValues(); + if (!is_null($exemption_code_chap3) && !in_array($exemption_code_chap3, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'exemption_code_chap3', must be one of '%s'", + $exemption_code_chap3, + implode("', '", $allowedValues) + ) + ); + } $this->container['exemption_code_chap3'] = $exemption_code_chap3; return $this; @@ -892,12 +1573,22 @@ public function getExemptionCodeChap4() /** * Sets exemption_code_chap4 * - * @param string|null $exemption_code_chap4 Exemption code (Chapter 4) + * @param string|null $exemption_code_chap4 Exemption code (Chapter 4). Required if WithholdingIndicator is 4 (Chapter 4). Available values: - 00: Not exempt - 13: Grandfathered payment - 14: Effectively connected income - 15: Payee not subject to chapter 4 withholding - 16: Excluded nonfinancial payment - 17: Foreign Entity that assumes primary withholding responsibility - 18: U.S. Payees - of participating FFI or registered deemed - compliant FFI - 19: Exempt from withholding under IGA(6) - 20: Dormant account(7) - 21: Other - payment not subject to chapter 4 withholding * * @return self */ public function setExemptionCodeChap4($exemption_code_chap4) { + $allowedValues = $this->getExemptionCodeChap4AllowableValues(); + if (!is_null($exemption_code_chap4) && !in_array($exemption_code_chap4, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'exemption_code_chap4', must be one of '%s'", + $exemption_code_chap4, + implode("', '", $allowedValues) + ) + ); + } $this->container['exemption_code_chap4'] = $exemption_code_chap4; return $this; @@ -916,12 +1607,22 @@ public function getTaxRateChap3() /** * Sets tax_rate_chap3 * - * @param string|null $tax_rate_chap3 Tax rate (Chapter 3) + * @param string|null $tax_rate_chap3 Tax rate (Chapter 3) - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 00.00: 0.00% - 02.00: 2.00% - 04.00: 4.00% - 04.90: 4.90% - 04.95: 4.95% - 05.00: 5.00% - 07.00: 7.00% - 08.00: 8.00% - 10.00: 10.00% - 12.00: 12.00% - 12.50: 12.50% - 14.00: 14.00% - 15.00: 15.00% - 17.50: 17.50% - 20.00: 20.00% - 21.00: 21.00% - 24.00: 24.00% - 25.00: 25.00% - 27.50: 27.50% - 28.00: 28.00% - 30.00: 30.00% - 37.00: 37.00% * * @return self */ public function setTaxRateChap3($tax_rate_chap3) { + $allowedValues = $this->getTaxRateChap3AllowableValues(); + if (!is_null($tax_rate_chap3) && !in_array($tax_rate_chap3, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tax_rate_chap3', must be one of '%s'", + $tax_rate_chap3, + implode("', '", $allowedValues) + ) + ); + } $this->container['tax_rate_chap3'] = $tax_rate_chap3; return $this; @@ -1108,12 +1809,22 @@ public function getChap3StatusCode() /** * Sets chap3_status_code * - * @param string|null $chap3_status_code Chapter 3 status code + * @param string|null $chap3_status_code Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3) Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary * * @return self */ public function setChap3StatusCode($chap3_status_code) { + $allowedValues = $this->getChap3StatusCodeAllowableValues(); + if (!is_null($chap3_status_code) && !in_array($chap3_status_code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'chap3_status_code', must be one of '%s'", + $chap3_status_code, + implode("', '", $allowedValues) + ) + ); + } $this->container['chap3_status_code'] = $chap3_status_code; return $this; @@ -1132,12 +1843,22 @@ public function getChap4StatusCode() /** * Sets chap4_status_code * - * @param string|null $chap4_status_code Chapter 4 status code + * @param string|null $chap4_status_code Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI * * @return self */ public function setChap4StatusCode($chap4_status_code) { + $allowedValues = $this->getChap4StatusCodeAllowableValues(); + if (!is_null($chap4_status_code) && !in_array($chap4_status_code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'chap4_status_code', must be one of '%s'", + $chap4_status_code, + implode("', '", $allowedValues) + ) + ); + } $this->container['chap4_status_code'] = $chap4_status_code; return $this; @@ -1146,7 +1867,7 @@ public function setChap4StatusCode($chap4_status_code) /** * Gets primary_withholding_agent * - * @return \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentResponse|null + * @return \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgent|null */ public function getPrimaryWithholdingAgent() { @@ -1156,7 +1877,7 @@ public function getPrimaryWithholdingAgent() /** * Sets primary_withholding_agent * - * @param \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentResponse|null $primary_withholding_agent Primary withholding agent information + * @param \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgent|null $primary_withholding_agent Primary withholding agent information * * @return self */ @@ -1170,7 +1891,7 @@ public function setPrimaryWithholdingAgent($primary_withholding_agent) /** * Gets intermediary_or_flow_through * - * @return \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughResponse|null + * @return \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThrough|null */ public function getIntermediaryOrFlowThrough() { @@ -1180,7 +1901,7 @@ public function getIntermediaryOrFlowThrough() /** * Sets intermediary_or_flow_through * - * @param \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughResponse|null $intermediary_or_flow_through Intermediary or flow-through entity information + * @param \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThrough|null $intermediary_or_flow_through Intermediary or flow-through entity information * * @return self */ @@ -1192,59 +1913,59 @@ public function setIntermediaryOrFlowThrough($intermediary_or_flow_through) } /** - * Gets id + * Gets type * * @return string */ - public function getId() + public function getType() { - return $this->container['id']; + return $this->container['type']; } /** - * Sets id + * Sets type * - * @param string $id ID of the form + * @param string $type Form type * * @return self */ - public function setId($id) + public function setType($type) { - - if ((mb_strlen($id) < 1)) { - throw new \InvalidArgumentException('invalid length for $id when calling Form1042SListItemResponse., must be bigger than or equal to 1.'); + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); } - - $this->container['id'] = $id; + $this->container['type'] = $type; return $this; } /** - * Gets type + * Gets id * - * @return string + * @return string|null */ - public function getType() + public function getId() { - return $this->container['type']; + return $this->container['id']; } /** - * Sets type + * Sets id * - * @param string $type Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC + * @param string|null $id Form ID. Unique identifier set when the record is created. * * @return self */ - public function setType($type) + public function setId($id) { - - if ((mb_strlen($type) < 1)) { - throw new \InvalidArgumentException('invalid length for $type when calling Form1042SListItemResponse., must be bigger than or equal to 1.'); - } - - $this->container['type'] = $type; + $this->container['id'] = $id; return $this; } @@ -1252,7 +1973,7 @@ public function setType($type) /** * Gets issuer_id * - * @return int + * @return string|null */ public function getIssuerId() { @@ -1262,7 +1983,7 @@ public function getIssuerId() /** * Sets issuer_id * - * @param int $issuer_id Issuer ID + * @param string|null $issuer_id Issuer ID - only required when creating forms * * @return self */ @@ -1286,7 +2007,7 @@ public function getIssuerReferenceId() /** * Sets issuer_reference_id * - * @param string|null $issuer_reference_id Issuer Reference ID + * @param string|null $issuer_reference_id Issuer Reference ID - only required when creating forms * * @return self */ @@ -1310,7 +2031,7 @@ public function getIssuerTin() /** * Sets issuer_tin * - * @param string|null $issuer_tin Issuer TIN + * @param string|null $issuer_tin Issuer TIN - readonly * * @return self */ @@ -1334,7 +2055,7 @@ public function getTaxYear() /** * Sets tax_year * - * @param int|null $tax_year Tax year + * @param int|null $tax_year Tax Year - only required when creating forms * * @return self */ @@ -1346,675 +2067,699 @@ public function setTaxYear($tax_year) } /** - * Gets federal_efile + * Gets reference_id * - * @return bool + * @return string|null */ - public function getFederalEfile() + public function getReferenceId() { - return $this->container['federal_efile']; + return $this->container['reference_id']; } /** - * Sets federal_efile + * Sets reference_id * - * @param bool $federal_efile Boolean indicating that federal e-filing has been scheduled for this form + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ - public function setFederalEfile($federal_efile) + public function setReferenceId($reference_id) { - $this->container['federal_efile'] = $federal_efile; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets federal_efile_status + * Gets tin * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getFederalEfileStatus() + public function getTin() { - return $this->container['federal_efile_status']; + return $this->container['tin']; } /** - * Sets federal_efile_status + * Sets tin * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status Federal e-file status + * @param string|null $tin Recipient's Federal Tax Identification Number (TIN). * * @return self */ - public function setFederalEfileStatus($federal_efile_status) + public function setTin($tin) { - $this->container['federal_efile_status'] = $federal_efile_status; + $this->container['tin'] = $tin; return $this; } /** - * Gets state_efile + * Gets recipient_name * - * @return bool + * @return string */ - public function getStateEfile() + public function getRecipientName() { - return $this->container['state_efile']; + return $this->container['recipient_name']; } /** - * Sets state_efile + * Sets recipient_name * - * @param bool $state_efile Boolean indicating that state e-filing has been scheduled for this form + * @param string $recipient_name Recipient name * * @return self */ - public function setStateEfile($state_efile) + public function setRecipientName($recipient_name) { - $this->container['state_efile'] = $state_efile; + $this->container['recipient_name'] = $recipient_name; return $this; } /** - * Gets state_efile_status + * Gets recipient_second_name * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null + * @return string|null */ - public function getStateEfileStatus() + public function getRecipientSecondName() { - return $this->container['state_efile_status']; + return $this->container['recipient_second_name']; } /** - * Sets state_efile_status + * Sets recipient_second_name * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status State e-file status + * @param string|null $recipient_second_name Recipient second name * * @return self */ - public function setStateEfileStatus($state_efile_status) + public function setRecipientSecondName($recipient_second_name) { - - - $this->container['state_efile_status'] = $state_efile_status; + $this->container['recipient_second_name'] = $recipient_second_name; return $this; } /** - * Gets postal_mail + * Gets address * - * @return bool + * @return string */ - public function getPostalMail() + public function getAddress() { - return $this->container['postal_mail']; + return $this->container['address']; } /** - * Sets postal_mail + * Sets address * - * @param bool $postal_mail Boolean indicating that postal mailing to the recipient has been scheduled for this form + * @param string $address Address. * * @return self */ - public function setPostalMail($postal_mail) + public function setAddress($address) { - $this->container['postal_mail'] = $postal_mail; + $this->container['address'] = $address; return $this; } /** - * Gets postal_mail_status + * Gets address2 * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getPostalMailStatus() + public function getAddress2() { - return $this->container['postal_mail_status']; + return $this->container['address2']; } /** - * Sets postal_mail_status + * Sets address2 * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status Postal mail to recipient status + * @param string|null $address2 Address line 2. * * @return self */ - public function setPostalMailStatus($postal_mail_status) + public function setAddress2($address2) { - $this->container['postal_mail_status'] = $postal_mail_status; + $this->container['address2'] = $address2; return $this; } /** - * Gets tin_match + * Gets city * - * @return bool + * @return string */ - public function getTinMatch() + public function getCity() { - return $this->container['tin_match']; + return $this->container['city']; } /** - * Sets tin_match + * Sets city * - * @param bool $tin_match Boolean indicating that TIN Matching has been scheduled for this form + * @param string $city City. * * @return self */ - public function setTinMatch($tin_match) + public function setCity($city) { - $this->container['tin_match'] = $tin_match; + $this->container['city'] = $city; return $this; } /** - * Gets tin_match_status + * Gets state * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getTinMatchStatus() + public function getState() { - return $this->container['tin_match_status']; + return $this->container['state']; } /** - * Sets tin_match_status + * Sets state * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status TIN Match status + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ - public function setTinMatchStatus($tin_match_status) + public function setState($state) { - $this->container['tin_match_status'] = $tin_match_status; + $this->container['state'] = $state; return $this; } /** - * Gets address_verification + * Gets zip * - * @return bool + * @return string|null */ - public function getAddressVerification() + public function getZip() { - return $this->container['address_verification']; + return $this->container['zip']; } /** - * Sets address_verification + * Sets zip * - * @param bool $address_verification Boolean indicating that address verification has been scheduled for this form + * @param string|null $zip ZIP/postal code. * * @return self */ - public function setAddressVerification($address_verification) + public function setZip($zip) { - $this->container['address_verification'] = $address_verification; + $this->container['zip'] = $zip; return $this; } /** - * Gets address_verification_status + * Gets email * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getAddressVerificationStatus() + public function getEmail() { - return $this->container['address_verification_status']; + return $this->container['email']; } /** - * Sets address_verification_status + * Sets email * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status Address verification status + * @param string|null $email Recipient's Contact email address. * * @return self */ - public function setAddressVerificationStatus($address_verification_status) + public function setEmail($email) { - $this->container['address_verification_status'] = $address_verification_status; + $this->container['email'] = $email; return $this; } /** - * Gets e_delivery_status + * Gets account_number * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getEDeliveryStatus() + public function getAccountNumber() { - return $this->container['e_delivery_status']; + return $this->container['account_number']; } /** - * Sets e_delivery_status + * Sets account_number * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status EDelivery status + * @param string|null $account_number Account number * * @return self */ - public function setEDeliveryStatus($e_delivery_status) + public function setAccountNumber($account_number) { - $this->container['e_delivery_status'] = $e_delivery_status; + $this->container['account_number'] = $account_number; return $this; } /** - * Gets reference_id + * Gets office_code * * @return string|null */ - public function getReferenceId() + public function getOfficeCode() { - return $this->container['reference_id']; + return $this->container['office_code']; } /** - * Sets reference_id + * Sets office_code * - * @param string|null $reference_id Reference ID + * @param string|null $office_code Office code * * @return self */ - public function setReferenceId($reference_id) + public function setOfficeCode($office_code) { - $this->container['reference_id'] = $reference_id; + $this->container['office_code'] = $office_code; return $this; } /** - * Gets email + * Gets non_us_province * * @return string|null */ - public function getEmail() + public function getNonUsProvince() { - return $this->container['email']; + return $this->container['non_us_province']; } /** - * Sets email + * Sets non_us_province * - * @param string|null $email Recipient email address + * @param string|null $non_us_province Province or region for non-US/CA addresses. * * @return self */ - public function setEmail($email) + public function setNonUsProvince($non_us_province) { - $this->container['email'] = $email; + $this->container['non_us_province'] = $non_us_province; return $this; } /** - * Gets tin_type + * Gets country_code * - * @return string|null + * @return string */ - public function getTinType() + public function getCountryCode() { - return $this->container['tin_type']; + return $this->container['country_code']; } /** - * Sets tin_type + * Sets country_code * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ - public function setTinType($tin_type) + public function setCountryCode($country_code) { - $this->container['tin_type'] = $tin_type; + $this->container['country_code'] = $country_code; return $this; } /** - * Gets tin + * Gets federal_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getTin() + public function getFederalEfileDate() { - return $this->container['tin']; + return $this->container['federal_efile_date']; } /** - * Sets tin + * Sets federal_efile_date * - * @param string|null $tin Recipient Tax ID Number + * @param \DateTime|null $federal_efile_date Date when federal e-filing should be scheduled for this form * * @return self */ - public function setTin($tin) + public function setFederalEfileDate($federal_efile_date) { - $this->container['tin'] = $tin; + $this->container['federal_efile_date'] = $federal_efile_date; return $this; } /** - * Gets second_tin_notice + * Gets postal_mail * * @return bool|null */ - public function getSecondTinNotice() + public function getPostalMail() { - return $this->container['second_tin_notice']; + return $this->container['postal_mail']; } /** - * Sets second_tin_notice + * Sets postal_mail * - * @param bool|null $second_tin_notice Second Tin Notice + * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form * * @return self */ - public function setSecondTinNotice($second_tin_notice) + public function setPostalMail($postal_mail) { - $this->container['second_tin_notice'] = $second_tin_notice; + $this->container['postal_mail'] = $postal_mail; return $this; } /** - * Gets recipient_name + * Gets state_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getRecipientName() + public function getStateEfileDate() { - return $this->container['recipient_name']; + return $this->container['state_efile_date']; } /** - * Sets recipient_name + * Sets state_efile_date * - * @param string|null $recipient_name Recipient name + * @param \DateTime|null $state_efile_date Date when state e-filing should be scheduled for this form * * @return self */ - public function setRecipientName($recipient_name) + public function setStateEfileDate($state_efile_date) { - $this->container['recipient_name'] = $recipient_name; + $this->container['state_efile_date'] = $state_efile_date; return $this; } /** - * Gets recipient_second_name + * Gets recipient_edelivery_date * - * @return string|null + * @return \DateTime|null */ - public function getRecipientSecondName() + public function getRecipientEdeliveryDate() { - return $this->container['recipient_second_name']; + return $this->container['recipient_edelivery_date']; } /** - * Sets recipient_second_name + * Sets recipient_edelivery_date * - * @param string|null $recipient_second_name Recipient second name + * @param \DateTime|null $recipient_edelivery_date Date when recipient e-delivery should be scheduled for this form * * @return self */ - public function setRecipientSecondName($recipient_second_name) + public function setRecipientEdeliveryDate($recipient_edelivery_date) { - $this->container['recipient_second_name'] = $recipient_second_name; + $this->container['recipient_edelivery_date'] = $recipient_edelivery_date; return $this; } /** - * Gets address + * Gets tin_match * - * @return string|null + * @return bool|null */ - public function getAddress() + public function getTinMatch() { - return $this->container['address']; + return $this->container['tin_match']; } /** - * Sets address + * Sets tin_match * - * @param string|null $address Address + * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form * * @return self */ - public function setAddress($address) + public function setTinMatch($tin_match) { - $this->container['address'] = $address; + $this->container['tin_match'] = $tin_match; return $this; } /** - * Gets address2 + * Gets no_tin * - * @return string|null + * @return bool|null */ - public function getAddress2() + public function getNoTin() { - return $this->container['address2']; + return $this->container['no_tin']; } /** - * Sets address2 + * Sets no_tin * - * @param string|null $address2 Address line 2 + * @param bool|null $no_tin No TIN indicator * * @return self */ - public function setAddress2($address2) + public function setNoTin($no_tin) { - $this->container['address2'] = $address2; + $this->container['no_tin'] = $no_tin; return $this; } /** - * Gets city + * Gets address_verification * - * @return string|null + * @return bool|null */ - public function getCity() + public function getAddressVerification() { - return $this->container['city']; + return $this->container['address_verification']; } /** - * Sets city + * Sets address_verification * - * @param string|null $city City + * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form * * @return self */ - public function setCity($city) + public function setAddressVerification($address_verification) { - $this->container['city'] = $city; + $this->container['address_verification'] = $address_verification; return $this; } /** - * Gets state + * Gets state_and_local_withholding * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null */ - public function getState() + public function getStateAndLocalWithholding() { - return $this->container['state']; + return $this->container['state_and_local_withholding']; } /** - * Sets state + * Sets state_and_local_withholding * - * @param string|null $state US state + * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding State and local withholding information * * @return self */ - public function setState($state) + public function setStateAndLocalWithholding($state_and_local_withholding) { - $this->container['state'] = $state; + $this->container['state_and_local_withholding'] = $state_and_local_withholding; return $this; } /** - * Gets zip + * Gets second_tin_notice * - * @return string|null + * @return bool|null */ - public function getZip() + public function getSecondTinNotice() { - return $this->container['zip']; + return $this->container['second_tin_notice']; } /** - * Sets zip + * Sets second_tin_notice * - * @param string|null $zip Zip/postal code + * @param bool|null $second_tin_notice Second TIN notice * * @return self */ - public function setZip($zip) + public function setSecondTinNotice($second_tin_notice) { - $this->container['zip'] = $zip; + $this->container['second_tin_notice'] = $second_tin_notice; return $this; } /** - * Gets non_us_province + * Gets federal_efile_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getNonUsProvince() + public function getFederalEfileStatus() { - return $this->container['non_us_province']; + return $this->container['federal_efile_status']; } /** - * Sets non_us_province + * Sets federal_efile_status * - * @param string|null $non_us_province Foreign province + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status Federal e-file status * * @return self */ - public function setNonUsProvince($non_us_province) + public function setFederalEfileStatus($federal_efile_status) { - $this->container['non_us_province'] = $non_us_province; + $this->container['federal_efile_status'] = $federal_efile_status; return $this; } /** - * Gets country_code + * Gets state_efile_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null */ - public function getCountryCode() + public function getStateEfileStatus() { - return $this->container['country_code']; + return $this->container['state_efile_status']; } /** - * Sets country_code + * Sets state_efile_status * - * @param string|null $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes + * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status State e-file status * * @return self */ - public function setCountryCode($country_code) + public function setStateEfileStatus($state_efile_status) { - $this->container['country_code'] = $country_code; + + + $this->container['state_efile_status'] = $state_efile_status; return $this; } /** - * Gets account_number + * Gets postal_mail_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getAccountNumber() + public function getPostalMailStatus() { - return $this->container['account_number']; + return $this->container['postal_mail_status']; } /** - * Sets account_number + * Sets postal_mail_status * - * @param string|null $account_number Account Number + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status Postal mail to recipient status * * @return self */ - public function setAccountNumber($account_number) + public function setPostalMailStatus($postal_mail_status) { - $this->container['account_number'] = $account_number; + $this->container['postal_mail_status'] = $postal_mail_status; return $this; } /** - * Gets office_code + * Gets tin_match_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getOfficeCode() + public function getTinMatchStatus() { - return $this->container['office_code']; + return $this->container['tin_match_status']; } /** - * Sets office_code + * Sets tin_match_status * - * @param string|null $office_code Office Code + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status TIN Match status * * @return self */ - public function setOfficeCode($office_code) + public function setTinMatchStatus($tin_match_status) { - $this->container['office_code'] = $office_code; + $this->container['tin_match_status'] = $tin_match_status; return $this; } /** - * Gets fatca_filing_requirement + * Gets address_verification_status * - * @return bool|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getFatcaFilingRequirement() + public function getAddressVerificationStatus() { - return $this->container['fatca_filing_requirement']; + return $this->container['address_verification_status']; } /** - * Sets fatca_filing_requirement + * Sets address_verification_status * - * @param bool|null $fatca_filing_requirement FATCA filing requirement + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status Address verification status * * @return self */ - public function setFatcaFilingRequirement($fatca_filing_requirement) + public function setAddressVerificationStatus($address_verification_status) { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; + $this->container['address_verification_status'] = $address_verification_status; + + return $this; + } + + /** + * Gets e_delivery_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getEDeliveryStatus() + { + return $this->container['e_delivery_status']; + } + + /** + * Sets e_delivery_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $e_delivery_status EDelivery status + * + * @return self + */ + public function setEDeliveryStatus($e_delivery_status) + { + $this->container['e_delivery_status'] = $e_delivery_status; return $this; } @@ -2022,7 +2767,7 @@ public function setFatcaFilingRequirement($fatca_filing_requirement) /** * Gets validation_errors * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null + * @return \Avalara\SDK\Model\A1099\V2\ValidationError[]|null */ public function getValidationErrors() { @@ -2032,7 +2777,7 @@ public function getValidationErrors() /** * Sets validation_errors * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors Validation errors + * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors Validation errors * * @return self */ @@ -2058,7 +2803,7 @@ public function getCreatedAt() /** * Sets created_at * - * @param \DateTime|null $created_at Creation time + * @param \DateTime|null $created_at Date time when the record was created. * * @return self */ @@ -2082,7 +2827,7 @@ public function getUpdatedAt() /** * Sets updated_at * - * @param \DateTime|null $updated_at Update time + * @param \DateTime|null $updated_at Date time when the record was last updated. * * @return self */ @@ -2092,30 +2837,6 @@ public function setUpdatedAt($updated_at) return $this; } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/Form1042SList.php b/lib/Model/A1099/V2/Form1042SList.php deleted file mode 100644 index 8d9764d..0000000 --- a/lib/Model/A1099/V2/Form1042SList.php +++ /dev/null @@ -1,364 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1042SList Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1042SList implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1042SList'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'forms' => '\Avalara\SDK\Model\A1099\V2\Form1042SListItem[]', - 'form_type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'forms' => null, - 'form_type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'forms' => 'forms', - 'form_type' => 'formType' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'forms' => 'setForms', - 'form_type' => 'setFormType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'forms' => 'getForms', - 'form_type' => 'getFormType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['forms'] = $data['forms'] ?? null; - $this->container['form_type'] = $data['form_type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets forms - * - * @return \Avalara\SDK\Model\A1099\V2\Form1042SListItem[]|null - */ - public function getForms() - { - return $this->container['forms']; - } - - /** - * Sets forms - * - * @param \Avalara\SDK\Model\A1099\V2\Form1042SListItem[]|null $forms forms - * - * @return self - */ - public function setForms($forms) - { - - - $this->container['forms'] = $forms; - - return $this; - } - - /** - * Gets form_type - * - * @return string|null - */ - public function getFormType() - { - return $this->container['form_type']; - } - - /** - * Sets form_type - * - * @param string|null $form_type form_type - * - * @return self - */ - public function setFormType($form_type) - { - $this->container['form_type'] = $form_type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1042SListItem.php b/lib/Model/A1099/V2/Form1042SListItem.php deleted file mode 100644 index 5ae6930..0000000 --- a/lib/Model/A1099/V2/Form1042SListItem.php +++ /dev/null @@ -1,2188 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1042SListItem Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1042SListItem implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1042SListItem'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'unique_form_id' => 'string', - 'no_tin' => 'bool', - 'recipient_date_of_birth' => '\DateTime', - 'recipient_giin' => 'string', - 'recipient_foreign_tin' => 'string', - 'lob_code' => 'string', - 'income_code' => 'string', - 'gross_income' => 'float', - 'withholding_indicator' => 'string', - 'tax_country_code' => 'string', - 'exemption_code_chap3' => 'string', - 'exemption_code_chap4' => 'string', - 'tax_rate_chap3' => 'string', - 'withholding_allowance' => 'float', - 'federal_tax_withheld' => 'float', - 'tax_not_deposited_indicator' => 'bool', - 'academic_indicator' => 'bool', - 'tax_withheld_other_agents' => 'float', - 'amount_repaid' => 'float', - 'tax_paid_agent' => 'float', - 'chap3_status_code' => 'string', - 'chap4_status_code' => 'string', - 'primary_withholding_agent' => '\Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgent', - 'intermediary_or_flow_through' => '\Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThrough', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'unique_form_id' => null, - 'no_tin' => null, - 'recipient_date_of_birth' => 'date-time', - 'recipient_giin' => null, - 'recipient_foreign_tin' => null, - 'lob_code' => null, - 'income_code' => null, - 'gross_income' => 'double', - 'withholding_indicator' => null, - 'tax_country_code' => null, - 'exemption_code_chap3' => null, - 'exemption_code_chap4' => null, - 'tax_rate_chap3' => null, - 'withholding_allowance' => 'double', - 'federal_tax_withheld' => 'double', - 'tax_not_deposited_indicator' => null, - 'academic_indicator' => null, - 'tax_withheld_other_agents' => 'double', - 'amount_repaid' => 'double', - 'tax_paid_agent' => 'double', - 'chap3_status_code' => null, - 'chap4_status_code' => null, - 'primary_withholding_agent' => null, - 'intermediary_or_flow_through' => null, - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'unique_form_id' => 'uniqueFormId', - 'no_tin' => 'noTin', - 'recipient_date_of_birth' => 'recipientDateOfBirth', - 'recipient_giin' => 'recipientGiin', - 'recipient_foreign_tin' => 'recipientForeignTin', - 'lob_code' => 'lobCode', - 'income_code' => 'incomeCode', - 'gross_income' => 'grossIncome', - 'withholding_indicator' => 'withholdingIndicator', - 'tax_country_code' => 'taxCountryCode', - 'exemption_code_chap3' => 'exemptionCodeChap3', - 'exemption_code_chap4' => 'exemptionCodeChap4', - 'tax_rate_chap3' => 'taxRateChap3', - 'withholding_allowance' => 'withholdingAllowance', - 'federal_tax_withheld' => 'federalTaxWithheld', - 'tax_not_deposited_indicator' => 'taxNotDepositedIndicator', - 'academic_indicator' => 'academicIndicator', - 'tax_withheld_other_agents' => 'taxWithheldOtherAgents', - 'amount_repaid' => 'amountRepaid', - 'tax_paid_agent' => 'taxPaidAgent', - 'chap3_status_code' => 'chap3StatusCode', - 'chap4_status_code' => 'chap4StatusCode', - 'primary_withholding_agent' => 'primaryWithholdingAgent', - 'intermediary_or_flow_through' => 'intermediaryOrFlowThrough', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'unique_form_id' => 'setUniqueFormId', - 'no_tin' => 'setNoTin', - 'recipient_date_of_birth' => 'setRecipientDateOfBirth', - 'recipient_giin' => 'setRecipientGiin', - 'recipient_foreign_tin' => 'setRecipientForeignTin', - 'lob_code' => 'setLobCode', - 'income_code' => 'setIncomeCode', - 'gross_income' => 'setGrossIncome', - 'withholding_indicator' => 'setWithholdingIndicator', - 'tax_country_code' => 'setTaxCountryCode', - 'exemption_code_chap3' => 'setExemptionCodeChap3', - 'exemption_code_chap4' => 'setExemptionCodeChap4', - 'tax_rate_chap3' => 'setTaxRateChap3', - 'withholding_allowance' => 'setWithholdingAllowance', - 'federal_tax_withheld' => 'setFederalTaxWithheld', - 'tax_not_deposited_indicator' => 'setTaxNotDepositedIndicator', - 'academic_indicator' => 'setAcademicIndicator', - 'tax_withheld_other_agents' => 'setTaxWithheldOtherAgents', - 'amount_repaid' => 'setAmountRepaid', - 'tax_paid_agent' => 'setTaxPaidAgent', - 'chap3_status_code' => 'setChap3StatusCode', - 'chap4_status_code' => 'setChap4StatusCode', - 'primary_withholding_agent' => 'setPrimaryWithholdingAgent', - 'intermediary_or_flow_through' => 'setIntermediaryOrFlowThrough', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'unique_form_id' => 'getUniqueFormId', - 'no_tin' => 'getNoTin', - 'recipient_date_of_birth' => 'getRecipientDateOfBirth', - 'recipient_giin' => 'getRecipientGiin', - 'recipient_foreign_tin' => 'getRecipientForeignTin', - 'lob_code' => 'getLobCode', - 'income_code' => 'getIncomeCode', - 'gross_income' => 'getGrossIncome', - 'withholding_indicator' => 'getWithholdingIndicator', - 'tax_country_code' => 'getTaxCountryCode', - 'exemption_code_chap3' => 'getExemptionCodeChap3', - 'exemption_code_chap4' => 'getExemptionCodeChap4', - 'tax_rate_chap3' => 'getTaxRateChap3', - 'withholding_allowance' => 'getWithholdingAllowance', - 'federal_tax_withheld' => 'getFederalTaxWithheld', - 'tax_not_deposited_indicator' => 'getTaxNotDepositedIndicator', - 'academic_indicator' => 'getAcademicIndicator', - 'tax_withheld_other_agents' => 'getTaxWithheldOtherAgents', - 'amount_repaid' => 'getAmountRepaid', - 'tax_paid_agent' => 'getTaxPaidAgent', - 'chap3_status_code' => 'getChap3StatusCode', - 'chap4_status_code' => 'getChap4StatusCode', - 'primary_withholding_agent' => 'getPrimaryWithholdingAgent', - 'intermediary_or_flow_through' => 'getIntermediaryOrFlowThrough', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const LOB_CODE_INDIVIDUAL = 'Individual'; - const LOB_CODE_GOVERNMENT_CONTRACTING_STATE = 'GovernmentContractingState'; - const LOB_CODE_TAX_EXEMPT_PENSION_TRUST = 'TaxExemptPensionTrust'; - const LOB_CODE_TAX_EXEMPT_CHARITABLE_ORGANIZATION = 'TaxExemptCharitableOrganization'; - const LOB_CODE_PUBLICLY_TRADED_CORPORATION = 'PubliclyTradedCorporation'; - const LOB_CODE_SUBSIDIARY_OF_PUBLICLY_TRADED_CORPORATION = 'SubsidiaryOfPubliclyTradedCorporation'; - const LOB_CODE_COMPANY_OWNERSHIP_BASE_EROSION_TEST = 'CompanyOwnershipBaseErosionTest'; - const LOB_CODE_COMPANY_DERIVATIVE_BENEFITS_TEST = 'CompanyDerivativeBenefitsTest'; - const LOB_CODE_COMPANY_ACTIVE_TRADE_OR_BUSINESS_TEST = 'CompanyActiveTradeOrBusinessTest'; - const LOB_CODE_DISCRETIONARY_DETERMINATION = 'DiscretionaryDetermination'; - const LOB_CODE_OTHER = 'Other'; - const LOB_CODE_NO_LOB_ARTICLE_IN_TREATY = 'NoLobArticleInTreaty'; - const EXEMPTION_CODE_CHAP3_TAX_RATE_DUE_TO_BACKUP_WITHHOLDING = 'TaxRateDueToBackupWithholding'; - const EXEMPTION_CODE_CHAP3_EFFECTIVELY_CONNECTED_INCOME = 'EffectivelyConnectedIncome'; - const EXEMPTION_CODE_CHAP3_EXEMPT_UNDER_IRC = 'ExemptUnderIrc'; - const EXEMPTION_CODE_CHAP3_INCOME_NOT_FROM_US_SOURCES = 'IncomeNotFromUsSources'; - const EXEMPTION_CODE_CHAP3_EXEMPT_UNDER_TAX_TREATY = 'ExemptUnderTaxTreaty'; - const EXEMPTION_CODE_CHAP3_PORTFOLIO_INTEREST_EXEMPT_UNDER_IRC = 'PortfolioInterestExemptUnderIrc'; - const EXEMPTION_CODE_CHAP3_QI_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY = 'QiThatAssumesPrimaryWithholdingResponsibility'; - const EXEMPTION_CODE_CHAP3_WF_POR_WFT = 'WfPorWft'; - const EXEMPTION_CODE_CHAP3_US_BRANCH_TREATED_AS_US_PERSON = 'UsBranchTreatedAsUsPerson'; - const EXEMPTION_CODE_CHAP3_TERRITORY_FI_TREATED_AS_US_PERSON = 'TerritoryFiTreatedAsUsPerson'; - const EXEMPTION_CODE_CHAP3_QI_REPRESENTS_INCOME_EXEMPT = 'QiRepresentsIncomeExempt'; - const EXEMPTION_CODE_CHAP3_QSL_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY = 'QslThatAssumesPrimaryWithholdingResponsibility'; - const EXEMPTION_CODE_CHAP3_PAYEE_SUBJECTED_TO_CHAPTER4_WITHHOLDING = 'PayeeSubjectedToChapter4Withholding'; - const EXEMPTION_CODE_CHAP3_QDD_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY = 'QddThatAssumesPrimaryWithholdingResponsibility'; - const EXEMPTION_CODE_CHAP3_EXEMPT_UNDER_SECTION897_L = 'ExemptUnderSection897L'; - const EXEMPTION_CODE_CHAP3_EXEMPT_UNDER_SECTION892 = 'ExemptUnderSection892'; - const EXEMPTION_CODE_CHAP4_NOT_EXEMPT = 'NotExempt'; - const EXEMPTION_CODE_CHAP4_GRANDFATHERED_PAYMENT = 'GrandfatheredPayment'; - const EXEMPTION_CODE_CHAP4_EFFECTIVELY_CONNECTED_INCOME = 'EffectivelyConnectedIncome'; - const EXEMPTION_CODE_CHAP4_PAYEE_NOT_SUBJECT_TO_CHAPTER4_WITHHOLDING = 'PayeeNotSubjectToChapter4Withholding'; - const EXEMPTION_CODE_CHAP4_EXCLUDED_NONFINANCIAL_PAYMENT = 'ExcludedNonfinancialPayment'; - const EXEMPTION_CODE_CHAP4_FOREIGN_ENTITY_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY = 'ForeignEntityThatAssumesPrimaryWithholdingResponsibility'; - const EXEMPTION_CODE_CHAP4_US_PAYEES_OF_PARTICIPATING_FFI = 'UsPayeesOfParticipatingFfi'; - const EXEMPTION_CODE_CHAP4_EXEMPT_FROM_WITHHOLDING_UNDER_IGA = 'ExemptFromWithholdingUnderIga'; - const EXEMPTION_CODE_CHAP4_DORMANT_ACCOUNT = 'DormantAccount'; - const EXEMPTION_CODE_CHAP4_OTHER_PAYMENT_NOT_SUBJECT_TO_CHAPTER4_WITHHOLDING = 'OtherPaymentNotSubjectToChapter4Withholding'; - const CHAP3_STATUS_CODE_US_WITHHOLDING_AGENT_FI = 'USWithholdingAgentFI'; - const CHAP3_STATUS_CODE_US_WITHHOLDING_AGENT_OTHER = 'USWithholdingAgentOther'; - const CHAP3_STATUS_CODE_TERRITORY_FI_TREATED_AS_US_PERSON = 'TerritoryFITreatedAsUSPerson'; - const CHAP3_STATUS_CODE_TERRITORY_FI_NOT_TREATED_AS_US_PERSON = 'TerritoryFINotTreatedAsUSPerson'; - const CHAP3_STATUS_CODE_US_BRANCH_TREATED_AS_US_PERSON = 'USBranchTreatedAsUSPerson'; - const CHAP3_STATUS_CODE_US_BRANCH_NOT_TREATED_AS_US_PERSON = 'USBranchNotTreatedAsUSPerson'; - const CHAP3_STATUS_CODE_US_BRANCH_ECI_PRESUMPTION_APPLIED = 'USBranchECIPresumptionApplied'; - const CHAP3_STATUS_CODE_PARTNERSHIP_OTHER_THAN_WITHHOLDING_FOREIGN_PARTNERSHIP = 'PartnershipOtherThanWithholdingForeignPartnership'; - const CHAP3_STATUS_CODE_WITHHOLDING_FOREIGN_PARTNERSHIP = 'WithholdingForeignPartnership'; - const CHAP3_STATUS_CODE_TRUST_OTHER_THAN_WITHHOLDING_FOREIGN_TRUST = 'TrustOtherThanWithholdingForeignTrust'; - const CHAP3_STATUS_CODE_WITHHOLDING_FOREIGN_TRUST = 'WithholdingForeignTrust'; - const CHAP3_STATUS_CODE_QUALIFIED_INTERMEDIARY = 'QualifiedIntermediary'; - const CHAP3_STATUS_CODE_QUALIFIED_SECURITIES_LENDER_QUALIFIED_INTERMEDIARY = 'QualifiedSecuritiesLenderQualifiedIntermediary'; - const CHAP3_STATUS_CODE_QUALIFIED_SECURITIES_LENDER_OTHER = 'QualifiedSecuritiesLenderOther'; - const CHAP3_STATUS_CODE_CORPORATION = 'Corporation'; - const CHAP3_STATUS_CODE_INDIVIDUAL = 'Individual'; - const CHAP3_STATUS_CODE_ESTATE = 'Estate'; - const CHAP3_STATUS_CODE_PRIVATE_FOUNDATION = 'PrivateFoundation'; - const CHAP3_STATUS_CODE_GOVERNMENT_OR_INTERNATIONAL_ORGANIZATION = 'GovernmentOrInternationalOrganization'; - const CHAP3_STATUS_CODE_TAX_EXEMPT_ORGANIZATION_SECTION501C_ENTITIES = 'TaxExemptOrganizationSection501cEntities'; - const CHAP3_STATUS_CODE_UNKNOWN_RECIPIENT = 'UnknownRecipient'; - const CHAP3_STATUS_CODE_ARTIST_OR_ATHLETE = 'ArtistOrAthlete'; - const CHAP3_STATUS_CODE_PENSION = 'Pension'; - const CHAP3_STATUS_CODE_FOREIGN_CENTRAL_BANK_OF_ISSUE = 'ForeignCentralBankOfIssue'; - const CHAP3_STATUS_CODE_NONQUALIFIED_INTERMEDIARY = 'NonqualifiedIntermediary'; - const CHAP3_STATUS_CODE_HYBRID_ENTITY_MAKING_TREATY_CLAIM = 'HybridEntityMakingTreatyClaim'; - const CHAP3_STATUS_CODE_WITHHOLDING_RATE_POOL_GENERAL = 'WithholdingRatePoolGeneral'; - const CHAP3_STATUS_CODE_WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION = 'WithholdingRatePoolExemptOrganization'; - const CHAP3_STATUS_CODE_PAI_WITHHOLDING_RATE_POOL_GENERAL = 'PAIWithholdingRatePoolGeneral'; - const CHAP3_STATUS_CODE_PAI_WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION = 'PAIWithholdingRatePoolExemptOrganization'; - const CHAP3_STATUS_CODE_AGENCY_WITHHOLDING_RATE_POOL_GENERAL = 'AgencyWithholdingRatePoolGeneral'; - const CHAP3_STATUS_CODE_AGENCY_WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION = 'AgencyWithholdingRatePoolExemptOrganization'; - const CHAP3_STATUS_CODE_US_WITHHOLDING_AGENT_FOREIGN_BRANCH_OF_FI = 'USWithholdingAgentForeignBranchOfFI'; - const CHAP3_STATUS_CODE_QUALIFIED_DERIVATIVES_DEALER = 'QualifiedDerivativesDealer'; - const CHAP3_STATUS_CODE_FOREIGN_GOVERNMENT_INTEGRAL_PART = 'ForeignGovernmentIntegralPart'; - const CHAP3_STATUS_CODE_FOREIGN_GOVERNMENT_CONTROLLED_ENTITY = 'ForeignGovernmentControlledEntity'; - const CHAP3_STATUS_CODE_PUBLICLY_TRADED_PARTNERSHIP = 'PubliclyTradedPartnership'; - const CHAP3_STATUS_CODE_DISCLOSING_QUALIFIED_INTERMEDIARY = 'DisclosingQualifiedIntermediary'; - const CHAP4_STATUS_CODE_US_WITHHOLDING_AGENT_FI = 'UsWithholdingAgentFi'; - const CHAP4_STATUS_CODE_US_WITHHOLDING_AGENT_OTHER = 'UsWithholdingAgentOther'; - const CHAP4_STATUS_CODE_TERRITORY_FI_NOT_TREATED_AS_US_PERSON = 'TerritoryFiNotTreatedAsUsPerson'; - const CHAP4_STATUS_CODE_TERRITORY_FI_TREATED_AS_US_PERSON = 'TerritoryFiTreatedAsUsPerson'; - const CHAP4_STATUS_CODE_PARTICIPATING_FFI_OTHER = 'ParticipatingFfiOther'; - const CHAP4_STATUS_CODE_PARTICIPATING_FFI_REPORTING_MODEL2_FFI = 'ParticipatingFfiReportingModel2Ffi'; - const CHAP4_STATUS_CODE_REGISTERED_DEEMED_COMPLIANT_FFI_REPORTING_MODEL1_FFI = 'RegisteredDeemedCompliantFfiReportingModel1Ffi'; - const CHAP4_STATUS_CODE_REGISTERED_DEEMED_COMPLIANT_FFI_SPONSORED_ENTITY = 'RegisteredDeemedCompliantFfiSponsoredEntity'; - const CHAP4_STATUS_CODE_REGISTERED_DEEMED_COMPLIANT_FFI_OTHER = 'RegisteredDeemedCompliantFfiOther'; - const CHAP4_STATUS_CODE_CERTIFIED_DEEMED_COMPLIANT_FFI_OTHER = 'CertifiedDeemedCompliantFfiOther'; - const CHAP4_STATUS_CODE_CERTIFIED_DEEMED_COMPLIANT_FFIFFI_WITH_LOW_VALUE_ACCOUNTS = 'CertifiedDeemedCompliantFfiffiWithLowValueAccounts'; - const CHAP4_STATUS_CODE_CERTIFIED_DEEMED_COMPLIANT_FFI_NON_REGISTERING_LOCAL_BANK = 'CertifiedDeemedCompliantFfiNonRegisteringLocalBank'; - const CHAP4_STATUS_CODE_CERTIFIED_DEEMED_COMPLIANT_FFI_SPONSORED_ENTITY = 'CertifiedDeemedCompliantFfiSponsoredEntity'; - const CHAP4_STATUS_CODE_CERTIFIED_DEEMED_COMPLIANT_FFI_INVESTMENT_ADVISOR_OR_MANAGER = 'CertifiedDeemedCompliantFfiInvestmentAdvisorOrManager'; - const CHAP4_STATUS_CODE_NONPARTICIPATING_FFI = 'NonparticipatingFfi'; - const CHAP4_STATUS_CODE_OWNER_DOCUMENTED_FFI = 'OwnerDocumentedFfi'; - const CHAP4_STATUS_CODE_US_BRANCH_TREATED_AS_US_PERSON = 'UsBranchTreatedAsUsPerson'; - const CHAP4_STATUS_CODE_US_BRANCH_NOT_TREATED_AS_US_PERSON = 'UsBranchNotTreatedAsUsPerson'; - const CHAP4_STATUS_CODE_PASSIVE_NFFE_IDENTIFYING_SUBSTANTIAL_US_OWNERS = 'PassiveNffeIdentifyingSubstantialUsOwners'; - const CHAP4_STATUS_CODE_PASSIVE_NFFE_WITH_NO_SUBSTANTIAL_US_OWNERS = 'PassiveNffeWithNoSubstantialUsOwners'; - const CHAP4_STATUS_CODE_PUBLICLY_TRADED_NFFE_OR_AFFILIATE = 'PubliclyTradedNffeOrAffiliate'; - const CHAP4_STATUS_CODE_ACTIVE_NFFE = 'ActiveNffe'; - const CHAP4_STATUS_CODE_INDIVIDUAL = 'Individual'; - const CHAP4_STATUS_CODE_SECTION501_C_ENTITIES = 'Section501CEntities'; - const CHAP4_STATUS_CODE_EXCEPTED_TERRITORY_NFFE = 'ExceptedTerritoryNffe'; - const CHAP4_STATUS_CODE_EXCEPTED_NFFE_OTHER = 'ExceptedNffeOther'; - const CHAP4_STATUS_CODE_EXEMPT_BENEFICIAL_OWNER = 'ExemptBeneficialOwner'; - const CHAP4_STATUS_CODE_ENTITY_WHOLLY_OWNED_BY_EXEMPT_BENEFICIAL_OWNERS = 'EntityWhollyOwnedByExemptBeneficialOwners'; - const CHAP4_STATUS_CODE_UNKNOWN_RECIPIENT = 'UnknownRecipient'; - const CHAP4_STATUS_CODE_RECALCITRANT_ACCOUNT_HOLDER = 'RecalcitrantAccountHolder'; - const CHAP4_STATUS_CODE_NONREPORTING_IGAFII = 'NonreportingIgafii'; - const CHAP4_STATUS_CODE_DIRECT_REPORTING_NFFE = 'DirectReportingNffe'; - const CHAP4_STATUS_CODE_US_REPORTABLE_ACCOUNT = 'UsReportableAccount'; - const CHAP4_STATUS_CODE_NON_CONSENTING_US_ACCOUNT = 'NonConsentingUsAccount'; - const CHAP4_STATUS_CODE_SPONSORED_DIRECT_REPORTING_NFFE = 'SponsoredDirectReportingNffe'; - const CHAP4_STATUS_CODE_EXCEPTED_INTER_AFFILIATE_FFI = 'ExceptedInterAffiliateFfi'; - const CHAP4_STATUS_CODE_UNDOCUMENTED_PREEXISTING_OBLIGATION = 'UndocumentedPreexistingObligation'; - const CHAP4_STATUS_CODE_US_BRANCH_ECI_PRESUMPTION_APPLIED = 'UsBranchEciPresumptionApplied'; - const CHAP4_STATUS_CODE_ACCOUNT_HOLDER_OF_EXCLUDED_FINANCIAL_ACCOUNT = 'AccountHolderOfExcludedFinancialAccount'; - const CHAP4_STATUS_CODE_PASSIVE_NFFE_REPORTED_BY_FFI = 'PassiveNffeReportedByFfi'; - const CHAP4_STATUS_CODE_NFFE_SUBJECT_TO1472_WITHHOLDING = 'NffeSubjectTo1472Withholding'; - const CHAP4_STATUS_CODE_RECALCITRANT_POOL_NO_US_INDICIA = 'RecalcitrantPoolNoUsIndicia'; - const CHAP4_STATUS_CODE_RECALCITRANT_POOL_US_INDICIA = 'RecalcitrantPoolUsIndicia'; - const CHAP4_STATUS_CODE_RECALCITRANT_POOL_DORMANT_ACCOUNT = 'RecalcitrantPoolDormantAccount'; - const CHAP4_STATUS_CODE_RECALCITRANT_POOL_US_PERSONS = 'RecalcitrantPoolUsPersons'; - const CHAP4_STATUS_CODE_RECALCITRANT_POOL_PASSIVE_NFF_ES = 'RecalcitrantPoolPassiveNffEs'; - const CHAP4_STATUS_CODE_NONPARTICIPATING_FFI_POOL = 'NonparticipatingFfiPool'; - const CHAP4_STATUS_CODE_US_PAYEES_POOL = 'UsPayeesPool'; - const CHAP4_STATUS_CODE_QI_RECALCITRANT_POOL_GENERAL = 'QiRecalcitrantPoolGeneral'; - const CHAP4_STATUS_CODE_US_WITHHOLDING_AGENT_FOREIGN_BRANCH_OF_FI = 'UsWithholdingAgentForeignBranchOfFi'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getLobCodeAllowableValues() - { - return [ - self::LOB_CODE_INDIVIDUAL, - self::LOB_CODE_GOVERNMENT_CONTRACTING_STATE, - self::LOB_CODE_TAX_EXEMPT_PENSION_TRUST, - self::LOB_CODE_TAX_EXEMPT_CHARITABLE_ORGANIZATION, - self::LOB_CODE_PUBLICLY_TRADED_CORPORATION, - self::LOB_CODE_SUBSIDIARY_OF_PUBLICLY_TRADED_CORPORATION, - self::LOB_CODE_COMPANY_OWNERSHIP_BASE_EROSION_TEST, - self::LOB_CODE_COMPANY_DERIVATIVE_BENEFITS_TEST, - self::LOB_CODE_COMPANY_ACTIVE_TRADE_OR_BUSINESS_TEST, - self::LOB_CODE_DISCRETIONARY_DETERMINATION, - self::LOB_CODE_OTHER, - self::LOB_CODE_NO_LOB_ARTICLE_IN_TREATY, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getExemptionCodeChap3AllowableValues() - { - return [ - self::EXEMPTION_CODE_CHAP3_TAX_RATE_DUE_TO_BACKUP_WITHHOLDING, - self::EXEMPTION_CODE_CHAP3_EFFECTIVELY_CONNECTED_INCOME, - self::EXEMPTION_CODE_CHAP3_EXEMPT_UNDER_IRC, - self::EXEMPTION_CODE_CHAP3_INCOME_NOT_FROM_US_SOURCES, - self::EXEMPTION_CODE_CHAP3_EXEMPT_UNDER_TAX_TREATY, - self::EXEMPTION_CODE_CHAP3_PORTFOLIO_INTEREST_EXEMPT_UNDER_IRC, - self::EXEMPTION_CODE_CHAP3_QI_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY, - self::EXEMPTION_CODE_CHAP3_WF_POR_WFT, - self::EXEMPTION_CODE_CHAP3_US_BRANCH_TREATED_AS_US_PERSON, - self::EXEMPTION_CODE_CHAP3_TERRITORY_FI_TREATED_AS_US_PERSON, - self::EXEMPTION_CODE_CHAP3_QI_REPRESENTS_INCOME_EXEMPT, - self::EXEMPTION_CODE_CHAP3_QSL_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY, - self::EXEMPTION_CODE_CHAP3_PAYEE_SUBJECTED_TO_CHAPTER4_WITHHOLDING, - self::EXEMPTION_CODE_CHAP3_QDD_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY, - self::EXEMPTION_CODE_CHAP3_EXEMPT_UNDER_SECTION897_L, - self::EXEMPTION_CODE_CHAP3_EXEMPT_UNDER_SECTION892, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getExemptionCodeChap4AllowableValues() - { - return [ - self::EXEMPTION_CODE_CHAP4_NOT_EXEMPT, - self::EXEMPTION_CODE_CHAP4_GRANDFATHERED_PAYMENT, - self::EXEMPTION_CODE_CHAP4_EFFECTIVELY_CONNECTED_INCOME, - self::EXEMPTION_CODE_CHAP4_PAYEE_NOT_SUBJECT_TO_CHAPTER4_WITHHOLDING, - self::EXEMPTION_CODE_CHAP4_EXCLUDED_NONFINANCIAL_PAYMENT, - self::EXEMPTION_CODE_CHAP4_FOREIGN_ENTITY_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY, - self::EXEMPTION_CODE_CHAP4_US_PAYEES_OF_PARTICIPATING_FFI, - self::EXEMPTION_CODE_CHAP4_EXEMPT_FROM_WITHHOLDING_UNDER_IGA, - self::EXEMPTION_CODE_CHAP4_DORMANT_ACCOUNT, - self::EXEMPTION_CODE_CHAP4_OTHER_PAYMENT_NOT_SUBJECT_TO_CHAPTER4_WITHHOLDING, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getChap3StatusCodeAllowableValues() - { - return [ - self::CHAP3_STATUS_CODE_US_WITHHOLDING_AGENT_FI, - self::CHAP3_STATUS_CODE_US_WITHHOLDING_AGENT_OTHER, - self::CHAP3_STATUS_CODE_TERRITORY_FI_TREATED_AS_US_PERSON, - self::CHAP3_STATUS_CODE_TERRITORY_FI_NOT_TREATED_AS_US_PERSON, - self::CHAP3_STATUS_CODE_US_BRANCH_TREATED_AS_US_PERSON, - self::CHAP3_STATUS_CODE_US_BRANCH_NOT_TREATED_AS_US_PERSON, - self::CHAP3_STATUS_CODE_US_BRANCH_ECI_PRESUMPTION_APPLIED, - self::CHAP3_STATUS_CODE_PARTNERSHIP_OTHER_THAN_WITHHOLDING_FOREIGN_PARTNERSHIP, - self::CHAP3_STATUS_CODE_WITHHOLDING_FOREIGN_PARTNERSHIP, - self::CHAP3_STATUS_CODE_TRUST_OTHER_THAN_WITHHOLDING_FOREIGN_TRUST, - self::CHAP3_STATUS_CODE_WITHHOLDING_FOREIGN_TRUST, - self::CHAP3_STATUS_CODE_QUALIFIED_INTERMEDIARY, - self::CHAP3_STATUS_CODE_QUALIFIED_SECURITIES_LENDER_QUALIFIED_INTERMEDIARY, - self::CHAP3_STATUS_CODE_QUALIFIED_SECURITIES_LENDER_OTHER, - self::CHAP3_STATUS_CODE_CORPORATION, - self::CHAP3_STATUS_CODE_INDIVIDUAL, - self::CHAP3_STATUS_CODE_ESTATE, - self::CHAP3_STATUS_CODE_PRIVATE_FOUNDATION, - self::CHAP3_STATUS_CODE_GOVERNMENT_OR_INTERNATIONAL_ORGANIZATION, - self::CHAP3_STATUS_CODE_TAX_EXEMPT_ORGANIZATION_SECTION501C_ENTITIES, - self::CHAP3_STATUS_CODE_UNKNOWN_RECIPIENT, - self::CHAP3_STATUS_CODE_ARTIST_OR_ATHLETE, - self::CHAP3_STATUS_CODE_PENSION, - self::CHAP3_STATUS_CODE_FOREIGN_CENTRAL_BANK_OF_ISSUE, - self::CHAP3_STATUS_CODE_NONQUALIFIED_INTERMEDIARY, - self::CHAP3_STATUS_CODE_HYBRID_ENTITY_MAKING_TREATY_CLAIM, - self::CHAP3_STATUS_CODE_WITHHOLDING_RATE_POOL_GENERAL, - self::CHAP3_STATUS_CODE_WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION, - self::CHAP3_STATUS_CODE_PAI_WITHHOLDING_RATE_POOL_GENERAL, - self::CHAP3_STATUS_CODE_PAI_WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION, - self::CHAP3_STATUS_CODE_AGENCY_WITHHOLDING_RATE_POOL_GENERAL, - self::CHAP3_STATUS_CODE_AGENCY_WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION, - self::CHAP3_STATUS_CODE_US_WITHHOLDING_AGENT_FOREIGN_BRANCH_OF_FI, - self::CHAP3_STATUS_CODE_QUALIFIED_DERIVATIVES_DEALER, - self::CHAP3_STATUS_CODE_FOREIGN_GOVERNMENT_INTEGRAL_PART, - self::CHAP3_STATUS_CODE_FOREIGN_GOVERNMENT_CONTROLLED_ENTITY, - self::CHAP3_STATUS_CODE_PUBLICLY_TRADED_PARTNERSHIP, - self::CHAP3_STATUS_CODE_DISCLOSING_QUALIFIED_INTERMEDIARY, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getChap4StatusCodeAllowableValues() - { - return [ - self::CHAP4_STATUS_CODE_US_WITHHOLDING_AGENT_FI, - self::CHAP4_STATUS_CODE_US_WITHHOLDING_AGENT_OTHER, - self::CHAP4_STATUS_CODE_TERRITORY_FI_NOT_TREATED_AS_US_PERSON, - self::CHAP4_STATUS_CODE_TERRITORY_FI_TREATED_AS_US_PERSON, - self::CHAP4_STATUS_CODE_PARTICIPATING_FFI_OTHER, - self::CHAP4_STATUS_CODE_PARTICIPATING_FFI_REPORTING_MODEL2_FFI, - self::CHAP4_STATUS_CODE_REGISTERED_DEEMED_COMPLIANT_FFI_REPORTING_MODEL1_FFI, - self::CHAP4_STATUS_CODE_REGISTERED_DEEMED_COMPLIANT_FFI_SPONSORED_ENTITY, - self::CHAP4_STATUS_CODE_REGISTERED_DEEMED_COMPLIANT_FFI_OTHER, - self::CHAP4_STATUS_CODE_CERTIFIED_DEEMED_COMPLIANT_FFI_OTHER, - self::CHAP4_STATUS_CODE_CERTIFIED_DEEMED_COMPLIANT_FFIFFI_WITH_LOW_VALUE_ACCOUNTS, - self::CHAP4_STATUS_CODE_CERTIFIED_DEEMED_COMPLIANT_FFI_NON_REGISTERING_LOCAL_BANK, - self::CHAP4_STATUS_CODE_CERTIFIED_DEEMED_COMPLIANT_FFI_SPONSORED_ENTITY, - self::CHAP4_STATUS_CODE_CERTIFIED_DEEMED_COMPLIANT_FFI_INVESTMENT_ADVISOR_OR_MANAGER, - self::CHAP4_STATUS_CODE_NONPARTICIPATING_FFI, - self::CHAP4_STATUS_CODE_OWNER_DOCUMENTED_FFI, - self::CHAP4_STATUS_CODE_US_BRANCH_TREATED_AS_US_PERSON, - self::CHAP4_STATUS_CODE_US_BRANCH_NOT_TREATED_AS_US_PERSON, - self::CHAP4_STATUS_CODE_PASSIVE_NFFE_IDENTIFYING_SUBSTANTIAL_US_OWNERS, - self::CHAP4_STATUS_CODE_PASSIVE_NFFE_WITH_NO_SUBSTANTIAL_US_OWNERS, - self::CHAP4_STATUS_CODE_PUBLICLY_TRADED_NFFE_OR_AFFILIATE, - self::CHAP4_STATUS_CODE_ACTIVE_NFFE, - self::CHAP4_STATUS_CODE_INDIVIDUAL, - self::CHAP4_STATUS_CODE_SECTION501_C_ENTITIES, - self::CHAP4_STATUS_CODE_EXCEPTED_TERRITORY_NFFE, - self::CHAP4_STATUS_CODE_EXCEPTED_NFFE_OTHER, - self::CHAP4_STATUS_CODE_EXEMPT_BENEFICIAL_OWNER, - self::CHAP4_STATUS_CODE_ENTITY_WHOLLY_OWNED_BY_EXEMPT_BENEFICIAL_OWNERS, - self::CHAP4_STATUS_CODE_UNKNOWN_RECIPIENT, - self::CHAP4_STATUS_CODE_RECALCITRANT_ACCOUNT_HOLDER, - self::CHAP4_STATUS_CODE_NONREPORTING_IGAFII, - self::CHAP4_STATUS_CODE_DIRECT_REPORTING_NFFE, - self::CHAP4_STATUS_CODE_US_REPORTABLE_ACCOUNT, - self::CHAP4_STATUS_CODE_NON_CONSENTING_US_ACCOUNT, - self::CHAP4_STATUS_CODE_SPONSORED_DIRECT_REPORTING_NFFE, - self::CHAP4_STATUS_CODE_EXCEPTED_INTER_AFFILIATE_FFI, - self::CHAP4_STATUS_CODE_UNDOCUMENTED_PREEXISTING_OBLIGATION, - self::CHAP4_STATUS_CODE_US_BRANCH_ECI_PRESUMPTION_APPLIED, - self::CHAP4_STATUS_CODE_ACCOUNT_HOLDER_OF_EXCLUDED_FINANCIAL_ACCOUNT, - self::CHAP4_STATUS_CODE_PASSIVE_NFFE_REPORTED_BY_FFI, - self::CHAP4_STATUS_CODE_NFFE_SUBJECT_TO1472_WITHHOLDING, - self::CHAP4_STATUS_CODE_RECALCITRANT_POOL_NO_US_INDICIA, - self::CHAP4_STATUS_CODE_RECALCITRANT_POOL_US_INDICIA, - self::CHAP4_STATUS_CODE_RECALCITRANT_POOL_DORMANT_ACCOUNT, - self::CHAP4_STATUS_CODE_RECALCITRANT_POOL_US_PERSONS, - self::CHAP4_STATUS_CODE_RECALCITRANT_POOL_PASSIVE_NFF_ES, - self::CHAP4_STATUS_CODE_NONPARTICIPATING_FFI_POOL, - self::CHAP4_STATUS_CODE_US_PAYEES_POOL, - self::CHAP4_STATUS_CODE_QI_RECALCITRANT_POOL_GENERAL, - self::CHAP4_STATUS_CODE_US_WITHHOLDING_AGENT_FOREIGN_BRANCH_OF_FI, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['unique_form_id'] = $data['unique_form_id'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['recipient_date_of_birth'] = $data['recipient_date_of_birth'] ?? null; - $this->container['recipient_giin'] = $data['recipient_giin'] ?? null; - $this->container['recipient_foreign_tin'] = $data['recipient_foreign_tin'] ?? null; - $this->container['lob_code'] = $data['lob_code'] ?? null; - $this->container['income_code'] = $data['income_code'] ?? null; - $this->container['gross_income'] = $data['gross_income'] ?? null; - $this->container['withholding_indicator'] = $data['withholding_indicator'] ?? null; - $this->container['tax_country_code'] = $data['tax_country_code'] ?? null; - $this->container['exemption_code_chap3'] = $data['exemption_code_chap3'] ?? null; - $this->container['exemption_code_chap4'] = $data['exemption_code_chap4'] ?? null; - $this->container['tax_rate_chap3'] = $data['tax_rate_chap3'] ?? null; - $this->container['withholding_allowance'] = $data['withholding_allowance'] ?? null; - $this->container['federal_tax_withheld'] = $data['federal_tax_withheld'] ?? null; - $this->container['tax_not_deposited_indicator'] = $data['tax_not_deposited_indicator'] ?? null; - $this->container['academic_indicator'] = $data['academic_indicator'] ?? null; - $this->container['tax_withheld_other_agents'] = $data['tax_withheld_other_agents'] ?? null; - $this->container['amount_repaid'] = $data['amount_repaid'] ?? null; - $this->container['tax_paid_agent'] = $data['tax_paid_agent'] ?? null; - $this->container['chap3_status_code'] = $data['chap3_status_code'] ?? null; - $this->container['chap4_status_code'] = $data['chap4_status_code'] ?? null; - $this->container['primary_withholding_agent'] = $data['primary_withholding_agent'] ?? null; - $this->container['intermediary_or_flow_through'] = $data['intermediary_or_flow_through'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getLobCodeAllowableValues(); - if (!is_null($this->container['lob_code']) && !in_array($this->container['lob_code'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'lob_code', must be one of '%s'", - $this->container['lob_code'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getExemptionCodeChap3AllowableValues(); - if (!is_null($this->container['exemption_code_chap3']) && !in_array($this->container['exemption_code_chap3'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'exemption_code_chap3', must be one of '%s'", - $this->container['exemption_code_chap3'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getExemptionCodeChap4AllowableValues(); - if (!is_null($this->container['exemption_code_chap4']) && !in_array($this->container['exemption_code_chap4'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'exemption_code_chap4', must be one of '%s'", - $this->container['exemption_code_chap4'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getChap3StatusCodeAllowableValues(); - if (!is_null($this->container['chap3_status_code']) && !in_array($this->container['chap3_status_code'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'chap3_status_code', must be one of '%s'", - $this->container['chap3_status_code'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getChap4StatusCodeAllowableValues(); - if (!is_null($this->container['chap4_status_code']) && !in_array($this->container['chap4_status_code'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'chap4_status_code', must be one of '%s'", - $this->container['chap4_status_code'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets unique_form_id - * - * @return string|null - */ - public function getUniqueFormId() - { - return $this->container['unique_form_id']; - } - - /** - * Sets unique_form_id - * - * @param string|null $unique_form_id Unique form identifier - * - * @return self - */ - public function setUniqueFormId($unique_form_id) - { - $this->container['unique_form_id'] = $unique_form_id; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin No TIN indicator - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets recipient_date_of_birth - * - * @return \DateTime|null - */ - public function getRecipientDateOfBirth() - { - return $this->container['recipient_date_of_birth']; - } - - /** - * Sets recipient_date_of_birth - * - * @param \DateTime|null $recipient_date_of_birth Recipient's date of birth - * - * @return self - */ - public function setRecipientDateOfBirth($recipient_date_of_birth) - { - $this->container['recipient_date_of_birth'] = $recipient_date_of_birth; - - return $this; - } - - /** - * Gets recipient_giin - * - * @return string|null - */ - public function getRecipientGiin() - { - return $this->container['recipient_giin']; - } - - /** - * Sets recipient_giin - * - * @param string|null $recipient_giin Recipient's GIIN (Global Intermediary Identification Number) - * - * @return self - */ - public function setRecipientGiin($recipient_giin) - { - $this->container['recipient_giin'] = $recipient_giin; - - return $this; - } - - /** - * Gets recipient_foreign_tin - * - * @return string|null - */ - public function getRecipientForeignTin() - { - return $this->container['recipient_foreign_tin']; - } - - /** - * Sets recipient_foreign_tin - * - * @param string|null $recipient_foreign_tin Recipient's foreign TIN - * - * @return self - */ - public function setRecipientForeignTin($recipient_foreign_tin) - { - $this->container['recipient_foreign_tin'] = $recipient_foreign_tin; - - return $this; - } - - /** - * Gets lob_code - * - * @return string|null - */ - public function getLobCode() - { - return $this->container['lob_code']; - } - - /** - * Sets lob_code - * - * @param string|null $lob_code Limitation on benefits code - * - * @return self - */ - public function setLobCode($lob_code) - { - $allowedValues = $this->getLobCodeAllowableValues(); - if (!is_null($lob_code) && !in_array($lob_code, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'lob_code', must be one of '%s'", - $lob_code, - implode("', '", $allowedValues) - ) - ); - } - $this->container['lob_code'] = $lob_code; - - return $this; - } - - /** - * Gets income_code - * - * @return string|null - */ - public function getIncomeCode() - { - return $this->container['income_code']; - } - - /** - * Sets income_code - * - * @param string|null $income_code Income code - * - * @return self - */ - public function setIncomeCode($income_code) - { - $this->container['income_code'] = $income_code; - - return $this; - } - - /** - * Gets gross_income - * - * @return float|null - */ - public function getGrossIncome() - { - return $this->container['gross_income']; - } - - /** - * Sets gross_income - * - * @param float|null $gross_income Gross income - * - * @return self - */ - public function setGrossIncome($gross_income) - { - $this->container['gross_income'] = $gross_income; - - return $this; - } - - /** - * Gets withholding_indicator - * - * @return string|null - */ - public function getWithholdingIndicator() - { - return $this->container['withholding_indicator']; - } - - /** - * Sets withholding_indicator - * - * @param string|null $withholding_indicator Withholding indicator - * - * @return self - */ - public function setWithholdingIndicator($withholding_indicator) - { - $this->container['withholding_indicator'] = $withholding_indicator; - - return $this; - } - - /** - * Gets tax_country_code - * - * @return string|null - */ - public function getTaxCountryCode() - { - return $this->container['tax_country_code']; - } - - /** - * Sets tax_country_code - * - * @param string|null $tax_country_code Country code - * - * @return self - */ - public function setTaxCountryCode($tax_country_code) - { - $this->container['tax_country_code'] = $tax_country_code; - - return $this; - } - - /** - * Gets exemption_code_chap3 - * - * @return string|null - */ - public function getExemptionCodeChap3() - { - return $this->container['exemption_code_chap3']; - } - - /** - * Sets exemption_code_chap3 - * - * @param string|null $exemption_code_chap3 Exemption code (Chapter 3) - * - * @return self - */ - public function setExemptionCodeChap3($exemption_code_chap3) - { - $allowedValues = $this->getExemptionCodeChap3AllowableValues(); - if (!is_null($exemption_code_chap3) && !in_array($exemption_code_chap3, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'exemption_code_chap3', must be one of '%s'", - $exemption_code_chap3, - implode("', '", $allowedValues) - ) - ); - } - $this->container['exemption_code_chap3'] = $exemption_code_chap3; - - return $this; - } - - /** - * Gets exemption_code_chap4 - * - * @return string|null - */ - public function getExemptionCodeChap4() - { - return $this->container['exemption_code_chap4']; - } - - /** - * Sets exemption_code_chap4 - * - * @param string|null $exemption_code_chap4 Exemption code (Chapter 4) - * - * @return self - */ - public function setExemptionCodeChap4($exemption_code_chap4) - { - $allowedValues = $this->getExemptionCodeChap4AllowableValues(); - if (!is_null($exemption_code_chap4) && !in_array($exemption_code_chap4, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'exemption_code_chap4', must be one of '%s'", - $exemption_code_chap4, - implode("', '", $allowedValues) - ) - ); - } - $this->container['exemption_code_chap4'] = $exemption_code_chap4; - - return $this; - } - - /** - * Gets tax_rate_chap3 - * - * @return string|null - */ - public function getTaxRateChap3() - { - return $this->container['tax_rate_chap3']; - } - - /** - * Sets tax_rate_chap3 - * - * @param string|null $tax_rate_chap3 Tax rate (Chapter 3) - * - * @return self - */ - public function setTaxRateChap3($tax_rate_chap3) - { - $this->container['tax_rate_chap3'] = $tax_rate_chap3; - - return $this; - } - - /** - * Gets withholding_allowance - * - * @return float|null - */ - public function getWithholdingAllowance() - { - return $this->container['withholding_allowance']; - } - - /** - * Sets withholding_allowance - * - * @param float|null $withholding_allowance Withholding allowance - * - * @return self - */ - public function setWithholdingAllowance($withholding_allowance) - { - $this->container['withholding_allowance'] = $withholding_allowance; - - return $this; - } - - /** - * Gets federal_tax_withheld - * - * @return float|null - */ - public function getFederalTaxWithheld() - { - return $this->container['federal_tax_withheld']; - } - - /** - * Sets federal_tax_withheld - * - * @param float|null $federal_tax_withheld Federal tax withheld - * - * @return self - */ - public function setFederalTaxWithheld($federal_tax_withheld) - { - $this->container['federal_tax_withheld'] = $federal_tax_withheld; - - return $this; - } - - /** - * Gets tax_not_deposited_indicator - * - * @return bool|null - */ - public function getTaxNotDepositedIndicator() - { - return $this->container['tax_not_deposited_indicator']; - } - - /** - * Sets tax_not_deposited_indicator - * - * @param bool|null $tax_not_deposited_indicator Tax not deposited indicator - * - * @return self - */ - public function setTaxNotDepositedIndicator($tax_not_deposited_indicator) - { - $this->container['tax_not_deposited_indicator'] = $tax_not_deposited_indicator; - - return $this; - } - - /** - * Gets academic_indicator - * - * @return bool|null - */ - public function getAcademicIndicator() - { - return $this->container['academic_indicator']; - } - - /** - * Sets academic_indicator - * - * @param bool|null $academic_indicator Academic indicator - * - * @return self - */ - public function setAcademicIndicator($academic_indicator) - { - $this->container['academic_indicator'] = $academic_indicator; - - return $this; - } - - /** - * Gets tax_withheld_other_agents - * - * @return float|null - */ - public function getTaxWithheldOtherAgents() - { - return $this->container['tax_withheld_other_agents']; - } - - /** - * Sets tax_withheld_other_agents - * - * @param float|null $tax_withheld_other_agents Tax withheld by other agents - * - * @return self - */ - public function setTaxWithheldOtherAgents($tax_withheld_other_agents) - { - $this->container['tax_withheld_other_agents'] = $tax_withheld_other_agents; - - return $this; - } - - /** - * Gets amount_repaid - * - * @return float|null - */ - public function getAmountRepaid() - { - return $this->container['amount_repaid']; - } - - /** - * Sets amount_repaid - * - * @param float|null $amount_repaid Amount repaid to recipient - * - * @return self - */ - public function setAmountRepaid($amount_repaid) - { - $this->container['amount_repaid'] = $amount_repaid; - - return $this; - } - - /** - * Gets tax_paid_agent - * - * @return float|null - */ - public function getTaxPaidAgent() - { - return $this->container['tax_paid_agent']; - } - - /** - * Sets tax_paid_agent - * - * @param float|null $tax_paid_agent Tax paid by withholding agent - * - * @return self - */ - public function setTaxPaidAgent($tax_paid_agent) - { - $this->container['tax_paid_agent'] = $tax_paid_agent; - - return $this; - } - - /** - * Gets chap3_status_code - * - * @return string|null - */ - public function getChap3StatusCode() - { - return $this->container['chap3_status_code']; - } - - /** - * Sets chap3_status_code - * - * @param string|null $chap3_status_code Chapter 3 status code - * - * @return self - */ - public function setChap3StatusCode($chap3_status_code) - { - $allowedValues = $this->getChap3StatusCodeAllowableValues(); - if (!is_null($chap3_status_code) && !in_array($chap3_status_code, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'chap3_status_code', must be one of '%s'", - $chap3_status_code, - implode("', '", $allowedValues) - ) - ); - } - $this->container['chap3_status_code'] = $chap3_status_code; - - return $this; - } - - /** - * Gets chap4_status_code - * - * @return string|null - */ - public function getChap4StatusCode() - { - return $this->container['chap4_status_code']; - } - - /** - * Sets chap4_status_code - * - * @param string|null $chap4_status_code Chapter 4 status code - * - * @return self - */ - public function setChap4StatusCode($chap4_status_code) - { - $allowedValues = $this->getChap4StatusCodeAllowableValues(); - if (!is_null($chap4_status_code) && !in_array($chap4_status_code, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'chap4_status_code', must be one of '%s'", - $chap4_status_code, - implode("', '", $allowedValues) - ) - ); - } - $this->container['chap4_status_code'] = $chap4_status_code; - - return $this; - } - - /** - * Gets primary_withholding_agent - * - * @return \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgent|null - */ - public function getPrimaryWithholdingAgent() - { - return $this->container['primary_withholding_agent']; - } - - /** - * Sets primary_withholding_agent - * - * @param \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgent|null $primary_withholding_agent Primary withholding agent information - * - * @return self - */ - public function setPrimaryWithholdingAgent($primary_withholding_agent) - { - $this->container['primary_withholding_agent'] = $primary_withholding_agent; - - return $this; - } - - /** - * Gets intermediary_or_flow_through - * - * @return \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThrough|null - */ - public function getIntermediaryOrFlowThrough() - { - return $this->container['intermediary_or_flow_through']; - } - - /** - * Sets intermediary_or_flow_through - * - * @param \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThrough|null $intermediary_or_flow_through Intermediary or flow-through entity information - * - * @return self - */ - public function setIntermediaryOrFlowThrough($intermediary_or_flow_through) - { - $this->container['intermediary_or_flow_through'] = $intermediary_or_flow_through; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1042SListItem., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1042SListItem., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1042SListItem., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1042SRequest.php b/lib/Model/A1099/V2/Form1042SRequest.php deleted file mode 100644 index c6cdf66..0000000 --- a/lib/Model/A1099/V2/Form1042SRequest.php +++ /dev/null @@ -1,1862 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1042SRequest Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1042SRequest implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1042SRequest'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'unique_form_id' => 'string', - 'recipient_date_of_birth' => '\DateTime', - 'recipient_giin' => 'string', - 'recipient_foreign_tin' => 'string', - 'lob_code' => 'string', - 'income_code' => 'string', - 'gross_income' => 'float', - 'withholding_indicator' => 'string', - 'tax_country_code' => 'string', - 'exemption_code_chap3' => 'string', - 'exemption_code_chap4' => 'string', - 'tax_rate_chap3' => 'string', - 'withholding_allowance' => 'float', - 'federal_tax_withheld' => 'float', - 'tax_not_deposited_indicator' => 'bool', - 'academic_indicator' => 'bool', - 'tax_withheld_other_agents' => 'float', - 'amount_repaid' => 'float', - 'tax_paid_agent' => 'float', - 'chap3_status_code' => 'string', - 'chap4_status_code' => 'string', - 'primary_withholding_agent' => '\Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentRequest', - 'intermediary_or_flow_through' => '\Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughRequest', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest', - 'type' => 'string', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'unique_form_id' => null, - 'recipient_date_of_birth' => 'date-time', - 'recipient_giin' => null, - 'recipient_foreign_tin' => null, - 'lob_code' => null, - 'income_code' => null, - 'gross_income' => 'double', - 'withholding_indicator' => null, - 'tax_country_code' => null, - 'exemption_code_chap3' => null, - 'exemption_code_chap4' => null, - 'tax_rate_chap3' => null, - 'withholding_allowance' => 'double', - 'federal_tax_withheld' => 'double', - 'tax_not_deposited_indicator' => null, - 'academic_indicator' => null, - 'tax_withheld_other_agents' => 'double', - 'amount_repaid' => 'double', - 'tax_paid_agent' => 'double', - 'chap3_status_code' => null, - 'chap4_status_code' => null, - 'primary_withholding_agent' => null, - 'intermediary_or_flow_through' => null, - 'state_and_local_withholding' => null, - 'type' => null, - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'unique_form_id' => 'uniqueFormId', - 'recipient_date_of_birth' => 'recipientDateOfBirth', - 'recipient_giin' => 'recipientGiin', - 'recipient_foreign_tin' => 'recipientForeignTin', - 'lob_code' => 'lobCode', - 'income_code' => 'incomeCode', - 'gross_income' => 'grossIncome', - 'withholding_indicator' => 'withholdingIndicator', - 'tax_country_code' => 'taxCountryCode', - 'exemption_code_chap3' => 'exemptionCodeChap3', - 'exemption_code_chap4' => 'exemptionCodeChap4', - 'tax_rate_chap3' => 'taxRateChap3', - 'withholding_allowance' => 'withholdingAllowance', - 'federal_tax_withheld' => 'federalTaxWithheld', - 'tax_not_deposited_indicator' => 'taxNotDepositedIndicator', - 'academic_indicator' => 'academicIndicator', - 'tax_withheld_other_agents' => 'taxWithheldOtherAgents', - 'amount_repaid' => 'amountRepaid', - 'tax_paid_agent' => 'taxPaidAgent', - 'chap3_status_code' => 'chap3StatusCode', - 'chap4_status_code' => 'chap4StatusCode', - 'primary_withholding_agent' => 'primaryWithholdingAgent', - 'intermediary_or_flow_through' => 'intermediaryOrFlowThrough', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'unique_form_id' => 'setUniqueFormId', - 'recipient_date_of_birth' => 'setRecipientDateOfBirth', - 'recipient_giin' => 'setRecipientGiin', - 'recipient_foreign_tin' => 'setRecipientForeignTin', - 'lob_code' => 'setLobCode', - 'income_code' => 'setIncomeCode', - 'gross_income' => 'setGrossIncome', - 'withholding_indicator' => 'setWithholdingIndicator', - 'tax_country_code' => 'setTaxCountryCode', - 'exemption_code_chap3' => 'setExemptionCodeChap3', - 'exemption_code_chap4' => 'setExemptionCodeChap4', - 'tax_rate_chap3' => 'setTaxRateChap3', - 'withholding_allowance' => 'setWithholdingAllowance', - 'federal_tax_withheld' => 'setFederalTaxWithheld', - 'tax_not_deposited_indicator' => 'setTaxNotDepositedIndicator', - 'academic_indicator' => 'setAcademicIndicator', - 'tax_withheld_other_agents' => 'setTaxWithheldOtherAgents', - 'amount_repaid' => 'setAmountRepaid', - 'tax_paid_agent' => 'setTaxPaidAgent', - 'chap3_status_code' => 'setChap3StatusCode', - 'chap4_status_code' => 'setChap4StatusCode', - 'primary_withholding_agent' => 'setPrimaryWithholdingAgent', - 'intermediary_or_flow_through' => 'setIntermediaryOrFlowThrough', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'unique_form_id' => 'getUniqueFormId', - 'recipient_date_of_birth' => 'getRecipientDateOfBirth', - 'recipient_giin' => 'getRecipientGiin', - 'recipient_foreign_tin' => 'getRecipientForeignTin', - 'lob_code' => 'getLobCode', - 'income_code' => 'getIncomeCode', - 'gross_income' => 'getGrossIncome', - 'withholding_indicator' => 'getWithholdingIndicator', - 'tax_country_code' => 'getTaxCountryCode', - 'exemption_code_chap3' => 'getExemptionCodeChap3', - 'exemption_code_chap4' => 'getExemptionCodeChap4', - 'tax_rate_chap3' => 'getTaxRateChap3', - 'withholding_allowance' => 'getWithholdingAllowance', - 'federal_tax_withheld' => 'getFederalTaxWithheld', - 'tax_not_deposited_indicator' => 'getTaxNotDepositedIndicator', - 'academic_indicator' => 'getAcademicIndicator', - 'tax_withheld_other_agents' => 'getTaxWithheldOtherAgents', - 'amount_repaid' => 'getAmountRepaid', - 'tax_paid_agent' => 'getTaxPaidAgent', - 'chap3_status_code' => 'getChap3StatusCode', - 'chap4_status_code' => 'getChap4StatusCode', - 'primary_withholding_agent' => 'getPrimaryWithholdingAgent', - 'intermediary_or_flow_through' => 'getIntermediaryOrFlowThrough', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['unique_form_id'] = $data['unique_form_id'] ?? null; - $this->container['recipient_date_of_birth'] = $data['recipient_date_of_birth'] ?? null; - $this->container['recipient_giin'] = $data['recipient_giin'] ?? null; - $this->container['recipient_foreign_tin'] = $data['recipient_foreign_tin'] ?? null; - $this->container['lob_code'] = $data['lob_code'] ?? null; - $this->container['income_code'] = $data['income_code'] ?? null; - $this->container['gross_income'] = $data['gross_income'] ?? null; - $this->container['withholding_indicator'] = $data['withholding_indicator'] ?? null; - $this->container['tax_country_code'] = $data['tax_country_code'] ?? null; - $this->container['exemption_code_chap3'] = $data['exemption_code_chap3'] ?? null; - $this->container['exemption_code_chap4'] = $data['exemption_code_chap4'] ?? null; - $this->container['tax_rate_chap3'] = $data['tax_rate_chap3'] ?? null; - $this->container['withholding_allowance'] = $data['withholding_allowance'] ?? null; - $this->container['federal_tax_withheld'] = $data['federal_tax_withheld'] ?? null; - $this->container['tax_not_deposited_indicator'] = $data['tax_not_deposited_indicator'] ?? null; - $this->container['academic_indicator'] = $data['academic_indicator'] ?? null; - $this->container['tax_withheld_other_agents'] = $data['tax_withheld_other_agents'] ?? null; - $this->container['amount_repaid'] = $data['amount_repaid'] ?? null; - $this->container['tax_paid_agent'] = $data['tax_paid_agent'] ?? null; - $this->container['chap3_status_code'] = $data['chap3_status_code'] ?? null; - $this->container['chap4_status_code'] = $data['chap4_status_code'] ?? null; - $this->container['primary_withholding_agent'] = $data['primary_withholding_agent'] ?? null; - $this->container['intermediary_or_flow_through'] = $data['intermediary_or_flow_through'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets unique_form_id - * - * @return string|null - */ - public function getUniqueFormId() - { - return $this->container['unique_form_id']; - } - - /** - * Sets unique_form_id - * - * @param string|null $unique_form_id Unique form identifier - * - * @return self - */ - public function setUniqueFormId($unique_form_id) - { - $this->container['unique_form_id'] = $unique_form_id; - - return $this; - } - - /** - * Gets recipient_date_of_birth - * - * @return \DateTime|null - */ - public function getRecipientDateOfBirth() - { - return $this->container['recipient_date_of_birth']; - } - - /** - * Sets recipient_date_of_birth - * - * @param \DateTime|null $recipient_date_of_birth Recipient's date of birth - * - * @return self - */ - public function setRecipientDateOfBirth($recipient_date_of_birth) - { - $this->container['recipient_date_of_birth'] = $recipient_date_of_birth; - - return $this; - } - - /** - * Gets recipient_giin - * - * @return string|null - */ - public function getRecipientGiin() - { - return $this->container['recipient_giin']; - } - - /** - * Sets recipient_giin - * - * @param string|null $recipient_giin Recipient's GIIN (Global Intermediary Identification Number) - * - * @return self - */ - public function setRecipientGiin($recipient_giin) - { - $this->container['recipient_giin'] = $recipient_giin; - - return $this; - } - - /** - * Gets recipient_foreign_tin - * - * @return string|null - */ - public function getRecipientForeignTin() - { - return $this->container['recipient_foreign_tin']; - } - - /** - * Sets recipient_foreign_tin - * - * @param string|null $recipient_foreign_tin Recipient's foreign TIN - * - * @return self - */ - public function setRecipientForeignTin($recipient_foreign_tin) - { - $this->container['recipient_foreign_tin'] = $recipient_foreign_tin; - - return $this; - } - - /** - * Gets lob_code - * - * @return string|null - */ - public function getLobCode() - { - return $this->container['lob_code']; - } - - /** - * Sets lob_code - * - * @param string|null $lob_code Limitation on benefits code - * - * @return self - */ - public function setLobCode($lob_code) - { - $this->container['lob_code'] = $lob_code; - - return $this; - } - - /** - * Gets income_code - * - * @return string|null - */ - public function getIncomeCode() - { - return $this->container['income_code']; - } - - /** - * Sets income_code - * - * @param string|null $income_code Income code - * - * @return self - */ - public function setIncomeCode($income_code) - { - $this->container['income_code'] = $income_code; - - return $this; - } - - /** - * Gets gross_income - * - * @return float|null - */ - public function getGrossIncome() - { - return $this->container['gross_income']; - } - - /** - * Sets gross_income - * - * @param float|null $gross_income Gross income - * - * @return self - */ - public function setGrossIncome($gross_income) - { - $this->container['gross_income'] = $gross_income; - - return $this; - } - - /** - * Gets withholding_indicator - * - * @return string|null - */ - public function getWithholdingIndicator() - { - return $this->container['withholding_indicator']; - } - - /** - * Sets withholding_indicator - * - * @param string|null $withholding_indicator Withholding indicator - * - * @return self - */ - public function setWithholdingIndicator($withholding_indicator) - { - $this->container['withholding_indicator'] = $withholding_indicator; - - return $this; - } - - /** - * Gets tax_country_code - * - * @return string|null - */ - public function getTaxCountryCode() - { - return $this->container['tax_country_code']; - } - - /** - * Sets tax_country_code - * - * @param string|null $tax_country_code Country code - * - * @return self - */ - public function setTaxCountryCode($tax_country_code) - { - $this->container['tax_country_code'] = $tax_country_code; - - return $this; - } - - /** - * Gets exemption_code_chap3 - * - * @return string|null - */ - public function getExemptionCodeChap3() - { - return $this->container['exemption_code_chap3']; - } - - /** - * Sets exemption_code_chap3 - * - * @param string|null $exemption_code_chap3 Exemption code (Chapter 3) - * - * @return self - */ - public function setExemptionCodeChap3($exemption_code_chap3) - { - $this->container['exemption_code_chap3'] = $exemption_code_chap3; - - return $this; - } - - /** - * Gets exemption_code_chap4 - * - * @return string|null - */ - public function getExemptionCodeChap4() - { - return $this->container['exemption_code_chap4']; - } - - /** - * Sets exemption_code_chap4 - * - * @param string|null $exemption_code_chap4 Exemption code (Chapter 4) - * - * @return self - */ - public function setExemptionCodeChap4($exemption_code_chap4) - { - $this->container['exemption_code_chap4'] = $exemption_code_chap4; - - return $this; - } - - /** - * Gets tax_rate_chap3 - * - * @return string|null - */ - public function getTaxRateChap3() - { - return $this->container['tax_rate_chap3']; - } - - /** - * Sets tax_rate_chap3 - * - * @param string|null $tax_rate_chap3 Tax rate (Chapter 3) - * - * @return self - */ - public function setTaxRateChap3($tax_rate_chap3) - { - $this->container['tax_rate_chap3'] = $tax_rate_chap3; - - return $this; - } - - /** - * Gets withholding_allowance - * - * @return float|null - */ - public function getWithholdingAllowance() - { - return $this->container['withholding_allowance']; - } - - /** - * Sets withholding_allowance - * - * @param float|null $withholding_allowance Withholding allowance - * - * @return self - */ - public function setWithholdingAllowance($withholding_allowance) - { - $this->container['withholding_allowance'] = $withholding_allowance; - - return $this; - } - - /** - * Gets federal_tax_withheld - * - * @return float|null - */ - public function getFederalTaxWithheld() - { - return $this->container['federal_tax_withheld']; - } - - /** - * Sets federal_tax_withheld - * - * @param float|null $federal_tax_withheld Federal tax withheld - * - * @return self - */ - public function setFederalTaxWithheld($federal_tax_withheld) - { - $this->container['federal_tax_withheld'] = $federal_tax_withheld; - - return $this; - } - - /** - * Gets tax_not_deposited_indicator - * - * @return bool|null - */ - public function getTaxNotDepositedIndicator() - { - return $this->container['tax_not_deposited_indicator']; - } - - /** - * Sets tax_not_deposited_indicator - * - * @param bool|null $tax_not_deposited_indicator Tax not deposited indicator - * - * @return self - */ - public function setTaxNotDepositedIndicator($tax_not_deposited_indicator) - { - $this->container['tax_not_deposited_indicator'] = $tax_not_deposited_indicator; - - return $this; - } - - /** - * Gets academic_indicator - * - * @return bool|null - */ - public function getAcademicIndicator() - { - return $this->container['academic_indicator']; - } - - /** - * Sets academic_indicator - * - * @param bool|null $academic_indicator Academic indicator - * - * @return self - */ - public function setAcademicIndicator($academic_indicator) - { - $this->container['academic_indicator'] = $academic_indicator; - - return $this; - } - - /** - * Gets tax_withheld_other_agents - * - * @return float|null - */ - public function getTaxWithheldOtherAgents() - { - return $this->container['tax_withheld_other_agents']; - } - - /** - * Sets tax_withheld_other_agents - * - * @param float|null $tax_withheld_other_agents Tax withheld by other agents - * - * @return self - */ - public function setTaxWithheldOtherAgents($tax_withheld_other_agents) - { - $this->container['tax_withheld_other_agents'] = $tax_withheld_other_agents; - - return $this; - } - - /** - * Gets amount_repaid - * - * @return float|null - */ - public function getAmountRepaid() - { - return $this->container['amount_repaid']; - } - - /** - * Sets amount_repaid - * - * @param float|null $amount_repaid Amount repaid to recipient - * - * @return self - */ - public function setAmountRepaid($amount_repaid) - { - $this->container['amount_repaid'] = $amount_repaid; - - return $this; - } - - /** - * Gets tax_paid_agent - * - * @return float|null - */ - public function getTaxPaidAgent() - { - return $this->container['tax_paid_agent']; - } - - /** - * Sets tax_paid_agent - * - * @param float|null $tax_paid_agent Tax paid by withholding agent - * - * @return self - */ - public function setTaxPaidAgent($tax_paid_agent) - { - $this->container['tax_paid_agent'] = $tax_paid_agent; - - return $this; - } - - /** - * Gets chap3_status_code - * - * @return string|null - */ - public function getChap3StatusCode() - { - return $this->container['chap3_status_code']; - } - - /** - * Sets chap3_status_code - * - * @param string|null $chap3_status_code Chapter 3 status code - * - * @return self - */ - public function setChap3StatusCode($chap3_status_code) - { - $this->container['chap3_status_code'] = $chap3_status_code; - - return $this; - } - - /** - * Gets chap4_status_code - * - * @return string|null - */ - public function getChap4StatusCode() - { - return $this->container['chap4_status_code']; - } - - /** - * Sets chap4_status_code - * - * @param string|null $chap4_status_code Chapter 4 status code - * - * @return self - */ - public function setChap4StatusCode($chap4_status_code) - { - $this->container['chap4_status_code'] = $chap4_status_code; - - return $this; - } - - /** - * Gets primary_withholding_agent - * - * @return \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentRequest|null - */ - public function getPrimaryWithholdingAgent() - { - return $this->container['primary_withholding_agent']; - } - - /** - * Sets primary_withholding_agent - * - * @param \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentRequest|null $primary_withholding_agent Primary withholding agent information - * - * @return self - */ - public function setPrimaryWithholdingAgent($primary_withholding_agent) - { - $this->container['primary_withholding_agent'] = $primary_withholding_agent; - - return $this; - } - - /** - * Gets intermediary_or_flow_through - * - * @return \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughRequest|null - */ - public function getIntermediaryOrFlowThrough() - { - return $this->container['intermediary_or_flow_through']; - } - - /** - * Sets intermediary_or_flow_through - * - * @param \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughRequest|null $intermediary_or_flow_through Intermediary or flow-through entity information - * - * @return self - */ - public function setIntermediaryOrFlowThrough($intermediary_or_flow_through) - { - $this->container['intermediary_or_flow_through'] = $intermediary_or_flow_through; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1042SRequest., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1042SRequest., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1042SRequest., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1042SResponse.php b/lib/Model/A1099/V2/Form1042SResponse.php deleted file mode 100644 index 762c19a..0000000 --- a/lib/Model/A1099/V2/Form1042SResponse.php +++ /dev/null @@ -1,1530 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1042SResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1042SResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1042SResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'type' => 'string', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse', - 'tin_type' => 'string', - 'id' => 'string', - 'issuer_id' => 'string', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'reference_id' => 'string', - 'recipient_name' => 'string', - 'recipient_tin' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'type' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null, - 'tin_type' => null, - 'id' => null, - 'issuer_id' => null, - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'reference_id' => null, - 'recipient_name' => null, - 'recipient_tin' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'federal_efile_status' => null, - 'e_delivery_status' => null, - 'state_efile_status' => null, - 'postal_mail_status' => null, - 'tin_match_status' => null, - 'address_verification_status' => null, - 'validation_errors' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'tin_type' => 'tinType', - 'id' => 'id', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'reference_id' => 'referenceId', - 'recipient_name' => 'recipientName', - 'recipient_tin' => 'recipientTin', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'federal_efile_status' => 'federalEfileStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification_status' => 'addressVerificationStatus', - 'validation_errors' => 'validationErrors' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'tin_type' => 'setTinType', - 'id' => 'setId', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'reference_id' => 'setReferenceId', - 'recipient_name' => 'setRecipientName', - 'recipient_tin' => 'setRecipientTin', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'federal_efile_status' => 'setFederalEfileStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification_status' => 'setAddressVerificationStatus', - 'validation_errors' => 'setValidationErrors' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'tin_type' => 'getTinType', - 'id' => 'getId', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'reference_id' => 'getReferenceId', - 'recipient_name' => 'getRecipientName', - 'recipient_tin' => 'getRecipientTin', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'federal_efile_status' => 'getFederalEfileStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification_status' => 'getAddressVerificationStatus', - 'validation_errors' => 'getValidationErrors' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at created_at - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at updated_at - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type tin_type - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id issuer_id - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id issuer_reference_id - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin issuer_tin - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year tax_year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id reference_id - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name recipient_name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin recipient_tin - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name recipient_second_name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 address2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city city - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip zip - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email email - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number account_number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code office_code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province non_us_province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code country_code - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file federal_e_file - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail postal_mail - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file state_e_file - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match tin_match - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin no_tin - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice second_tin_notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification address_verification - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status federal_efile_status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status e_delivery_status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status state_efile_status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status postal_mail_status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status tin_match_status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status address_verification_status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors validation_errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1095B.php b/lib/Model/A1099/V2/Form1095B.php index 29bba77..8a9fd44 100644 --- a/lib/Model/A1099/V2/Form1095B.php +++ b/lib/Model/A1099/V2/Form1095B.php @@ -20,7 +20,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) * * @category Avalara client libraries * @package Avalara\SDK\API\A1099\V2 @@ -47,6 +47,7 @@ * Form1095B Class Doc Comment * * @category Class + * @description Form 1095-B: Health Coverage * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -71,41 +72,52 @@ class Form1095B implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'employee_first_name' => 'string', + 'employee_middle_name' => 'string', + 'employee_last_name' => 'string', + 'employee_name_suffix' => 'string', + 'employee_date_of_birth' => '\DateTime', 'origin_of_health_coverage_code' => 'string', - 'covered_individuals' => '\Avalara\SDK\Model\A1099\V2\CoveredIndividualReference[]', - 'id' => 'string', + 'covered_individuals' => '\Avalara\SDK\Model\A1099\V2\CoveredIndividual[]', 'type' => 'string', - 'issuer_id' => 'int', + 'id' => 'string', + 'issuer_id' => 'string', 'issuer_reference_id' => 'string', 'issuer_tin' => 'string', 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', 'tin' => 'string', 'recipient_name' => 'string', + 'tin_type' => 'string', 'recipient_second_name' => 'string', 'address' => 'string', 'address2' => 'string', 'city' => 'string', 'state' => 'string', 'zip' => 'string', - 'foreign_province' => 'string', + 'email' => 'string', + 'account_number' => 'string', + 'office_code' => 'string', + 'non_us_province' => 'string', 'country_code' => 'string', + 'federal_efile_date' => '\DateTime', + 'postal_mail' => 'bool', + 'state_efile_date' => '\DateTime', + 'recipient_edelivery_date' => '\DateTime', + 'tin_match' => 'bool', + 'no_tin' => 'bool', + 'address_verification' => 'bool', + 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding', + 'second_tin_notice' => 'bool', + 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', + 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationError[]', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding' + 'updated_at' => '\DateTime' ]; /** @@ -116,41 +128,52 @@ class Form1095B implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'employee_first_name' => null, + 'employee_middle_name' => null, + 'employee_last_name' => null, + 'employee_name_suffix' => null, + 'employee_date_of_birth' => 'date', 'origin_of_health_coverage_code' => null, 'covered_individuals' => null, - 'id' => null, 'type' => null, - 'issuer_id' => 'int32', + 'id' => null, + 'issuer_id' => null, 'issuer_reference_id' => null, 'issuer_tin' => null, 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, 'reference_id' => null, - 'email' => null, - 'tin_type' => null, 'tin' => null, 'recipient_name' => null, + 'tin_type' => null, 'recipient_second_name' => null, 'address' => null, 'address2' => null, 'city' => null, 'state' => null, 'zip' => null, - 'foreign_province' => null, + 'email' => null, + 'account_number' => null, + 'office_code' => null, + 'non_us_province' => null, 'country_code' => null, + 'federal_efile_date' => 'date', + 'postal_mail' => null, + 'state_efile_date' => 'date', + 'recipient_edelivery_date' => 'date', + 'tin_match' => null, + 'no_tin' => null, + 'address_verification' => null, + 'state_and_local_withholding' => null, + 'second_tin_notice' => null, + 'federal_efile_status' => null, + 'state_efile_status' => null, + 'postal_mail_status' => null, + 'tin_match_status' => null, + 'address_verification_status' => null, + 'e_delivery_status' => null, 'validation_errors' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null + 'updated_at' => 'date-time' ]; /** @@ -180,41 +203,52 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'employee_first_name' => 'employeeFirstName', + 'employee_middle_name' => 'employeeMiddleName', + 'employee_last_name' => 'employeeLastName', + 'employee_name_suffix' => 'employeeNameSuffix', + 'employee_date_of_birth' => 'employeeDateOfBirth', 'origin_of_health_coverage_code' => 'originOfHealthCoverageCode', 'covered_individuals' => 'coveredIndividuals', - 'id' => 'id', 'type' => 'type', + 'id' => 'id', 'issuer_id' => 'issuerId', 'issuer_reference_id' => 'issuerReferenceId', 'issuer_tin' => 'issuerTin', 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', 'tin' => 'tin', 'recipient_name' => 'recipientName', + 'tin_type' => 'tinType', 'recipient_second_name' => 'recipientSecondName', 'address' => 'address', 'address2' => 'address2', 'city' => 'city', 'state' => 'state', 'zip' => 'zip', - 'foreign_province' => 'foreignProvince', + 'email' => 'email', + 'account_number' => 'accountNumber', + 'office_code' => 'officeCode', + 'non_us_province' => 'nonUsProvince', 'country_code' => 'countryCode', + 'federal_efile_date' => 'federalEfileDate', + 'postal_mail' => 'postalMail', + 'state_efile_date' => 'stateEfileDate', + 'recipient_edelivery_date' => 'recipientEdeliveryDate', + 'tin_match' => 'tinMatch', + 'no_tin' => 'noTin', + 'address_verification' => 'addressVerification', + 'state_and_local_withholding' => 'stateAndLocalWithholding', + 'second_tin_notice' => 'secondTinNotice', + 'federal_efile_status' => 'federalEfileStatus', + 'state_efile_status' => 'stateEfileStatus', + 'postal_mail_status' => 'postalMailStatus', + 'tin_match_status' => 'tinMatchStatus', + 'address_verification_status' => 'addressVerificationStatus', + 'e_delivery_status' => 'eDeliveryStatus', 'validation_errors' => 'validationErrors', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' + 'updated_at' => 'updatedAt' ]; /** @@ -223,41 +257,52 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'employee_first_name' => 'setEmployeeFirstName', + 'employee_middle_name' => 'setEmployeeMiddleName', + 'employee_last_name' => 'setEmployeeLastName', + 'employee_name_suffix' => 'setEmployeeNameSuffix', + 'employee_date_of_birth' => 'setEmployeeDateOfBirth', 'origin_of_health_coverage_code' => 'setOriginOfHealthCoverageCode', 'covered_individuals' => 'setCoveredIndividuals', - 'id' => 'setId', 'type' => 'setType', + 'id' => 'setId', 'issuer_id' => 'setIssuerId', 'issuer_reference_id' => 'setIssuerReferenceId', 'issuer_tin' => 'setIssuerTin', 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', 'tin' => 'setTin', 'recipient_name' => 'setRecipientName', + 'tin_type' => 'setTinType', 'recipient_second_name' => 'setRecipientSecondName', 'address' => 'setAddress', 'address2' => 'setAddress2', 'city' => 'setCity', 'state' => 'setState', 'zip' => 'setZip', - 'foreign_province' => 'setForeignProvince', + 'email' => 'setEmail', + 'account_number' => 'setAccountNumber', + 'office_code' => 'setOfficeCode', + 'non_us_province' => 'setNonUsProvince', 'country_code' => 'setCountryCode', + 'federal_efile_date' => 'setFederalEfileDate', + 'postal_mail' => 'setPostalMail', + 'state_efile_date' => 'setStateEfileDate', + 'recipient_edelivery_date' => 'setRecipientEdeliveryDate', + 'tin_match' => 'setTinMatch', + 'no_tin' => 'setNoTin', + 'address_verification' => 'setAddressVerification', + 'state_and_local_withholding' => 'setStateAndLocalWithholding', + 'second_tin_notice' => 'setSecondTinNotice', + 'federal_efile_status' => 'setFederalEfileStatus', + 'state_efile_status' => 'setStateEfileStatus', + 'postal_mail_status' => 'setPostalMailStatus', + 'tin_match_status' => 'setTinMatchStatus', + 'address_verification_status' => 'setAddressVerificationStatus', + 'e_delivery_status' => 'setEDeliveryStatus', 'validation_errors' => 'setValidationErrors', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' + 'updated_at' => 'setUpdatedAt' ]; /** @@ -266,41 +311,52 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'employee_first_name' => 'getEmployeeFirstName', + 'employee_middle_name' => 'getEmployeeMiddleName', + 'employee_last_name' => 'getEmployeeLastName', + 'employee_name_suffix' => 'getEmployeeNameSuffix', + 'employee_date_of_birth' => 'getEmployeeDateOfBirth', 'origin_of_health_coverage_code' => 'getOriginOfHealthCoverageCode', 'covered_individuals' => 'getCoveredIndividuals', - 'id' => 'getId', 'type' => 'getType', + 'id' => 'getId', 'issuer_id' => 'getIssuerId', 'issuer_reference_id' => 'getIssuerReferenceId', 'issuer_tin' => 'getIssuerTin', 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', 'tin' => 'getTin', 'recipient_name' => 'getRecipientName', + 'tin_type' => 'getTinType', 'recipient_second_name' => 'getRecipientSecondName', 'address' => 'getAddress', 'address2' => 'getAddress2', 'city' => 'getCity', 'state' => 'getState', 'zip' => 'getZip', - 'foreign_province' => 'getForeignProvince', + 'email' => 'getEmail', + 'account_number' => 'getAccountNumber', + 'office_code' => 'getOfficeCode', + 'non_us_province' => 'getNonUsProvince', 'country_code' => 'getCountryCode', + 'federal_efile_date' => 'getFederalEfileDate', + 'postal_mail' => 'getPostalMail', + 'state_efile_date' => 'getStateEfileDate', + 'recipient_edelivery_date' => 'getRecipientEdeliveryDate', + 'tin_match' => 'getTinMatch', + 'no_tin' => 'getNoTin', + 'address_verification' => 'getAddressVerification', + 'state_and_local_withholding' => 'getStateAndLocalWithholding', + 'second_tin_notice' => 'getSecondTinNotice', + 'federal_efile_status' => 'getFederalEfileStatus', + 'state_efile_status' => 'getStateEfileStatus', + 'postal_mail_status' => 'getPostalMailStatus', + 'tin_match_status' => 'getTinMatchStatus', + 'address_verification_status' => 'getAddressVerificationStatus', + 'e_delivery_status' => 'getEDeliveryStatus', 'validation_errors' => 'getValidationErrors', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' + 'updated_at' => 'getUpdatedAt' ]; /** @@ -344,6 +400,81 @@ public function getModelName() return self::$openAPIModelName; } + const ORIGIN_OF_HEALTH_COVERAGE_CODE_A = 'A'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_B = 'B'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_C = 'C'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_D = 'D'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_E = 'E'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_F = 'F'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_G = 'G'; + const TYPE__1099_NEC = '1099-NEC'; + const TYPE__1099_MISC = '1099-MISC'; + const TYPE__1099_DIV = '1099-DIV'; + const TYPE__1099_R = '1099-R'; + const TYPE__1099_K = '1099-K'; + const TYPE__1095_B = '1095-B'; + const TYPE__1042_S = '1042-S'; + const TYPE__1095_C = '1095-C'; + const TYPE__1099_INT = '1099-INT'; + const TIN_TYPE__EMPTY = 'Empty'; + const TIN_TYPE_EIN = 'EIN'; + const TIN_TYPE_SSN = 'SSN'; + const TIN_TYPE_ITIN = 'ITIN'; + const TIN_TYPE_ATIN = 'ATIN'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOriginOfHealthCoverageCodeAllowableValues() + { + return [ + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_A, + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_B, + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_C, + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_D, + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_E, + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_F, + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_G, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE__1099_NEC, + self::TYPE__1099_MISC, + self::TYPE__1099_DIV, + self::TYPE__1099_R, + self::TYPE__1099_K, + self::TYPE__1095_B, + self::TYPE__1042_S, + self::TYPE__1095_C, + self::TYPE__1099_INT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTinTypeAllowableValues() + { + return [ + self::TIN_TYPE__EMPTY, + self::TIN_TYPE_EIN, + self::TIN_TYPE_SSN, + self::TIN_TYPE_ITIN, + self::TIN_TYPE_ATIN, + ]; + } /** * Associative array for storing property values @@ -360,41 +491,52 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['employee_first_name'] = $data['employee_first_name'] ?? null; + $this->container['employee_middle_name'] = $data['employee_middle_name'] ?? null; + $this->container['employee_last_name'] = $data['employee_last_name'] ?? null; + $this->container['employee_name_suffix'] = $data['employee_name_suffix'] ?? null; + $this->container['employee_date_of_birth'] = $data['employee_date_of_birth'] ?? null; $this->container['origin_of_health_coverage_code'] = $data['origin_of_health_coverage_code'] ?? null; $this->container['covered_individuals'] = $data['covered_individuals'] ?? null; - $this->container['id'] = $data['id'] ?? null; $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; $this->container['issuer_id'] = $data['issuer_id'] ?? null; $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['tin'] = $data['tin'] ?? null; $this->container['recipient_name'] = $data['recipient_name'] ?? null; + $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['address2'] = $data['address2'] ?? null; $this->container['city'] = $data['city'] ?? null; $this->container['state'] = $data['state'] ?? null; $this->container['zip'] = $data['zip'] ?? null; - $this->container['foreign_province'] = $data['foreign_province'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['account_number'] = $data['account_number'] ?? null; + $this->container['office_code'] = $data['office_code'] ?? null; + $this->container['non_us_province'] = $data['non_us_province'] ?? null; $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['federal_efile_date'] = $data['federal_efile_date'] ?? null; + $this->container['postal_mail'] = $data['postal_mail'] ?? null; + $this->container['state_efile_date'] = $data['state_efile_date'] ?? null; + $this->container['recipient_edelivery_date'] = $data['recipient_edelivery_date'] ?? null; + $this->container['tin_match'] = $data['tin_match'] ?? null; + $this->container['no_tin'] = $data['no_tin'] ?? null; + $this->container['address_verification'] = $data['address_verification'] ?? null; + $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; + $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; + $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; + $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; + $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; + $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; + $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; + $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['validation_errors'] = $data['validation_errors'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; } /** @@ -406,6 +548,57 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['employee_first_name'] === null) { + $invalidProperties[] = "'employee_first_name' can't be null"; + } + if ($this->container['employee_last_name'] === null) { + $invalidProperties[] = "'employee_last_name' can't be null"; + } + if ($this->container['origin_of_health_coverage_code'] === null) { + $invalidProperties[] = "'origin_of_health_coverage_code' can't be null"; + } + $allowedValues = $this->getOriginOfHealthCoverageCodeAllowableValues(); + if (!is_null($this->container['origin_of_health_coverage_code']) && !in_array($this->container['origin_of_health_coverage_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'origin_of_health_coverage_code', must be one of '%s'", + $this->container['origin_of_health_coverage_code'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['recipient_name'] === null) { + $invalidProperties[] = "'recipient_name' can't be null"; + } + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tin_type', must be one of '%s'", + $this->container['tin_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } return $invalidProperties; } @@ -422,10 +615,130 @@ public function valid() /** - * Gets origin_of_health_coverage_code + * Gets employee_first_name + * + * @return string + */ + public function getEmployeeFirstName() + { + return $this->container['employee_first_name']; + } + + /** + * Sets employee_first_name + * + * @param string $employee_first_name Employee's first name + * + * @return self + */ + public function setEmployeeFirstName($employee_first_name) + { + $this->container['employee_first_name'] = $employee_first_name; + + return $this; + } + + /** + * Gets employee_middle_name + * + * @return string|null + */ + public function getEmployeeMiddleName() + { + return $this->container['employee_middle_name']; + } + + /** + * Sets employee_middle_name + * + * @param string|null $employee_middle_name Employee's middle name + * + * @return self + */ + public function setEmployeeMiddleName($employee_middle_name) + { + $this->container['employee_middle_name'] = $employee_middle_name; + + return $this; + } + + /** + * Gets employee_last_name + * + * @return string + */ + public function getEmployeeLastName() + { + return $this->container['employee_last_name']; + } + + /** + * Sets employee_last_name + * + * @param string $employee_last_name Employee's last name + * + * @return self + */ + public function setEmployeeLastName($employee_last_name) + { + $this->container['employee_last_name'] = $employee_last_name; + + return $this; + } + + /** + * Gets employee_name_suffix * * @return string|null */ + public function getEmployeeNameSuffix() + { + return $this->container['employee_name_suffix']; + } + + /** + * Sets employee_name_suffix + * + * @param string|null $employee_name_suffix Employee's name suffix + * + * @return self + */ + public function setEmployeeNameSuffix($employee_name_suffix) + { + $this->container['employee_name_suffix'] = $employee_name_suffix; + + return $this; + } + + /** + * Gets employee_date_of_birth + * + * @return \DateTime|null + */ + public function getEmployeeDateOfBirth() + { + return $this->container['employee_date_of_birth']; + } + + /** + * Sets employee_date_of_birth + * + * @param \DateTime|null $employee_date_of_birth Employee's date of birth + * + * @return self + */ + public function setEmployeeDateOfBirth($employee_date_of_birth) + { + $this->container['employee_date_of_birth'] = $employee_date_of_birth; + + return $this; + } + + /** + * Gets origin_of_health_coverage_code + * + * @return string + */ public function getOriginOfHealthCoverageCode() { return $this->container['origin_of_health_coverage_code']; @@ -434,12 +747,22 @@ public function getOriginOfHealthCoverageCode() /** * Sets origin_of_health_coverage_code * - * @param string|null $origin_of_health_coverage_code origin_of_health_coverage_code + * @param string $origin_of_health_coverage_code Origin of health coverage code Available values: - A: Small Business Health Options Program (SHOP) - B: Employer-sponsored coverage - C: Government-sponsored program - D: Individual market insurance - E: Multiemployer plan - F: Other designated minimum essential coverage - G: Employer-sponsored coverage that is an individual coverage HRA (valid for tax years 2020 and later) * * @return self */ public function setOriginOfHealthCoverageCode($origin_of_health_coverage_code) { + $allowedValues = $this->getOriginOfHealthCoverageCodeAllowableValues(); + if (!in_array($origin_of_health_coverage_code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'origin_of_health_coverage_code', must be one of '%s'", + $origin_of_health_coverage_code, + implode("', '", $allowedValues) + ) + ); + } $this->container['origin_of_health_coverage_code'] = $origin_of_health_coverage_code; return $this; @@ -448,7 +771,7 @@ public function setOriginOfHealthCoverageCode($origin_of_health_coverage_code) /** * Gets covered_individuals * - * @return \Avalara\SDK\Model\A1099\V2\CoveredIndividualReference[]|null + * @return \Avalara\SDK\Model\A1099\V2\CoveredIndividual[]|null */ public function getCoveredIndividuals() { @@ -458,7 +781,7 @@ public function getCoveredIndividuals() /** * Sets covered_individuals * - * @param \Avalara\SDK\Model\A1099\V2\CoveredIndividualReference[]|null $covered_individuals covered_individuals + * @param \Avalara\SDK\Model\A1099\V2\CoveredIndividual[]|null $covered_individuals Covered individuals information - At least one month of coverage must be entered if it's not a correction. * * @return self */ @@ -472,49 +795,59 @@ public function setCoveredIndividuals($covered_individuals) } /** - * Gets id + * Gets type * - * @return string|null + * @return string */ - public function getId() + public function getType() { - return $this->container['id']; + return $this->container['type']; } /** - * Sets id + * Sets type * - * @param string|null $id id + * @param string $type Form type * * @return self */ - public function setId($id) + public function setType($type) { - $this->container['id'] = $id; + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; return $this; } /** - * Gets type + * Gets id * * @return string|null */ - public function getType() + public function getId() { - return $this->container['type']; + return $this->container['id']; } /** - * Sets type + * Sets id * - * @param string|null $type type + * @param string|null $id Form ID. Unique identifier set when the record is created. * * @return self */ - public function setType($type) + public function setId($id) { - $this->container['type'] = $type; + $this->container['id'] = $id; return $this; } @@ -522,7 +855,7 @@ public function setType($type) /** * Gets issuer_id * - * @return int|null + * @return string|null */ public function getIssuerId() { @@ -532,7 +865,7 @@ public function getIssuerId() /** * Sets issuer_id * - * @param int|null $issuer_id issuer_id + * @param string|null $issuer_id Issuer ID - only required when creating forms * * @return self */ @@ -556,7 +889,7 @@ public function getIssuerReferenceId() /** * Sets issuer_reference_id * - * @param string|null $issuer_reference_id issuer_reference_id + * @param string|null $issuer_reference_id Issuer Reference ID - only required when creating forms * * @return self */ @@ -580,7 +913,7 @@ public function getIssuerTin() /** * Sets issuer_tin * - * @param string|null $issuer_tin issuer_tin + * @param string|null $issuer_tin Issuer TIN - readonly * * @return self */ @@ -604,7 +937,7 @@ public function getTaxYear() /** * Sets tax_year * - * @param int|null $tax_year tax_year + * @param int|null $tax_year Tax Year - only required when creating forms * * @return self */ @@ -616,555 +949,733 @@ public function setTaxYear($tax_year) } /** - * Gets federal_efile + * Gets reference_id * - * @return bool|null + * @return string|null */ - public function getFederalEfile() + public function getReferenceId() { - return $this->container['federal_efile']; + return $this->container['reference_id']; } /** - * Sets federal_efile + * Sets reference_id * - * @param bool|null $federal_efile federal_efile + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ - public function setFederalEfile($federal_efile) + public function setReferenceId($reference_id) { - $this->container['federal_efile'] = $federal_efile; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets federal_efile_status + * Gets tin * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getFederalEfileStatus() + public function getTin() { - return $this->container['federal_efile_status']; + return $this->container['tin']; } /** - * Sets federal_efile_status + * Sets tin * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status federal_efile_status + * @param string|null $tin Recipient's Federal Tax Identification Number (TIN). * * @return self */ - public function setFederalEfileStatus($federal_efile_status) + public function setTin($tin) { - $this->container['federal_efile_status'] = $federal_efile_status; + $this->container['tin'] = $tin; + + return $this; + } + + /** + * Gets recipient_name + * + * @return string + */ + public function getRecipientName() + { + return $this->container['recipient_name']; + } + + /** + * Sets recipient_name + * + * @param string $recipient_name Recipient name + * + * @return self + */ + public function setRecipientName($recipient_name) + { + $this->container['recipient_name'] = $recipient_name; + + return $this; + } + + /** + * Gets tin_type + * + * @return string|null + */ + public function getTinType() + { + return $this->container['tin_type']; + } + + /** + * Sets tin_type + * + * @param string|null $tin_type Type of TIN (Tax ID Number) + * + * @return self + */ + public function setTinType($tin_type) + { + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tin_type', must be one of '%s'", + $tin_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tin_type'] = $tin_type; + + return $this; + } + + /** + * Gets recipient_second_name + * + * @return string|null + */ + public function getRecipientSecondName() + { + return $this->container['recipient_second_name']; + } + + /** + * Sets recipient_second_name + * + * @param string|null $recipient_second_name Recipient second name + * + * @return self + */ + public function setRecipientSecondName($recipient_second_name) + { + $this->container['recipient_second_name'] = $recipient_second_name; + + return $this; + } + + /** + * Gets address + * + * @return string + */ + public function getAddress() + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param string $address Address. + * + * @return self + */ + public function setAddress($address) + { + $this->container['address'] = $address; + + return $this; + } + + /** + * Gets address2 + * + * @return string|null + */ + public function getAddress2() + { + return $this->container['address2']; + } + + /** + * Sets address2 + * + * @param string|null $address2 Address line 2. + * + * @return self + */ + public function setAddress2($address2) + { + $this->container['address2'] = $address2; + + return $this; + } + + /** + * Gets city + * + * @return string + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string $city City. + * + * @return self + */ + public function setCity($city) + { + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState() + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). + * + * @return self + */ + public function setState($state) + { + $this->container['state'] = $state; return $this; } /** - * Gets state_efile + * Gets zip * - * @return bool|null + * @return string|null */ - public function getStateEfile() + public function getZip() { - return $this->container['state_efile']; + return $this->container['zip']; } /** - * Sets state_efile + * Sets zip * - * @param bool|null $state_efile state_efile + * @param string|null $zip ZIP/postal code. * * @return self */ - public function setStateEfile($state_efile) + public function setZip($zip) { - $this->container['state_efile'] = $state_efile; + $this->container['zip'] = $zip; return $this; } /** - * Gets state_efile_status + * Gets email * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null + * @return string|null */ - public function getStateEfileStatus() + public function getEmail() { - return $this->container['state_efile_status']; + return $this->container['email']; } /** - * Sets state_efile_status + * Sets email * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status state_efile_status + * @param string|null $email Recipient's Contact email address. * * @return self */ - public function setStateEfileStatus($state_efile_status) + public function setEmail($email) { - - - $this->container['state_efile_status'] = $state_efile_status; + $this->container['email'] = $email; return $this; } /** - * Gets postal_mail + * Gets account_number * - * @return bool|null + * @return string|null */ - public function getPostalMail() + public function getAccountNumber() { - return $this->container['postal_mail']; + return $this->container['account_number']; } /** - * Sets postal_mail + * Sets account_number * - * @param bool|null $postal_mail postal_mail + * @param string|null $account_number Account number * * @return self */ - public function setPostalMail($postal_mail) + public function setAccountNumber($account_number) { - $this->container['postal_mail'] = $postal_mail; + $this->container['account_number'] = $account_number; return $this; } /** - * Gets postal_mail_status + * Gets office_code * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getPostalMailStatus() + public function getOfficeCode() { - return $this->container['postal_mail_status']; + return $this->container['office_code']; } /** - * Sets postal_mail_status + * Sets office_code * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status postal_mail_status + * @param string|null $office_code Office code * * @return self */ - public function setPostalMailStatus($postal_mail_status) + public function setOfficeCode($office_code) { - $this->container['postal_mail_status'] = $postal_mail_status; + $this->container['office_code'] = $office_code; return $this; } /** - * Gets tin_match + * Gets non_us_province * - * @return bool|null + * @return string|null */ - public function getTinMatch() + public function getNonUsProvince() { - return $this->container['tin_match']; + return $this->container['non_us_province']; } /** - * Sets tin_match + * Sets non_us_province * - * @param bool|null $tin_match tin_match + * @param string|null $non_us_province Province or region for non-US/CA addresses. * * @return self */ - public function setTinMatch($tin_match) + public function setNonUsProvince($non_us_province) { - $this->container['tin_match'] = $tin_match; + $this->container['non_us_province'] = $non_us_province; return $this; } /** - * Gets tin_match_status + * Gets country_code * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string */ - public function getTinMatchStatus() + public function getCountryCode() { - return $this->container['tin_match_status']; + return $this->container['country_code']; } /** - * Sets tin_match_status + * Sets country_code * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status tin_match_status + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ - public function setTinMatchStatus($tin_match_status) + public function setCountryCode($country_code) { - $this->container['tin_match_status'] = $tin_match_status; + $this->container['country_code'] = $country_code; return $this; } /** - * Gets address_verification + * Gets federal_efile_date * - * @return bool|null + * @return \DateTime|null */ - public function getAddressVerification() + public function getFederalEfileDate() { - return $this->container['address_verification']; + return $this->container['federal_efile_date']; } /** - * Sets address_verification + * Sets federal_efile_date * - * @param bool|null $address_verification address_verification + * @param \DateTime|null $federal_efile_date Date when federal e-filing should be scheduled for this form * * @return self */ - public function setAddressVerification($address_verification) + public function setFederalEfileDate($federal_efile_date) { - $this->container['address_verification'] = $address_verification; + $this->container['federal_efile_date'] = $federal_efile_date; return $this; } /** - * Gets address_verification_status + * Gets postal_mail * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return bool|null */ - public function getAddressVerificationStatus() + public function getPostalMail() { - return $this->container['address_verification_status']; + return $this->container['postal_mail']; } /** - * Sets address_verification_status + * Sets postal_mail * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status address_verification_status + * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form * * @return self */ - public function setAddressVerificationStatus($address_verification_status) + public function setPostalMail($postal_mail) { - $this->container['address_verification_status'] = $address_verification_status; + $this->container['postal_mail'] = $postal_mail; return $this; } /** - * Gets reference_id + * Gets state_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getReferenceId() + public function getStateEfileDate() { - return $this->container['reference_id']; + return $this->container['state_efile_date']; } /** - * Sets reference_id + * Sets state_efile_date * - * @param string|null $reference_id reference_id + * @param \DateTime|null $state_efile_date Date when state e-filing should be scheduled for this form * * @return self */ - public function setReferenceId($reference_id) + public function setStateEfileDate($state_efile_date) { - $this->container['reference_id'] = $reference_id; + $this->container['state_efile_date'] = $state_efile_date; return $this; } /** - * Gets email + * Gets recipient_edelivery_date * - * @return string|null + * @return \DateTime|null */ - public function getEmail() + public function getRecipientEdeliveryDate() { - return $this->container['email']; + return $this->container['recipient_edelivery_date']; } /** - * Sets email + * Sets recipient_edelivery_date * - * @param string|null $email email + * @param \DateTime|null $recipient_edelivery_date Date when recipient e-delivery should be scheduled for this form * * @return self */ - public function setEmail($email) + public function setRecipientEdeliveryDate($recipient_edelivery_date) { - $this->container['email'] = $email; + $this->container['recipient_edelivery_date'] = $recipient_edelivery_date; return $this; } /** - * Gets tin_type + * Gets tin_match * - * @return string|null + * @return bool|null */ - public function getTinType() + public function getTinMatch() { - return $this->container['tin_type']; + return $this->container['tin_match']; } /** - * Sets tin_type + * Sets tin_match * - * @param string|null $tin_type tin_type + * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form * * @return self */ - public function setTinType($tin_type) + public function setTinMatch($tin_match) { - $this->container['tin_type'] = $tin_type; + $this->container['tin_match'] = $tin_match; return $this; } /** - * Gets tin + * Gets no_tin * - * @return string|null + * @return bool|null */ - public function getTin() + public function getNoTin() { - return $this->container['tin']; + return $this->container['no_tin']; } /** - * Sets tin + * Sets no_tin * - * @param string|null $tin tin + * @param bool|null $no_tin No TIN indicator * * @return self */ - public function setTin($tin) + public function setNoTin($no_tin) { - $this->container['tin'] = $tin; + $this->container['no_tin'] = $no_tin; return $this; } /** - * Gets recipient_name + * Gets address_verification * - * @return string|null + * @return bool|null */ - public function getRecipientName() + public function getAddressVerification() { - return $this->container['recipient_name']; + return $this->container['address_verification']; } /** - * Sets recipient_name + * Sets address_verification * - * @param string|null $recipient_name recipient_name + * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form * * @return self */ - public function setRecipientName($recipient_name) + public function setAddressVerification($address_verification) { - $this->container['recipient_name'] = $recipient_name; + $this->container['address_verification'] = $address_verification; return $this; } /** - * Gets recipient_second_name + * Gets state_and_local_withholding * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null */ - public function getRecipientSecondName() + public function getStateAndLocalWithholding() { - return $this->container['recipient_second_name']; + return $this->container['state_and_local_withholding']; } /** - * Sets recipient_second_name + * Sets state_and_local_withholding * - * @param string|null $recipient_second_name recipient_second_name + * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding State and local withholding information * * @return self */ - public function setRecipientSecondName($recipient_second_name) + public function setStateAndLocalWithholding($state_and_local_withholding) { - $this->container['recipient_second_name'] = $recipient_second_name; + $this->container['state_and_local_withholding'] = $state_and_local_withholding; return $this; } /** - * Gets address + * Gets second_tin_notice * - * @return string|null + * @return bool|null */ - public function getAddress() + public function getSecondTinNotice() { - return $this->container['address']; + return $this->container['second_tin_notice']; } /** - * Sets address + * Sets second_tin_notice * - * @param string|null $address address + * @param bool|null $second_tin_notice Second TIN notice * * @return self */ - public function setAddress($address) + public function setSecondTinNotice($second_tin_notice) { - $this->container['address'] = $address; + $this->container['second_tin_notice'] = $second_tin_notice; return $this; } /** - * Gets address2 + * Gets federal_efile_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getAddress2() + public function getFederalEfileStatus() { - return $this->container['address2']; + return $this->container['federal_efile_status']; } /** - * Sets address2 + * Sets federal_efile_status * - * @param string|null $address2 address2 + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status Federal e-file status * * @return self */ - public function setAddress2($address2) + public function setFederalEfileStatus($federal_efile_status) { - $this->container['address2'] = $address2; + $this->container['federal_efile_status'] = $federal_efile_status; return $this; } /** - * Gets city + * Gets state_efile_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null */ - public function getCity() + public function getStateEfileStatus() { - return $this->container['city']; + return $this->container['state_efile_status']; } /** - * Sets city + * Sets state_efile_status * - * @param string|null $city city + * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status State e-file status * * @return self */ - public function setCity($city) + public function setStateEfileStatus($state_efile_status) { - $this->container['city'] = $city; + + + $this->container['state_efile_status'] = $state_efile_status; return $this; } /** - * Gets state + * Gets postal_mail_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getState() + public function getPostalMailStatus() { - return $this->container['state']; + return $this->container['postal_mail_status']; } /** - * Sets state + * Sets postal_mail_status * - * @param string|null $state state + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status Postal mail to recipient status * * @return self */ - public function setState($state) + public function setPostalMailStatus($postal_mail_status) { - $this->container['state'] = $state; + $this->container['postal_mail_status'] = $postal_mail_status; return $this; } /** - * Gets zip + * Gets tin_match_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getZip() + public function getTinMatchStatus() { - return $this->container['zip']; + return $this->container['tin_match_status']; } /** - * Sets zip + * Sets tin_match_status * - * @param string|null $zip zip + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status TIN Match status * * @return self */ - public function setZip($zip) + public function setTinMatchStatus($tin_match_status) { - $this->container['zip'] = $zip; + $this->container['tin_match_status'] = $tin_match_status; return $this; } /** - * Gets foreign_province + * Gets address_verification_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getForeignProvince() + public function getAddressVerificationStatus() { - return $this->container['foreign_province']; + return $this->container['address_verification_status']; } /** - * Sets foreign_province + * Sets address_verification_status * - * @param string|null $foreign_province foreign_province + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status Address verification status * * @return self */ - public function setForeignProvince($foreign_province) + public function setAddressVerificationStatus($address_verification_status) { - $this->container['foreign_province'] = $foreign_province; + $this->container['address_verification_status'] = $address_verification_status; return $this; } /** - * Gets country_code + * Gets e_delivery_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getCountryCode() + public function getEDeliveryStatus() { - return $this->container['country_code']; + return $this->container['e_delivery_status']; } /** - * Sets country_code + * Sets e_delivery_status * - * @param string|null $country_code country_code + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $e_delivery_status EDelivery status * * @return self */ - public function setCountryCode($country_code) + public function setEDeliveryStatus($e_delivery_status) { - $this->container['country_code'] = $country_code; + $this->container['e_delivery_status'] = $e_delivery_status; return $this; } @@ -1182,7 +1693,7 @@ public function getValidationErrors() /** * Sets validation_errors * - * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors validation_errors + * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors Validation errors * * @return self */ @@ -1208,7 +1719,7 @@ public function getCreatedAt() /** * Sets created_at * - * @param \DateTime|null $created_at created_at + * @param \DateTime|null $created_at Date time when the record was created. * * @return self */ @@ -1232,7 +1743,7 @@ public function getUpdatedAt() /** * Sets updated_at * - * @param \DateTime|null $updated_at updated_at + * @param \DateTime|null $updated_at Date time when the record was last updated. * * @return self */ @@ -1242,30 +1753,6 @@ public function setUpdatedAt($updated_at) return $this; } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/Form1095BList.php b/lib/Model/A1099/V2/Form1095BList.php deleted file mode 100644 index c925a50..0000000 --- a/lib/Model/A1099/V2/Form1095BList.php +++ /dev/null @@ -1,364 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1095BList Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1095BList implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1095BList'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'forms' => '\Avalara\SDK\Model\A1099\V2\Form1095BListItem[]', - 'form_type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'forms' => null, - 'form_type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'forms' => 'forms', - 'form_type' => 'formType' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'forms' => 'setForms', - 'form_type' => 'setFormType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'forms' => 'getForms', - 'form_type' => 'getFormType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['forms'] = $data['forms'] ?? null; - $this->container['form_type'] = $data['form_type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets forms - * - * @return \Avalara\SDK\Model\A1099\V2\Form1095BListItem[]|null - */ - public function getForms() - { - return $this->container['forms']; - } - - /** - * Sets forms - * - * @param \Avalara\SDK\Model\A1099\V2\Form1095BListItem[]|null $forms forms - * - * @return self - */ - public function setForms($forms) - { - - - $this->container['forms'] = $forms; - - return $this; - } - - /** - * Gets form_type - * - * @return string|null - */ - public function getFormType() - { - return $this->container['form_type']; - } - - /** - * Sets form_type - * - * @param string|null $form_type form_type - * - * @return self - */ - public function setFormType($form_type) - { - $this->container['form_type'] = $form_type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1095BListItem.php b/lib/Model/A1099/V2/Form1095BListItem.php deleted file mode 100644 index c215b12..0000000 --- a/lib/Model/A1099/V2/Form1095BListItem.php +++ /dev/null @@ -1,1352 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1095BListItem Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1095BListItem implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1095BListItem'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'employee_first_name' => 'string', - 'employee_middle_name' => 'string', - 'employee_last_name' => 'string', - 'employee_name_suffix' => 'string', - 'employee_date_of_birth' => '\DateTime', - 'origin_of_health_coverage_code' => 'string', - 'covered_individuals' => '\Avalara\SDK\Model\A1099\V2\CoveredIndividualRequest[]', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'employee_first_name' => null, - 'employee_middle_name' => null, - 'employee_last_name' => null, - 'employee_name_suffix' => null, - 'employee_date_of_birth' => 'date-time', - 'origin_of_health_coverage_code' => null, - 'covered_individuals' => null, - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'employee_first_name' => 'employeeFirstName', - 'employee_middle_name' => 'employeeMiddleName', - 'employee_last_name' => 'employeeLastName', - 'employee_name_suffix' => 'employeeNameSuffix', - 'employee_date_of_birth' => 'employeeDateOfBirth', - 'origin_of_health_coverage_code' => 'originOfHealthCoverageCode', - 'covered_individuals' => 'coveredIndividuals', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'employee_first_name' => 'setEmployeeFirstName', - 'employee_middle_name' => 'setEmployeeMiddleName', - 'employee_last_name' => 'setEmployeeLastName', - 'employee_name_suffix' => 'setEmployeeNameSuffix', - 'employee_date_of_birth' => 'setEmployeeDateOfBirth', - 'origin_of_health_coverage_code' => 'setOriginOfHealthCoverageCode', - 'covered_individuals' => 'setCoveredIndividuals', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'employee_first_name' => 'getEmployeeFirstName', - 'employee_middle_name' => 'getEmployeeMiddleName', - 'employee_last_name' => 'getEmployeeLastName', - 'employee_name_suffix' => 'getEmployeeNameSuffix', - 'employee_date_of_birth' => 'getEmployeeDateOfBirth', - 'origin_of_health_coverage_code' => 'getOriginOfHealthCoverageCode', - 'covered_individuals' => 'getCoveredIndividuals', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const ORIGIN_OF_HEALTH_COVERAGE_CODE_A = 'A'; - const ORIGIN_OF_HEALTH_COVERAGE_CODE_B = 'B'; - const ORIGIN_OF_HEALTH_COVERAGE_CODE_C = 'C'; - const ORIGIN_OF_HEALTH_COVERAGE_CODE_D = 'D'; - const ORIGIN_OF_HEALTH_COVERAGE_CODE_E = 'E'; - const ORIGIN_OF_HEALTH_COVERAGE_CODE_F = 'F'; - const ORIGIN_OF_HEALTH_COVERAGE_CODE_G = 'G'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getOriginOfHealthCoverageCodeAllowableValues() - { - return [ - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_A, - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_B, - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_C, - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_D, - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_E, - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_F, - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_G, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['employee_first_name'] = $data['employee_first_name'] ?? null; - $this->container['employee_middle_name'] = $data['employee_middle_name'] ?? null; - $this->container['employee_last_name'] = $data['employee_last_name'] ?? null; - $this->container['employee_name_suffix'] = $data['employee_name_suffix'] ?? null; - $this->container['employee_date_of_birth'] = $data['employee_date_of_birth'] ?? null; - $this->container['origin_of_health_coverage_code'] = $data['origin_of_health_coverage_code'] ?? null; - $this->container['covered_individuals'] = $data['covered_individuals'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getOriginOfHealthCoverageCodeAllowableValues(); - if (!is_null($this->container['origin_of_health_coverage_code']) && !in_array($this->container['origin_of_health_coverage_code'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'origin_of_health_coverage_code', must be one of '%s'", - $this->container['origin_of_health_coverage_code'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets employee_first_name - * - * @return string|null - */ - public function getEmployeeFirstName() - { - return $this->container['employee_first_name']; - } - - /** - * Sets employee_first_name - * - * @param string|null $employee_first_name Employee's first name - * - * @return self - */ - public function setEmployeeFirstName($employee_first_name) - { - $this->container['employee_first_name'] = $employee_first_name; - - return $this; - } - - /** - * Gets employee_middle_name - * - * @return string|null - */ - public function getEmployeeMiddleName() - { - return $this->container['employee_middle_name']; - } - - /** - * Sets employee_middle_name - * - * @param string|null $employee_middle_name Employee's middle name - * - * @return self - */ - public function setEmployeeMiddleName($employee_middle_name) - { - $this->container['employee_middle_name'] = $employee_middle_name; - - return $this; - } - - /** - * Gets employee_last_name - * - * @return string|null - */ - public function getEmployeeLastName() - { - return $this->container['employee_last_name']; - } - - /** - * Sets employee_last_name - * - * @param string|null $employee_last_name Employee's last name - * - * @return self - */ - public function setEmployeeLastName($employee_last_name) - { - $this->container['employee_last_name'] = $employee_last_name; - - return $this; - } - - /** - * Gets employee_name_suffix - * - * @return string|null - */ - public function getEmployeeNameSuffix() - { - return $this->container['employee_name_suffix']; - } - - /** - * Sets employee_name_suffix - * - * @param string|null $employee_name_suffix Employee's name suffix - * - * @return self - */ - public function setEmployeeNameSuffix($employee_name_suffix) - { - $this->container['employee_name_suffix'] = $employee_name_suffix; - - return $this; - } - - /** - * Gets employee_date_of_birth - * - * @return \DateTime|null - */ - public function getEmployeeDateOfBirth() - { - return $this->container['employee_date_of_birth']; - } - - /** - * Sets employee_date_of_birth - * - * @param \DateTime|null $employee_date_of_birth Employee's date of birth - * - * @return self - */ - public function setEmployeeDateOfBirth($employee_date_of_birth) - { - $this->container['employee_date_of_birth'] = $employee_date_of_birth; - - return $this; - } - - /** - * Gets origin_of_health_coverage_code - * - * @return string|null - */ - public function getOriginOfHealthCoverageCode() - { - return $this->container['origin_of_health_coverage_code']; - } - - /** - * Sets origin_of_health_coverage_code - * - * @param string|null $origin_of_health_coverage_code Origin of health coverage code - * - * @return self - */ - public function setOriginOfHealthCoverageCode($origin_of_health_coverage_code) - { - $allowedValues = $this->getOriginOfHealthCoverageCodeAllowableValues(); - if (!is_null($origin_of_health_coverage_code) && !in_array($origin_of_health_coverage_code, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'origin_of_health_coverage_code', must be one of '%s'", - $origin_of_health_coverage_code, - implode("', '", $allowedValues) - ) - ); - } - $this->container['origin_of_health_coverage_code'] = $origin_of_health_coverage_code; - - return $this; - } - - /** - * Gets covered_individuals - * - * @return \Avalara\SDK\Model\A1099\V2\CoveredIndividualRequest[]|null - */ - public function getCoveredIndividuals() - { - return $this->container['covered_individuals']; - } - - /** - * Sets covered_individuals - * - * @param \Avalara\SDK\Model\A1099\V2\CoveredIndividualRequest[]|null $covered_individuals Covered individuals information - * - * @return self - */ - public function setCoveredIndividuals($covered_individuals) - { - - - $this->container['covered_individuals'] = $covered_individuals; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1095BListItem., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1095BListItem., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1095BListItem., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1095BListItemResponse.php b/lib/Model/A1099/V2/Form1095BListItemResponse.php deleted file mode 100644 index 82457aa..0000000 --- a/lib/Model/A1099/V2/Form1095BListItemResponse.php +++ /dev/null @@ -1,1580 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1095BListItemResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1095BListItemResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1095BListItemResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'origin_of_health_coverage_code' => 'string', - 'covered_individuals' => '\Avalara\SDK\Model\A1099\V2\CoveredIndividualReferenceResponse[]', - 'id' => 'string', - 'type' => 'string', - 'issuer_id' => 'int', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', - 'tin' => 'string', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'recipient_name' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'fatca_filing_requirement' => 'bool', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'origin_of_health_coverage_code' => null, - 'covered_individuals' => null, - 'id' => null, - 'type' => null, - 'issuer_id' => 'int32', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, - 'e_delivery_status' => null, - 'reference_id' => null, - 'email' => null, - 'tin_type' => null, - 'tin' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'recipient_name' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'non_us_province' => null, - 'country_code' => null, - 'account_number' => null, - 'office_code' => null, - 'fatca_filing_requirement' => null, - 'validation_errors' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'origin_of_health_coverage_code' => 'originOfHealthCoverageCode', - 'covered_individuals' => 'coveredIndividuals', - 'id' => 'id', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', - 'tin' => 'tin', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'recipient_name' => 'recipientName', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'validation_errors' => 'validationErrors', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'origin_of_health_coverage_code' => 'setOriginOfHealthCoverageCode', - 'covered_individuals' => 'setCoveredIndividuals', - 'id' => 'setId', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', - 'tin' => 'setTin', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'recipient_name' => 'setRecipientName', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'validation_errors' => 'setValidationErrors', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'origin_of_health_coverage_code' => 'getOriginOfHealthCoverageCode', - 'covered_individuals' => 'getCoveredIndividuals', - 'id' => 'getId', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', - 'tin' => 'getTin', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'recipient_name' => 'getRecipientName', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'validation_errors' => 'getValidationErrors', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['origin_of_health_coverage_code'] = $data['origin_of_health_coverage_code'] ?? null; - $this->container['covered_individuals'] = $data['covered_individuals'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ((mb_strlen($this->container['id']) < 1)) { - $invalidProperties[] = "invalid value for 'id', the character length must be bigger than or equal to 1."; - } - - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ((mb_strlen($this->container['type']) < 1)) { - $invalidProperties[] = "invalid value for 'type', the character length must be bigger than or equal to 1."; - } - - if ($this->container['issuer_id'] === null) { - $invalidProperties[] = "'issuer_id' can't be null"; - } - if ($this->container['federal_efile'] === null) { - $invalidProperties[] = "'federal_efile' can't be null"; - } - if ($this->container['state_efile'] === null) { - $invalidProperties[] = "'state_efile' can't be null"; - } - if ($this->container['postal_mail'] === null) { - $invalidProperties[] = "'postal_mail' can't be null"; - } - if ($this->container['tin_match'] === null) { - $invalidProperties[] = "'tin_match' can't be null"; - } - if ($this->container['address_verification'] === null) { - $invalidProperties[] = "'address_verification' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets origin_of_health_coverage_code - * - * @return string|null - */ - public function getOriginOfHealthCoverageCode() - { - return $this->container['origin_of_health_coverage_code']; - } - - /** - * Sets origin_of_health_coverage_code - * - * @param string|null $origin_of_health_coverage_code Origin of health coverage code - * - * @return self - */ - public function setOriginOfHealthCoverageCode($origin_of_health_coverage_code) - { - $this->container['origin_of_health_coverage_code'] = $origin_of_health_coverage_code; - - return $this; - } - - /** - * Gets covered_individuals - * - * @return \Avalara\SDK\Model\A1099\V2\CoveredIndividualReferenceResponse[]|null - */ - public function getCoveredIndividuals() - { - return $this->container['covered_individuals']; - } - - /** - * Sets covered_individuals - * - * @param \Avalara\SDK\Model\A1099\V2\CoveredIndividualReferenceResponse[]|null $covered_individuals Covered individuals information - * - * @return self - */ - public function setCoveredIndividuals($covered_individuals) - { - - - $this->container['covered_individuals'] = $covered_individuals; - - return $this; - } - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID of the form - * - * @return self - */ - public function setId($id) - { - - if ((mb_strlen($id) < 1)) { - throw new \InvalidArgumentException('invalid length for $id when calling Form1095BListItemResponse., must be bigger than or equal to 1.'); - } - - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * - * @return self - */ - public function setType($type) - { - - if ((mb_strlen($type) < 1)) { - throw new \InvalidArgumentException('invalid length for $type when calling Form1095BListItemResponse., must be bigger than or equal to 1.'); - } - - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return int - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param int $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets federal_efile - * - * @return bool - */ - public function getFederalEfile() - { - return $this->container['federal_efile']; - } - - /** - * Sets federal_efile - * - * @param bool $federal_efile Boolean indicating that federal e-filing has been scheduled for this form - * - * @return self - */ - public function setFederalEfile($federal_efile) - { - $this->container['federal_efile'] = $federal_efile; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status Federal e-file status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets state_efile - * - * @return bool - */ - public function getStateEfile() - { - return $this->container['state_efile']; - } - - /** - * Sets state_efile - * - * @param bool $state_efile Boolean indicating that state e-filing has been scheduled for this form - * - * @return self - */ - public function setStateEfile($state_efile) - { - $this->container['state_efile'] = $state_efile; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status State e-file status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool $postal_mail Boolean indicating that postal mailing to the recipient has been scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status Postal mail to recipient status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool $tin_match Boolean indicating that TIN Matching has been scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status TIN Match status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool $address_verification Boolean indicating that address verification has been scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status Address verification status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status EDelivery status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin Recipient Tax ID Number - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second Tin Notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address Address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city City - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account Number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office Code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors Validation errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Creation time - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Update time - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1095BRequest.php b/lib/Model/A1099/V2/Form1095BRequest.php deleted file mode 100644 index 5b3c69e..0000000 --- a/lib/Model/A1099/V2/Form1095BRequest.php +++ /dev/null @@ -1,1428 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1095BRequest Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1095BRequest implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1095BRequest'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'employee_first_name' => 'string', - 'employee_middle_name' => 'string', - 'employee_last_name' => 'string', - 'employee_name_suffix' => 'string', - 'employee_date_of_birth' => '\DateTime', - 'origin_of_health_coverage_code' => 'string', - 'covered_individuals' => '\Avalara\SDK\Model\A1099\V2\CoveredIndividualRequest[]', - 'type' => 'string', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'employee_first_name' => null, - 'employee_middle_name' => null, - 'employee_last_name' => null, - 'employee_name_suffix' => null, - 'employee_date_of_birth' => 'date-time', - 'origin_of_health_coverage_code' => null, - 'covered_individuals' => null, - 'type' => null, - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'employee_first_name' => 'employeeFirstName', - 'employee_middle_name' => 'employeeMiddleName', - 'employee_last_name' => 'employeeLastName', - 'employee_name_suffix' => 'employeeNameSuffix', - 'employee_date_of_birth' => 'employeeDateOfBirth', - 'origin_of_health_coverage_code' => 'originOfHealthCoverageCode', - 'covered_individuals' => 'coveredIndividuals', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'employee_first_name' => 'setEmployeeFirstName', - 'employee_middle_name' => 'setEmployeeMiddleName', - 'employee_last_name' => 'setEmployeeLastName', - 'employee_name_suffix' => 'setEmployeeNameSuffix', - 'employee_date_of_birth' => 'setEmployeeDateOfBirth', - 'origin_of_health_coverage_code' => 'setOriginOfHealthCoverageCode', - 'covered_individuals' => 'setCoveredIndividuals', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'employee_first_name' => 'getEmployeeFirstName', - 'employee_middle_name' => 'getEmployeeMiddleName', - 'employee_last_name' => 'getEmployeeLastName', - 'employee_name_suffix' => 'getEmployeeNameSuffix', - 'employee_date_of_birth' => 'getEmployeeDateOfBirth', - 'origin_of_health_coverage_code' => 'getOriginOfHealthCoverageCode', - 'covered_individuals' => 'getCoveredIndividuals', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const ORIGIN_OF_HEALTH_COVERAGE_CODE_A = 'A'; - const ORIGIN_OF_HEALTH_COVERAGE_CODE_B = 'B'; - const ORIGIN_OF_HEALTH_COVERAGE_CODE_C = 'C'; - const ORIGIN_OF_HEALTH_COVERAGE_CODE_D = 'D'; - const ORIGIN_OF_HEALTH_COVERAGE_CODE_E = 'E'; - const ORIGIN_OF_HEALTH_COVERAGE_CODE_F = 'F'; - const ORIGIN_OF_HEALTH_COVERAGE_CODE_G = 'G'; - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getOriginOfHealthCoverageCodeAllowableValues() - { - return [ - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_A, - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_B, - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_C, - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_D, - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_E, - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_F, - self::ORIGIN_OF_HEALTH_COVERAGE_CODE_G, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['employee_first_name'] = $data['employee_first_name'] ?? null; - $this->container['employee_middle_name'] = $data['employee_middle_name'] ?? null; - $this->container['employee_last_name'] = $data['employee_last_name'] ?? null; - $this->container['employee_name_suffix'] = $data['employee_name_suffix'] ?? null; - $this->container['employee_date_of_birth'] = $data['employee_date_of_birth'] ?? null; - $this->container['origin_of_health_coverage_code'] = $data['origin_of_health_coverage_code'] ?? null; - $this->container['covered_individuals'] = $data['covered_individuals'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getOriginOfHealthCoverageCodeAllowableValues(); - if (!is_null($this->container['origin_of_health_coverage_code']) && !in_array($this->container['origin_of_health_coverage_code'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'origin_of_health_coverage_code', must be one of '%s'", - $this->container['origin_of_health_coverage_code'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets employee_first_name - * - * @return string|null - */ - public function getEmployeeFirstName() - { - return $this->container['employee_first_name']; - } - - /** - * Sets employee_first_name - * - * @param string|null $employee_first_name Employee's first name - * - * @return self - */ - public function setEmployeeFirstName($employee_first_name) - { - $this->container['employee_first_name'] = $employee_first_name; - - return $this; - } - - /** - * Gets employee_middle_name - * - * @return string|null - */ - public function getEmployeeMiddleName() - { - return $this->container['employee_middle_name']; - } - - /** - * Sets employee_middle_name - * - * @param string|null $employee_middle_name Employee's middle name - * - * @return self - */ - public function setEmployeeMiddleName($employee_middle_name) - { - $this->container['employee_middle_name'] = $employee_middle_name; - - return $this; - } - - /** - * Gets employee_last_name - * - * @return string|null - */ - public function getEmployeeLastName() - { - return $this->container['employee_last_name']; - } - - /** - * Sets employee_last_name - * - * @param string|null $employee_last_name Employee's last name - * - * @return self - */ - public function setEmployeeLastName($employee_last_name) - { - $this->container['employee_last_name'] = $employee_last_name; - - return $this; - } - - /** - * Gets employee_name_suffix - * - * @return string|null - */ - public function getEmployeeNameSuffix() - { - return $this->container['employee_name_suffix']; - } - - /** - * Sets employee_name_suffix - * - * @param string|null $employee_name_suffix Employee's name suffix - * - * @return self - */ - public function setEmployeeNameSuffix($employee_name_suffix) - { - $this->container['employee_name_suffix'] = $employee_name_suffix; - - return $this; - } - - /** - * Gets employee_date_of_birth - * - * @return \DateTime|null - */ - public function getEmployeeDateOfBirth() - { - return $this->container['employee_date_of_birth']; - } - - /** - * Sets employee_date_of_birth - * - * @param \DateTime|null $employee_date_of_birth Employee's date of birth - * - * @return self - */ - public function setEmployeeDateOfBirth($employee_date_of_birth) - { - $this->container['employee_date_of_birth'] = $employee_date_of_birth; - - return $this; - } - - /** - * Gets origin_of_health_coverage_code - * - * @return string|null - */ - public function getOriginOfHealthCoverageCode() - { - return $this->container['origin_of_health_coverage_code']; - } - - /** - * Sets origin_of_health_coverage_code - * - * @param string|null $origin_of_health_coverage_code Origin of health coverage code - * - * @return self - */ - public function setOriginOfHealthCoverageCode($origin_of_health_coverage_code) - { - $allowedValues = $this->getOriginOfHealthCoverageCodeAllowableValues(); - if (!is_null($origin_of_health_coverage_code) && !in_array($origin_of_health_coverage_code, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'origin_of_health_coverage_code', must be one of '%s'", - $origin_of_health_coverage_code, - implode("', '", $allowedValues) - ) - ); - } - $this->container['origin_of_health_coverage_code'] = $origin_of_health_coverage_code; - - return $this; - } - - /** - * Gets covered_individuals - * - * @return \Avalara\SDK\Model\A1099\V2\CoveredIndividualRequest[]|null - */ - public function getCoveredIndividuals() - { - return $this->container['covered_individuals']; - } - - /** - * Sets covered_individuals - * - * @param \Avalara\SDK\Model\A1099\V2\CoveredIndividualRequest[]|null $covered_individuals Covered individuals information - * - * @return self - */ - public function setCoveredIndividuals($covered_individuals) - { - - - $this->container['covered_individuals'] = $covered_individuals; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1095BRequest., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1095BRequest., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1095BRequest., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099MiscResponse.php b/lib/Model/A1099/V2/Form1095C.php similarity index 65% rename from lib/Model/A1099/V2/Form1099MiscResponse.php rename to lib/Model/A1099/V2/Form1095C.php index 3d6586f..97b79e7 100644 --- a/lib/Model/A1099/V2/Form1099MiscResponse.php +++ b/lib/Model/A1099/V2/Form1095C.php @@ -1,6 +1,6 @@ 'float', - 'royalties' => 'float', - 'other_income' => 'float', - 'fed_income_tax_withheld' => 'float', - 'fishing_boat_proceeds' => 'float', - 'medical_and_health_care_payments' => 'float', - 'direct_sales_indicator' => 'bool', - 'substitute_payments' => 'float', - 'crop_insurance_proceeds' => 'float', - 'gross_proceeds_paid_to_attorney' => 'float', - 'fish_purchased_for_resale' => 'float', - 'section409_a_deferrals' => 'float', - 'fatca_filing_requirement' => 'bool', - 'excess_golden_parachute_payments' => 'float', - 'nonqualified_deferred_compensation' => 'float', + 'employee_first_name' => 'string', + 'employee_middle_name' => 'string', + 'employee_last_name' => 'string', + 'employee_name_suffix' => 'string', + 'recipient_date_of_birth' => '\DateTime', + 'plan_start_month' => 'string', + 'employer_provided_si_coverage' => 'bool', + 'offer_and_coverages' => '\Avalara\SDK\Model\A1099\V2\OfferAndCoverage[]', + 'covered_individuals' => '\Avalara\SDK\Model\A1099\V2\CoveredIndividual[]', 'type' => 'string', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse', - 'tin_type' => 'string', 'id' => 'string', 'issuer_id' => 'string', 'issuer_reference_id' => 'string', 'issuer_tin' => 'string', 'tax_year' => 'int', 'reference_id' => 'string', + 'tin' => 'string', 'recipient_name' => 'string', - 'recipient_tin' => 'string', + 'tin_type' => 'string', 'recipient_second_name' => 'string', 'address' => 'string', 'address2' => 'string', @@ -110,20 +102,24 @@ class Form1099MiscResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'office_code' => 'string', 'non_us_province' => 'string', 'country_code' => 'string', - 'federal_e_file' => 'bool', + 'federal_efile_date' => '\DateTime', 'postal_mail' => 'bool', - 'state_e_file' => 'bool', + 'state_efile_date' => '\DateTime', + 'recipient_edelivery_date' => '\DateTime', 'tin_match' => 'bool', 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', 'address_verification' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]' + 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding', + 'second_tin_notice' => 'bool', + 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', + 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationError[]', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime' ]; /** @@ -134,34 +130,25 @@ class Form1099MiscResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ - 'rents' => 'double', - 'royalties' => 'double', - 'other_income' => 'double', - 'fed_income_tax_withheld' => 'double', - 'fishing_boat_proceeds' => 'double', - 'medical_and_health_care_payments' => 'double', - 'direct_sales_indicator' => null, - 'substitute_payments' => 'double', - 'crop_insurance_proceeds' => 'double', - 'gross_proceeds_paid_to_attorney' => 'double', - 'fish_purchased_for_resale' => 'double', - 'section409_a_deferrals' => 'double', - 'fatca_filing_requirement' => null, - 'excess_golden_parachute_payments' => 'double', - 'nonqualified_deferred_compensation' => 'double', + 'employee_first_name' => null, + 'employee_middle_name' => null, + 'employee_last_name' => null, + 'employee_name_suffix' => null, + 'recipient_date_of_birth' => 'date', + 'plan_start_month' => null, + 'employer_provided_si_coverage' => null, + 'offer_and_coverages' => null, + 'covered_individuals' => null, 'type' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null, - 'tin_type' => null, 'id' => null, 'issuer_id' => null, 'issuer_reference_id' => null, 'issuer_tin' => null, 'tax_year' => 'int32', 'reference_id' => null, + 'tin' => null, 'recipient_name' => null, - 'recipient_tin' => null, + 'tin_type' => null, 'recipient_second_name' => null, 'address' => null, 'address2' => null, @@ -173,20 +160,24 @@ class Form1099MiscResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'office_code' => null, 'non_us_province' => null, 'country_code' => null, - 'federal_e_file' => null, + 'federal_efile_date' => 'date', 'postal_mail' => null, - 'state_e_file' => null, + 'state_efile_date' => 'date', + 'recipient_edelivery_date' => 'date', 'tin_match' => null, 'no_tin' => null, - 'second_tin_notice' => null, 'address_verification' => null, + 'state_and_local_withholding' => null, + 'second_tin_notice' => null, 'federal_efile_status' => null, - 'e_delivery_status' => null, 'state_efile_status' => null, 'postal_mail_status' => null, 'tin_match_status' => null, 'address_verification_status' => null, - 'validation_errors' => null + 'e_delivery_status' => null, + 'validation_errors' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time' ]; /** @@ -216,34 +207,25 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'rents' => 'rents', - 'royalties' => 'royalties', - 'other_income' => 'otherIncome', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'fishingBoatProceeds', - 'medical_and_health_care_payments' => 'medicalAndHealthCarePayments', - 'direct_sales_indicator' => 'directSalesIndicator', - 'substitute_payments' => 'substitutePayments', - 'crop_insurance_proceeds' => 'cropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'grossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'fishPurchasedForResale', - 'section409_a_deferrals' => 'section409ADeferrals', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'excess_golden_parachute_payments' => 'excessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'nonqualifiedDeferredCompensation', + 'employee_first_name' => 'employeeFirstName', + 'employee_middle_name' => 'employeeMiddleName', + 'employee_last_name' => 'employeeLastName', + 'employee_name_suffix' => 'employeeNameSuffix', + 'recipient_date_of_birth' => 'recipientDateOfBirth', + 'plan_start_month' => 'planStartMonth', + 'employer_provided_si_coverage' => 'employerProvidedSiCoverage', + 'offer_and_coverages' => 'offerAndCoverages', + 'covered_individuals' => 'coveredIndividuals', 'type' => 'type', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'tin_type' => 'tinType', 'id' => 'id', 'issuer_id' => 'issuerId', 'issuer_reference_id' => 'issuerReferenceId', 'issuer_tin' => 'issuerTin', 'tax_year' => 'taxYear', 'reference_id' => 'referenceId', + 'tin' => 'tin', 'recipient_name' => 'recipientName', - 'recipient_tin' => 'recipientTin', + 'tin_type' => 'tinType', 'recipient_second_name' => 'recipientSecondName', 'address' => 'address', 'address2' => 'address2', @@ -255,20 +237,24 @@ public static function openAPIFormats() 'office_code' => 'officeCode', 'non_us_province' => 'nonUsProvince', 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', + 'federal_efile_date' => 'federalEfileDate', 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', + 'state_efile_date' => 'stateEfileDate', + 'recipient_edelivery_date' => 'recipientEdeliveryDate', 'tin_match' => 'tinMatch', 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', 'address_verification' => 'addressVerification', + 'state_and_local_withholding' => 'stateAndLocalWithholding', + 'second_tin_notice' => 'secondTinNotice', 'federal_efile_status' => 'federalEfileStatus', - 'e_delivery_status' => 'eDeliveryStatus', 'state_efile_status' => 'stateEfileStatus', 'postal_mail_status' => 'postalMailStatus', 'tin_match_status' => 'tinMatchStatus', 'address_verification_status' => 'addressVerificationStatus', - 'validation_errors' => 'validationErrors' + 'e_delivery_status' => 'eDeliveryStatus', + 'validation_errors' => 'validationErrors', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt' ]; /** @@ -277,34 +263,25 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'rents' => 'setRents', - 'royalties' => 'setRoyalties', - 'other_income' => 'setOtherIncome', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'setFishingBoatProceeds', - 'medical_and_health_care_payments' => 'setMedicalAndHealthCarePayments', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'substitute_payments' => 'setSubstitutePayments', - 'crop_insurance_proceeds' => 'setCropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'setGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'setFishPurchasedForResale', - 'section409_a_deferrals' => 'setSection409ADeferrals', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'excess_golden_parachute_payments' => 'setExcessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'setNonqualifiedDeferredCompensation', + 'employee_first_name' => 'setEmployeeFirstName', + 'employee_middle_name' => 'setEmployeeMiddleName', + 'employee_last_name' => 'setEmployeeLastName', + 'employee_name_suffix' => 'setEmployeeNameSuffix', + 'recipient_date_of_birth' => 'setRecipientDateOfBirth', + 'plan_start_month' => 'setPlanStartMonth', + 'employer_provided_si_coverage' => 'setEmployerProvidedSiCoverage', + 'offer_and_coverages' => 'setOfferAndCoverages', + 'covered_individuals' => 'setCoveredIndividuals', 'type' => 'setType', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'tin_type' => 'setTinType', 'id' => 'setId', 'issuer_id' => 'setIssuerId', 'issuer_reference_id' => 'setIssuerReferenceId', 'issuer_tin' => 'setIssuerTin', 'tax_year' => 'setTaxYear', 'reference_id' => 'setReferenceId', + 'tin' => 'setTin', 'recipient_name' => 'setRecipientName', - 'recipient_tin' => 'setRecipientTin', + 'tin_type' => 'setTinType', 'recipient_second_name' => 'setRecipientSecondName', 'address' => 'setAddress', 'address2' => 'setAddress2', @@ -316,20 +293,24 @@ public static function openAPIFormats() 'office_code' => 'setOfficeCode', 'non_us_province' => 'setNonUsProvince', 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', + 'federal_efile_date' => 'setFederalEfileDate', 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', + 'state_efile_date' => 'setStateEfileDate', + 'recipient_edelivery_date' => 'setRecipientEdeliveryDate', 'tin_match' => 'setTinMatch', 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', 'address_verification' => 'setAddressVerification', + 'state_and_local_withholding' => 'setStateAndLocalWithholding', + 'second_tin_notice' => 'setSecondTinNotice', 'federal_efile_status' => 'setFederalEfileStatus', - 'e_delivery_status' => 'setEDeliveryStatus', 'state_efile_status' => 'setStateEfileStatus', 'postal_mail_status' => 'setPostalMailStatus', 'tin_match_status' => 'setTinMatchStatus', 'address_verification_status' => 'setAddressVerificationStatus', - 'validation_errors' => 'setValidationErrors' + 'e_delivery_status' => 'setEDeliveryStatus', + 'validation_errors' => 'setValidationErrors', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -338,34 +319,25 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'rents' => 'getRents', - 'royalties' => 'getRoyalties', - 'other_income' => 'getOtherIncome', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'getFishingBoatProceeds', - 'medical_and_health_care_payments' => 'getMedicalAndHealthCarePayments', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'substitute_payments' => 'getSubstitutePayments', - 'crop_insurance_proceeds' => 'getCropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'getGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'getFishPurchasedForResale', - 'section409_a_deferrals' => 'getSection409ADeferrals', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'excess_golden_parachute_payments' => 'getExcessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'getNonqualifiedDeferredCompensation', + 'employee_first_name' => 'getEmployeeFirstName', + 'employee_middle_name' => 'getEmployeeMiddleName', + 'employee_last_name' => 'getEmployeeLastName', + 'employee_name_suffix' => 'getEmployeeNameSuffix', + 'recipient_date_of_birth' => 'getRecipientDateOfBirth', + 'plan_start_month' => 'getPlanStartMonth', + 'employer_provided_si_coverage' => 'getEmployerProvidedSiCoverage', + 'offer_and_coverages' => 'getOfferAndCoverages', + 'covered_individuals' => 'getCoveredIndividuals', 'type' => 'getType', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'tin_type' => 'getTinType', 'id' => 'getId', 'issuer_id' => 'getIssuerId', 'issuer_reference_id' => 'getIssuerReferenceId', 'issuer_tin' => 'getIssuerTin', 'tax_year' => 'getTaxYear', 'reference_id' => 'getReferenceId', + 'tin' => 'getTin', 'recipient_name' => 'getRecipientName', - 'recipient_tin' => 'getRecipientTin', + 'tin_type' => 'getTinType', 'recipient_second_name' => 'getRecipientSecondName', 'address' => 'getAddress', 'address2' => 'getAddress2', @@ -377,20 +349,24 @@ public static function openAPIFormats() 'office_code' => 'getOfficeCode', 'non_us_province' => 'getNonUsProvince', 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', + 'federal_efile_date' => 'getFederalEfileDate', 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', + 'state_efile_date' => 'getStateEfileDate', + 'recipient_edelivery_date' => 'getRecipientEdeliveryDate', 'tin_match' => 'getTinMatch', 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', 'address_verification' => 'getAddressVerification', + 'state_and_local_withholding' => 'getStateAndLocalWithholding', + 'second_tin_notice' => 'getSecondTinNotice', 'federal_efile_status' => 'getFederalEfileStatus', - 'e_delivery_status' => 'getEDeliveryStatus', 'state_efile_status' => 'getStateEfileStatus', 'postal_mail_status' => 'getPostalMailStatus', 'tin_match_status' => 'getTinMatchStatus', 'address_verification_status' => 'getAddressVerificationStatus', - 'validation_errors' => 'getValidationErrors' + 'e_delivery_status' => 'getEDeliveryStatus', + 'validation_errors' => 'getValidationErrors', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -434,6 +410,19 @@ public function getModelName() return self::$openAPIModelName; } + const PLAN_START_MONTH__00 = '00'; + const PLAN_START_MONTH__01 = '01'; + const PLAN_START_MONTH__02 = '02'; + const PLAN_START_MONTH__03 = '03'; + const PLAN_START_MONTH__04 = '04'; + const PLAN_START_MONTH__05 = '05'; + const PLAN_START_MONTH__06 = '06'; + const PLAN_START_MONTH__07 = '07'; + const PLAN_START_MONTH__08 = '08'; + const PLAN_START_MONTH__09 = '09'; + const PLAN_START_MONTH__10 = '10'; + const PLAN_START_MONTH__11 = '11'; + const PLAN_START_MONTH__12 = '12'; const TYPE__1099_NEC = '1099-NEC'; const TYPE__1099_MISC = '1099-MISC'; const TYPE__1099_DIV = '1099-DIV'; @@ -442,11 +431,37 @@ public function getModelName() const TYPE__1095_B = '1095-B'; const TYPE__1042_S = '1042-S'; const TYPE__1095_C = '1095-C'; + const TYPE__1099_INT = '1099-INT'; + const TIN_TYPE__EMPTY = 'Empty'; const TIN_TYPE_EIN = 'EIN'; const TIN_TYPE_SSN = 'SSN'; const TIN_TYPE_ITIN = 'ITIN'; const TIN_TYPE_ATIN = 'ATIN'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlanStartMonthAllowableValues() + { + return [ + self::PLAN_START_MONTH__00, + self::PLAN_START_MONTH__01, + self::PLAN_START_MONTH__02, + self::PLAN_START_MONTH__03, + self::PLAN_START_MONTH__04, + self::PLAN_START_MONTH__05, + self::PLAN_START_MONTH__06, + self::PLAN_START_MONTH__07, + self::PLAN_START_MONTH__08, + self::PLAN_START_MONTH__09, + self::PLAN_START_MONTH__10, + self::PLAN_START_MONTH__11, + self::PLAN_START_MONTH__12, + ]; + } + /** * Gets allowable values of the enum * @@ -463,6 +478,7 @@ public function getTypeAllowableValues() self::TYPE__1095_B, self::TYPE__1042_S, self::TYPE__1095_C, + self::TYPE__1099_INT, ]; } @@ -474,6 +490,7 @@ public function getTypeAllowableValues() public function getTinTypeAllowableValues() { return [ + self::TIN_TYPE__EMPTY, self::TIN_TYPE_EIN, self::TIN_TYPE_SSN, self::TIN_TYPE_ITIN, @@ -496,34 +513,25 @@ public function getTinTypeAllowableValues() */ public function __construct(array $data = null) { - $this->container['rents'] = $data['rents'] ?? null; - $this->container['royalties'] = $data['royalties'] ?? null; - $this->container['other_income'] = $data['other_income'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; - $this->container['fishing_boat_proceeds'] = $data['fishing_boat_proceeds'] ?? null; - $this->container['medical_and_health_care_payments'] = $data['medical_and_health_care_payments'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; - $this->container['crop_insurance_proceeds'] = $data['crop_insurance_proceeds'] ?? null; - $this->container['gross_proceeds_paid_to_attorney'] = $data['gross_proceeds_paid_to_attorney'] ?? null; - $this->container['fish_purchased_for_resale'] = $data['fish_purchased_for_resale'] ?? null; - $this->container['section409_a_deferrals'] = $data['section409_a_deferrals'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['excess_golden_parachute_payments'] = $data['excess_golden_parachute_payments'] ?? null; - $this->container['nonqualified_deferred_compensation'] = $data['nonqualified_deferred_compensation'] ?? null; + $this->container['employee_first_name'] = $data['employee_first_name'] ?? null; + $this->container['employee_middle_name'] = $data['employee_middle_name'] ?? null; + $this->container['employee_last_name'] = $data['employee_last_name'] ?? null; + $this->container['employee_name_suffix'] = $data['employee_name_suffix'] ?? null; + $this->container['recipient_date_of_birth'] = $data['recipient_date_of_birth'] ?? null; + $this->container['plan_start_month'] = $data['plan_start_month'] ?? null; + $this->container['employer_provided_si_coverage'] = $data['employer_provided_si_coverage'] ?? null; + $this->container['offer_and_coverages'] = $data['offer_and_coverages'] ?? null; + $this->container['covered_individuals'] = $data['covered_individuals'] ?? null; $this->container['type'] = $data['type'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['issuer_id'] = $data['issuer_id'] ?? null; $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; $this->container['tax_year'] = $data['tax_year'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; + $this->container['tin'] = $data['tin'] ?? null; $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; + $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['address2'] = $data['address2'] ?? null; @@ -535,20 +543,24 @@ public function __construct(array $data = null) $this->container['office_code'] = $data['office_code'] ?? null; $this->container['non_us_province'] = $data['non_us_province'] ?? null; $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; + $this->container['federal_efile_date'] = $data['federal_efile_date'] ?? null; $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; + $this->container['state_efile_date'] = $data['state_efile_date'] ?? null; + $this->container['recipient_edelivery_date'] = $data['recipient_edelivery_date'] ?? null; $this->container['tin_match'] = $data['tin_match'] ?? null; $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; $this->container['address_verification'] = $data['address_verification'] ?? null; + $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; + $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; + $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['validation_errors'] = $data['validation_errors'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -560,6 +572,30 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['employee_first_name'] === null) { + $invalidProperties[] = "'employee_first_name' can't be null"; + } + if ($this->container['employee_last_name'] === null) { + $invalidProperties[] = "'employee_last_name' can't be null"; + } + if ($this->container['plan_start_month'] === null) { + $invalidProperties[] = "'plan_start_month' can't be null"; + } + $allowedValues = $this->getPlanStartMonthAllowableValues(); + if (!is_null($this->container['plan_start_month']) && !in_array($this->container['plan_start_month'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'plan_start_month', must be one of '%s'", + $this->container['plan_start_month'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['offer_and_coverages'] === null) { + $invalidProperties[] = "'offer_and_coverages' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } $allowedValues = $this->getTypeAllowableValues(); if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -569,6 +605,9 @@ public function listInvalidProperties() ); } + if ($this->container['recipient_name'] === null) { + $invalidProperties[] = "'recipient_name' can't be null"; + } $allowedValues = $this->getTinTypeAllowableValues(); if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -578,6 +617,15 @@ public function listInvalidProperties() ); } + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } return $invalidProperties; } @@ -594,361 +642,231 @@ public function valid() /** - * Gets rents + * Gets employee_first_name * - * @return float|null + * @return string */ - public function getRents() + public function getEmployeeFirstName() { - return $this->container['rents']; + return $this->container['employee_first_name']; } /** - * Sets rents + * Sets employee_first_name * - * @param float|null $rents rents + * @param string $employee_first_name Employee's first name * * @return self */ - public function setRents($rents) + public function setEmployeeFirstName($employee_first_name) { - $this->container['rents'] = $rents; + $this->container['employee_first_name'] = $employee_first_name; return $this; } /** - * Gets royalties + * Gets employee_middle_name * - * @return float|null + * @return string|null */ - public function getRoyalties() + public function getEmployeeMiddleName() { - return $this->container['royalties']; + return $this->container['employee_middle_name']; } /** - * Sets royalties + * Sets employee_middle_name * - * @param float|null $royalties royalties + * @param string|null $employee_middle_name Employee's middle name * * @return self */ - public function setRoyalties($royalties) + public function setEmployeeMiddleName($employee_middle_name) { - $this->container['royalties'] = $royalties; + $this->container['employee_middle_name'] = $employee_middle_name; return $this; } /** - * Gets other_income + * Gets employee_last_name * - * @return float|null + * @return string */ - public function getOtherIncome() + public function getEmployeeLastName() { - return $this->container['other_income']; + return $this->container['employee_last_name']; } /** - * Sets other_income + * Sets employee_last_name * - * @param float|null $other_income other_income + * @param string $employee_last_name Employee's last name * * @return self */ - public function setOtherIncome($other_income) + public function setEmployeeLastName($employee_last_name) { - $this->container['other_income'] = $other_income; + $this->container['employee_last_name'] = $employee_last_name; return $this; } /** - * Gets fed_income_tax_withheld + * Gets employee_name_suffix * - * @return float|null + * @return string|null */ - public function getFedIncomeTaxWithheld() + public function getEmployeeNameSuffix() { - return $this->container['fed_income_tax_withheld']; + return $this->container['employee_name_suffix']; } /** - * Sets fed_income_tax_withheld + * Sets employee_name_suffix * - * @param float|null $fed_income_tax_withheld fed_income_tax_withheld + * @param string|null $employee_name_suffix Employee's name suffix * * @return self */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) + public function setEmployeeNameSuffix($employee_name_suffix) { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; + $this->container['employee_name_suffix'] = $employee_name_suffix; return $this; } /** - * Gets fishing_boat_proceeds + * Gets recipient_date_of_birth * - * @return float|null + * @return \DateTime|null */ - public function getFishingBoatProceeds() + public function getRecipientDateOfBirth() { - return $this->container['fishing_boat_proceeds']; + return $this->container['recipient_date_of_birth']; } /** - * Sets fishing_boat_proceeds + * Sets recipient_date_of_birth * - * @param float|null $fishing_boat_proceeds fishing_boat_proceeds + * @param \DateTime|null $recipient_date_of_birth Recipient's date of birth * * @return self */ - public function setFishingBoatProceeds($fishing_boat_proceeds) + public function setRecipientDateOfBirth($recipient_date_of_birth) { - $this->container['fishing_boat_proceeds'] = $fishing_boat_proceeds; + $this->container['recipient_date_of_birth'] = $recipient_date_of_birth; return $this; } /** - * Gets medical_and_health_care_payments + * Gets plan_start_month * - * @return float|null + * @return string */ - public function getMedicalAndHealthCarePayments() + public function getPlanStartMonth() { - return $this->container['medical_and_health_care_payments']; + return $this->container['plan_start_month']; } /** - * Sets medical_and_health_care_payments + * Sets plan_start_month * - * @param float|null $medical_and_health_care_payments medical_and_health_care_payments + * @param string $plan_start_month Plan start month. The calendar month during which the plan year begins of the health plan in which the employee is offered coverage (or would be offered coverage if the employee were eligible to participate in the plan). Available values: - 00: None - 01: January - 02: February - 03: March - 04: April - 05: May - 06: June - 07: July - 08: August - 09: September - 10: October - 11: November - 12: December * * @return self */ - public function setMedicalAndHealthCarePayments($medical_and_health_care_payments) + public function setPlanStartMonth($plan_start_month) { - $this->container['medical_and_health_care_payments'] = $medical_and_health_care_payments; + $allowedValues = $this->getPlanStartMonthAllowableValues(); + if (!in_array($plan_start_month, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'plan_start_month', must be one of '%s'", + $plan_start_month, + implode("', '", $allowedValues) + ) + ); + } + $this->container['plan_start_month'] = $plan_start_month; return $this; } /** - * Gets direct_sales_indicator + * Gets employer_provided_si_coverage * * @return bool|null */ - public function getDirectSalesIndicator() + public function getEmployerProvidedSiCoverage() { - return $this->container['direct_sales_indicator']; + return $this->container['employer_provided_si_coverage']; } /** - * Sets direct_sales_indicator + * Sets employer_provided_si_coverage * - * @param bool|null $direct_sales_indicator direct_sales_indicator + * @param bool|null $employer_provided_si_coverage Employer provided self-insured coverage * * @return self */ - public function setDirectSalesIndicator($direct_sales_indicator) + public function setEmployerProvidedSiCoverage($employer_provided_si_coverage) { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; + $this->container['employer_provided_si_coverage'] = $employer_provided_si_coverage; return $this; } /** - * Gets substitute_payments + * Gets offer_and_coverages * - * @return float|null + * @return \Avalara\SDK\Model\A1099\V2\OfferAndCoverage[] */ - public function getSubstitutePayments() + public function getOfferAndCoverages() { - return $this->container['substitute_payments']; + return $this->container['offer_and_coverages']; } /** - * Sets substitute_payments + * Sets offer_and_coverages * - * @param float|null $substitute_payments substitute_payments + * @param \Avalara\SDK\Model\A1099\V2\OfferAndCoverage[] $offer_and_coverages Offer and coverage information * * @return self */ - public function setSubstitutePayments($substitute_payments) + public function setOfferAndCoverages($offer_and_coverages) { - $this->container['substitute_payments'] = $substitute_payments; - return $this; - } - /** - * Gets crop_insurance_proceeds - * - * @return float|null - */ - public function getCropInsuranceProceeds() - { - return $this->container['crop_insurance_proceeds']; - } - - /** - * Sets crop_insurance_proceeds - * - * @param float|null $crop_insurance_proceeds crop_insurance_proceeds - * - * @return self - */ - public function setCropInsuranceProceeds($crop_insurance_proceeds) - { - $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; + $this->container['offer_and_coverages'] = $offer_and_coverages; return $this; } /** - * Gets gross_proceeds_paid_to_attorney + * Gets covered_individuals * - * @return float|null + * @return \Avalara\SDK\Model\A1099\V2\CoveredIndividual[]|null */ - public function getGrossProceedsPaidToAttorney() + public function getCoveredIndividuals() { - return $this->container['gross_proceeds_paid_to_attorney']; + return $this->container['covered_individuals']; } /** - * Sets gross_proceeds_paid_to_attorney + * Sets covered_individuals * - * @param float|null $gross_proceeds_paid_to_attorney gross_proceeds_paid_to_attorney + * @param \Avalara\SDK\Model\A1099\V2\CoveredIndividual[]|null $covered_individuals Covered individuals information * * @return self */ - public function setGrossProceedsPaidToAttorney($gross_proceeds_paid_to_attorney) + public function setCoveredIndividuals($covered_individuals) { - $this->container['gross_proceeds_paid_to_attorney'] = $gross_proceeds_paid_to_attorney; - return $this; - } - /** - * Gets fish_purchased_for_resale - * - * @return float|null - */ - public function getFishPurchasedForResale() - { - return $this->container['fish_purchased_for_resale']; - } - - /** - * Sets fish_purchased_for_resale - * - * @param float|null $fish_purchased_for_resale fish_purchased_for_resale - * - * @return self - */ - public function setFishPurchasedForResale($fish_purchased_for_resale) - { - $this->container['fish_purchased_for_resale'] = $fish_purchased_for_resale; - - return $this; - } - - /** - * Gets section409_a_deferrals - * - * @return float|null - */ - public function getSection409ADeferrals() - { - return $this->container['section409_a_deferrals']; - } - - /** - * Sets section409_a_deferrals - * - * @param float|null $section409_a_deferrals section409_a_deferrals - * - * @return self - */ - public function setSection409ADeferrals($section409_a_deferrals) - { - $this->container['section409_a_deferrals'] = $section409_a_deferrals; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement fatca_filing_requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets excess_golden_parachute_payments - * - * @return float|null - */ - public function getExcessGoldenParachutePayments() - { - return $this->container['excess_golden_parachute_payments']; - } - - /** - * Sets excess_golden_parachute_payments - * - * @param float|null $excess_golden_parachute_payments excess_golden_parachute_payments - * - * @return self - */ - public function setExcessGoldenParachutePayments($excess_golden_parachute_payments) - { - $this->container['excess_golden_parachute_payments'] = $excess_golden_parachute_payments; - - return $this; - } - - /** - * Gets nonqualified_deferred_compensation - * - * @return float|null - */ - public function getNonqualifiedDeferredCompensation() - { - return $this->container['nonqualified_deferred_compensation']; - } - - /** - * Sets nonqualified_deferred_compensation - * - * @param float|null $nonqualified_deferred_compensation nonqualified_deferred_compensation - * - * @return self - */ - public function setNonqualifiedDeferredCompensation($nonqualified_deferred_compensation) - { - $this->container['nonqualified_deferred_compensation'] = $nonqualified_deferred_compensation; + $this->container['covered_individuals'] = $covered_individuals; return $this; } @@ -956,7 +874,7 @@ public function setNonqualifiedDeferredCompensation($nonqualified_deferred_compe /** * Gets type * - * @return string|null + * @return string */ public function getType() { @@ -966,14 +884,14 @@ public function getType() /** * Sets type * - * @param string|null $type type + * @param string $type Form type * * @return self */ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { + if (!in_array($type, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( "Invalid value '%s' for 'type', must be one of '%s'", @@ -987,112 +905,6 @@ public function setType($type) return $this; } - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at created_at - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at updated_at - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type tin_type - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - /** * Gets id * @@ -1106,7 +918,7 @@ public function getId() /** * Sets id * - * @param string|null $id id + * @param string|null $id Form ID. Unique identifier set when the record is created. * * @return self */ @@ -1130,7 +942,7 @@ public function getIssuerId() /** * Sets issuer_id * - * @param string|null $issuer_id issuer_id + * @param string|null $issuer_id Issuer ID - only required when creating forms * * @return self */ @@ -1154,7 +966,7 @@ public function getIssuerReferenceId() /** * Sets issuer_reference_id * - * @param string|null $issuer_reference_id issuer_reference_id + * @param string|null $issuer_reference_id Issuer Reference ID - only required when creating forms * * @return self */ @@ -1178,7 +990,7 @@ public function getIssuerTin() /** * Sets issuer_tin * - * @param string|null $issuer_tin issuer_tin + * @param string|null $issuer_tin Issuer TIN - readonly * * @return self */ @@ -1202,7 +1014,7 @@ public function getTaxYear() /** * Sets tax_year * - * @param int|null $tax_year tax_year + * @param int|null $tax_year Tax Year - only required when creating forms * * @return self */ @@ -1226,7 +1038,7 @@ public function getReferenceId() /** * Sets reference_id * - * @param string|null $reference_id reference_id + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ @@ -1238,10 +1050,34 @@ public function setReferenceId($reference_id) } /** - * Gets recipient_name + * Gets tin * * @return string|null */ + public function getTin() + { + return $this->container['tin']; + } + + /** + * Sets tin + * + * @param string|null $tin Recipient's Federal Tax Identification Number (TIN). + * + * @return self + */ + public function setTin($tin) + { + $this->container['tin'] = $tin; + + return $this; + } + + /** + * Gets recipient_name + * + * @return string + */ public function getRecipientName() { return $this->container['recipient_name']; @@ -1250,7 +1086,7 @@ public function getRecipientName() /** * Sets recipient_name * - * @param string|null $recipient_name recipient_name + * @param string $recipient_name Recipient name * * @return self */ @@ -1262,25 +1098,35 @@ public function setRecipientName($recipient_name) } /** - * Gets recipient_tin + * Gets tin_type * * @return string|null */ - public function getRecipientTin() + public function getTinType() { - return $this->container['recipient_tin']; + return $this->container['tin_type']; } /** - * Sets recipient_tin + * Sets tin_type * - * @param string|null $recipient_tin recipient_tin + * @param string|null $tin_type Type of TIN (Tax ID Number) * * @return self */ - public function setRecipientTin($recipient_tin) + public function setTinType($tin_type) { - $this->container['recipient_tin'] = $recipient_tin; + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tin_type', must be one of '%s'", + $tin_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tin_type'] = $tin_type; return $this; } @@ -1298,7 +1144,7 @@ public function getRecipientSecondName() /** * Sets recipient_second_name * - * @param string|null $recipient_second_name recipient_second_name + * @param string|null $recipient_second_name Recipient second name * * @return self */ @@ -1312,7 +1158,7 @@ public function setRecipientSecondName($recipient_second_name) /** * Gets address * - * @return string|null + * @return string */ public function getAddress() { @@ -1322,7 +1168,7 @@ public function getAddress() /** * Sets address * - * @param string|null $address address + * @param string $address Address. * * @return self */ @@ -1346,7 +1192,7 @@ public function getAddress2() /** * Sets address2 * - * @param string|null $address2 address2 + * @param string|null $address2 Address line 2. * * @return self */ @@ -1360,7 +1206,7 @@ public function setAddress2($address2) /** * Gets city * - * @return string|null + * @return string */ public function getCity() { @@ -1370,7 +1216,7 @@ public function getCity() /** * Sets city * - * @param string|null $city city + * @param string $city City. * * @return self */ @@ -1394,7 +1240,7 @@ public function getState() /** * Sets state * - * @param string|null $state state + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ @@ -1418,7 +1264,7 @@ public function getZip() /** * Sets zip * - * @param string|null $zip zip + * @param string|null $zip ZIP/postal code. * * @return self */ @@ -1442,7 +1288,7 @@ public function getEmail() /** * Sets email * - * @param string|null $email email + * @param string|null $email Recipient's Contact email address. * * @return self */ @@ -1466,7 +1312,7 @@ public function getAccountNumber() /** * Sets account_number * - * @param string|null $account_number account_number + * @param string|null $account_number Account number * * @return self */ @@ -1490,7 +1336,7 @@ public function getOfficeCode() /** * Sets office_code * - * @param string|null $office_code office_code + * @param string|null $office_code Office code * * @return self */ @@ -1514,7 +1360,7 @@ public function getNonUsProvince() /** * Sets non_us_province * - * @param string|null $non_us_province non_us_province + * @param string|null $non_us_province Province or region for non-US/CA addresses. * * @return self */ @@ -1528,7 +1374,7 @@ public function setNonUsProvince($non_us_province) /** * Gets country_code * - * @return string|null + * @return string */ public function getCountryCode() { @@ -1538,7 +1384,7 @@ public function getCountryCode() /** * Sets country_code * - * @param string|null $country_code country_code + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ @@ -1550,25 +1396,25 @@ public function setCountryCode($country_code) } /** - * Gets federal_e_file + * Gets federal_efile_date * - * @return bool|null + * @return \DateTime|null */ - public function getFederalEFile() + public function getFederalEfileDate() { - return $this->container['federal_e_file']; + return $this->container['federal_efile_date']; } /** - * Sets federal_e_file + * Sets federal_efile_date * - * @param bool|null $federal_e_file federal_e_file + * @param \DateTime|null $federal_efile_date Date when federal e-filing should be scheduled for this form * * @return self */ - public function setFederalEFile($federal_e_file) + public function setFederalEfileDate($federal_efile_date) { - $this->container['federal_e_file'] = $federal_e_file; + $this->container['federal_efile_date'] = $federal_efile_date; return $this; } @@ -1586,7 +1432,7 @@ public function getPostalMail() /** * Sets postal_mail * - * @param bool|null $postal_mail postal_mail + * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form * * @return self */ @@ -1598,25 +1444,49 @@ public function setPostalMail($postal_mail) } /** - * Gets state_e_file + * Gets state_efile_date * - * @return bool|null + * @return \DateTime|null */ - public function getStateEFile() + public function getStateEfileDate() { - return $this->container['state_e_file']; + return $this->container['state_efile_date']; } /** - * Sets state_e_file + * Sets state_efile_date * - * @param bool|null $state_e_file state_e_file + * @param \DateTime|null $state_efile_date Date when state e-filing should be scheduled for this form * * @return self */ - public function setStateEFile($state_e_file) + public function setStateEfileDate($state_efile_date) { - $this->container['state_e_file'] = $state_e_file; + $this->container['state_efile_date'] = $state_efile_date; + + return $this; + } + + /** + * Gets recipient_edelivery_date + * + * @return \DateTime|null + */ + public function getRecipientEdeliveryDate() + { + return $this->container['recipient_edelivery_date']; + } + + /** + * Sets recipient_edelivery_date + * + * @param \DateTime|null $recipient_edelivery_date Date when recipient e-delivery should be scheduled for this form + * + * @return self + */ + public function setRecipientEdeliveryDate($recipient_edelivery_date) + { + $this->container['recipient_edelivery_date'] = $recipient_edelivery_date; return $this; } @@ -1634,7 +1504,7 @@ public function getTinMatch() /** * Sets tin_match * - * @param bool|null $tin_match tin_match + * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form * * @return self */ @@ -1658,7 +1528,7 @@ public function getNoTin() /** * Sets no_tin * - * @param bool|null $no_tin no_tin + * @param bool|null $no_tin No TIN indicator * * @return self */ @@ -1670,97 +1540,97 @@ public function setNoTin($no_tin) } /** - * Gets second_tin_notice + * Gets address_verification * * @return bool|null */ - public function getSecondTinNotice() + public function getAddressVerification() { - return $this->container['second_tin_notice']; + return $this->container['address_verification']; } /** - * Sets second_tin_notice + * Sets address_verification * - * @param bool|null $second_tin_notice second_tin_notice + * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form * * @return self */ - public function setSecondTinNotice($second_tin_notice) + public function setAddressVerification($address_verification) { - $this->container['second_tin_notice'] = $second_tin_notice; + $this->container['address_verification'] = $address_verification; return $this; } /** - * Gets address_verification + * Gets state_and_local_withholding * - * @return bool|null + * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null */ - public function getAddressVerification() + public function getStateAndLocalWithholding() { - return $this->container['address_verification']; + return $this->container['state_and_local_withholding']; } /** - * Sets address_verification + * Sets state_and_local_withholding * - * @param bool|null $address_verification address_verification + * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding State and local withholding information * * @return self */ - public function setAddressVerification($address_verification) + public function setStateAndLocalWithholding($state_and_local_withholding) { - $this->container['address_verification'] = $address_verification; + $this->container['state_and_local_withholding'] = $state_and_local_withholding; return $this; } /** - * Gets federal_efile_status + * Gets second_tin_notice * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return bool|null */ - public function getFederalEfileStatus() + public function getSecondTinNotice() { - return $this->container['federal_efile_status']; + return $this->container['second_tin_notice']; } /** - * Sets federal_efile_status + * Sets second_tin_notice * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status federal_efile_status + * @param bool|null $second_tin_notice Second TIN notice * * @return self */ - public function setFederalEfileStatus($federal_efile_status) + public function setSecondTinNotice($second_tin_notice) { - $this->container['federal_efile_status'] = $federal_efile_status; + $this->container['second_tin_notice'] = $second_tin_notice; return $this; } /** - * Gets e_delivery_status + * Gets federal_efile_status * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getEDeliveryStatus() + public function getFederalEfileStatus() { - return $this->container['e_delivery_status']; + return $this->container['federal_efile_status']; } /** - * Sets e_delivery_status + * Sets federal_efile_status * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status e_delivery_status + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status Federal e-file status * * @return self */ - public function setEDeliveryStatus($e_delivery_status) + public function setFederalEfileStatus($federal_efile_status) { - $this->container['e_delivery_status'] = $e_delivery_status; + $this->container['federal_efile_status'] = $federal_efile_status; return $this; } @@ -1768,7 +1638,7 @@ public function setEDeliveryStatus($e_delivery_status) /** * Gets state_efile_status * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null + * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null */ public function getStateEfileStatus() { @@ -1778,7 +1648,7 @@ public function getStateEfileStatus() /** * Sets state_efile_status * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status state_efile_status + * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status State e-file status * * @return self */ @@ -1794,7 +1664,7 @@ public function setStateEfileStatus($state_efile_status) /** * Gets postal_mail_status * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ public function getPostalMailStatus() { @@ -1804,7 +1674,7 @@ public function getPostalMailStatus() /** * Sets postal_mail_status * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status postal_mail_status + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status Postal mail to recipient status * * @return self */ @@ -1818,7 +1688,7 @@ public function setPostalMailStatus($postal_mail_status) /** * Gets tin_match_status * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ public function getTinMatchStatus() { @@ -1828,7 +1698,7 @@ public function getTinMatchStatus() /** * Sets tin_match_status * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status tin_match_status + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status TIN Match status * * @return self */ @@ -1842,7 +1712,7 @@ public function setTinMatchStatus($tin_match_status) /** * Gets address_verification_status * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ public function getAddressVerificationStatus() { @@ -1852,7 +1722,7 @@ public function getAddressVerificationStatus() /** * Sets address_verification_status * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status address_verification_status + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status Address verification status * * @return self */ @@ -1863,10 +1733,34 @@ public function setAddressVerificationStatus($address_verification_status) return $this; } + /** + * Gets e_delivery_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getEDeliveryStatus() + { + return $this->container['e_delivery_status']; + } + + /** + * Sets e_delivery_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $e_delivery_status EDelivery status + * + * @return self + */ + public function setEDeliveryStatus($e_delivery_status) + { + $this->container['e_delivery_status'] = $e_delivery_status; + + return $this; + } + /** * Gets validation_errors * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null + * @return \Avalara\SDK\Model\A1099\V2\ValidationError[]|null */ public function getValidationErrors() { @@ -1876,7 +1770,7 @@ public function getValidationErrors() /** * Sets validation_errors * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors validation_errors + * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors Validation errors * * @return self */ @@ -1888,6 +1782,54 @@ public function setValidationErrors($validation_errors) return $this; } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at Date time when the record was created. + * + * @return self + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at Date time when the record was last updated. + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/Form1095CList.php b/lib/Model/A1099/V2/Form1095CList.php deleted file mode 100644 index 8115e99..0000000 --- a/lib/Model/A1099/V2/Form1095CList.php +++ /dev/null @@ -1,364 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1095CList Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1095CList implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1095CList'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'forms' => '\Avalara\SDK\Model\A1099\V2\Form1095CListItem[]', - 'form_type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'forms' => null, - 'form_type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'forms' => 'forms', - 'form_type' => 'formType' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'forms' => 'setForms', - 'form_type' => 'setFormType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'forms' => 'getForms', - 'form_type' => 'getFormType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['forms'] = $data['forms'] ?? null; - $this->container['form_type'] = $data['form_type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets forms - * - * @return \Avalara\SDK\Model\A1099\V2\Form1095CListItem[]|null - */ - public function getForms() - { - return $this->container['forms']; - } - - /** - * Sets forms - * - * @param \Avalara\SDK\Model\A1099\V2\Form1095CListItem[]|null $forms forms - * - * @return self - */ - public function setForms($forms) - { - - - $this->container['forms'] = $forms; - - return $this; - } - - /** - * Gets form_type - * - * @return string|null - */ - public function getFormType() - { - return $this->container['form_type']; - } - - /** - * Sets form_type - * - * @param string|null $form_type form_type - * - * @return self - */ - public function setFormType($form_type) - { - $this->container['form_type'] = $form_type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1095CListItem.php b/lib/Model/A1099/V2/Form1095CListItem.php deleted file mode 100644 index a4a0518..0000000 --- a/lib/Model/A1099/V2/Form1095CListItem.php +++ /dev/null @@ -1,1463 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1095CListItem Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1095CListItem implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1095CListItem'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'employee_first_name' => 'string', - 'employee_middle_name' => 'string', - 'employee_last_name' => 'string', - 'employee_name_suffix' => 'string', - 'recipient_date_of_birth' => '\DateTime', - 'plan_start_month' => 'string', - 'offer_and_coverages' => '\Avalara\SDK\Model\A1099\V2\OfferAndCoverageRequest[]', - 'employer_provided_si_coverage' => 'bool', - 'covered_individuals' => '\Avalara\SDK\Model\A1099\V2\CoveredIndividualRequest[]', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'employee_first_name' => null, - 'employee_middle_name' => null, - 'employee_last_name' => null, - 'employee_name_suffix' => null, - 'recipient_date_of_birth' => 'date-time', - 'plan_start_month' => null, - 'offer_and_coverages' => null, - 'employer_provided_si_coverage' => null, - 'covered_individuals' => null, - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'employee_first_name' => 'employeeFirstName', - 'employee_middle_name' => 'employeeMiddleName', - 'employee_last_name' => 'employeeLastName', - 'employee_name_suffix' => 'employeeNameSuffix', - 'recipient_date_of_birth' => 'recipientDateOfBirth', - 'plan_start_month' => 'planStartMonth', - 'offer_and_coverages' => 'offerAndCoverages', - 'employer_provided_si_coverage' => 'employerProvidedSiCoverage', - 'covered_individuals' => 'coveredIndividuals', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'employee_first_name' => 'setEmployeeFirstName', - 'employee_middle_name' => 'setEmployeeMiddleName', - 'employee_last_name' => 'setEmployeeLastName', - 'employee_name_suffix' => 'setEmployeeNameSuffix', - 'recipient_date_of_birth' => 'setRecipientDateOfBirth', - 'plan_start_month' => 'setPlanStartMonth', - 'offer_and_coverages' => 'setOfferAndCoverages', - 'employer_provided_si_coverage' => 'setEmployerProvidedSiCoverage', - 'covered_individuals' => 'setCoveredIndividuals', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'employee_first_name' => 'getEmployeeFirstName', - 'employee_middle_name' => 'getEmployeeMiddleName', - 'employee_last_name' => 'getEmployeeLastName', - 'employee_name_suffix' => 'getEmployeeNameSuffix', - 'recipient_date_of_birth' => 'getRecipientDateOfBirth', - 'plan_start_month' => 'getPlanStartMonth', - 'offer_and_coverages' => 'getOfferAndCoverages', - 'employer_provided_si_coverage' => 'getEmployerProvidedSiCoverage', - 'covered_individuals' => 'getCoveredIndividuals', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['employee_first_name'] = $data['employee_first_name'] ?? null; - $this->container['employee_middle_name'] = $data['employee_middle_name'] ?? null; - $this->container['employee_last_name'] = $data['employee_last_name'] ?? null; - $this->container['employee_name_suffix'] = $data['employee_name_suffix'] ?? null; - $this->container['recipient_date_of_birth'] = $data['recipient_date_of_birth'] ?? null; - $this->container['plan_start_month'] = $data['plan_start_month'] ?? null; - $this->container['offer_and_coverages'] = $data['offer_and_coverages'] ?? null; - $this->container['employer_provided_si_coverage'] = $data['employer_provided_si_coverage'] ?? null; - $this->container['covered_individuals'] = $data['covered_individuals'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['tax_year'] === null) { - $invalidProperties[] = "'tax_year' can't be null"; - } - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets employee_first_name - * - * @return string|null - */ - public function getEmployeeFirstName() - { - return $this->container['employee_first_name']; - } - - /** - * Sets employee_first_name - * - * @param string|null $employee_first_name Employee's first name - * - * @return self - */ - public function setEmployeeFirstName($employee_first_name) - { - $this->container['employee_first_name'] = $employee_first_name; - - return $this; - } - - /** - * Gets employee_middle_name - * - * @return string|null - */ - public function getEmployeeMiddleName() - { - return $this->container['employee_middle_name']; - } - - /** - * Sets employee_middle_name - * - * @param string|null $employee_middle_name Employee's middle name - * - * @return self - */ - public function setEmployeeMiddleName($employee_middle_name) - { - $this->container['employee_middle_name'] = $employee_middle_name; - - return $this; - } - - /** - * Gets employee_last_name - * - * @return string|null - */ - public function getEmployeeLastName() - { - return $this->container['employee_last_name']; - } - - /** - * Sets employee_last_name - * - * @param string|null $employee_last_name Employee's last name - * - * @return self - */ - public function setEmployeeLastName($employee_last_name) - { - $this->container['employee_last_name'] = $employee_last_name; - - return $this; - } - - /** - * Gets employee_name_suffix - * - * @return string|null - */ - public function getEmployeeNameSuffix() - { - return $this->container['employee_name_suffix']; - } - - /** - * Sets employee_name_suffix - * - * @param string|null $employee_name_suffix Employee's name suffix - * - * @return self - */ - public function setEmployeeNameSuffix($employee_name_suffix) - { - $this->container['employee_name_suffix'] = $employee_name_suffix; - - return $this; - } - - /** - * Gets recipient_date_of_birth - * - * @return \DateTime|null - */ - public function getRecipientDateOfBirth() - { - return $this->container['recipient_date_of_birth']; - } - - /** - * Sets recipient_date_of_birth - * - * @param \DateTime|null $recipient_date_of_birth Recipient's date of birth - * - * @return self - */ - public function setRecipientDateOfBirth($recipient_date_of_birth) - { - $this->container['recipient_date_of_birth'] = $recipient_date_of_birth; - - return $this; - } - - /** - * Gets plan_start_month - * - * @return string|null - */ - public function getPlanStartMonth() - { - return $this->container['plan_start_month']; - } - - /** - * Sets plan_start_month - * - * @param string|null $plan_start_month Plan start month - * - * @return self - */ - public function setPlanStartMonth($plan_start_month) - { - $this->container['plan_start_month'] = $plan_start_month; - - return $this; - } - - /** - * Gets offer_and_coverages - * - * @return \Avalara\SDK\Model\A1099\V2\OfferAndCoverageRequest[]|null - */ - public function getOfferAndCoverages() - { - return $this->container['offer_and_coverages']; - } - - /** - * Sets offer_and_coverages - * - * @param \Avalara\SDK\Model\A1099\V2\OfferAndCoverageRequest[]|null $offer_and_coverages Offer and coverage information - * - * @return self - */ - public function setOfferAndCoverages($offer_and_coverages) - { - - - $this->container['offer_and_coverages'] = $offer_and_coverages; - - return $this; - } - - /** - * Gets employer_provided_si_coverage - * - * @return bool|null - */ - public function getEmployerProvidedSiCoverage() - { - return $this->container['employer_provided_si_coverage']; - } - - /** - * Sets employer_provided_si_coverage - * - * @param bool|null $employer_provided_si_coverage Employer provided self-insured coverage - * - * @return self - */ - public function setEmployerProvidedSiCoverage($employer_provided_si_coverage) - { - $this->container['employer_provided_si_coverage'] = $employer_provided_si_coverage; - - return $this; - } - - /** - * Gets covered_individuals - * - * @return \Avalara\SDK\Model\A1099\V2\CoveredIndividualRequest[]|null - */ - public function getCoveredIndividuals() - { - return $this->container['covered_individuals']; - } - - /** - * Sets covered_individuals - * - * @param \Avalara\SDK\Model\A1099\V2\CoveredIndividualRequest[]|null $covered_individuals Covered individuals information - * - * @return self - */ - public function setCoveredIndividuals($covered_individuals) - { - - - $this->container['covered_individuals'] = $covered_individuals; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1095CListItem., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1095CListItem., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1095CListItem., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099Base.php b/lib/Model/A1099/V2/Form1099Base.php index 828f320..934a8a4 100644 --- a/lib/Model/A1099/V2/Form1099Base.php +++ b/lib/Model/A1099/V2/Form1099Base.php @@ -20,7 +20,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) * * @category Avalara client libraries * @package Avalara\SDK\API\A1099\V2 @@ -71,39 +71,45 @@ class Form1099Base implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'type' => 'string', - 'issuer_id' => 'int', + 'id' => 'string', + 'issuer_id' => 'string', 'issuer_reference_id' => 'string', 'issuer_tin' => 'string', 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', 'tin' => 'string', 'recipient_name' => 'string', + 'tin_type' => 'string', 'recipient_second_name' => 'string', 'address' => 'string', 'address2' => 'string', 'city' => 'string', 'state' => 'string', 'zip' => 'string', - 'foreign_province' => 'string', + 'email' => 'string', + 'account_number' => 'string', + 'office_code' => 'string', + 'non_us_province' => 'string', 'country_code' => 'string', + 'federal_efile_date' => '\DateTime', + 'postal_mail' => 'bool', + 'state_efile_date' => '\DateTime', + 'recipient_edelivery_date' => '\DateTime', + 'tin_match' => 'bool', + 'no_tin' => 'bool', + 'address_verification' => 'bool', + 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding', + 'second_tin_notice' => 'bool', + 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', + 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationError[]', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding' + 'updated_at' => '\DateTime' ]; /** @@ -114,39 +120,45 @@ class Form1099Base implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'type' => null, - 'issuer_id' => 'int32', + 'id' => null, + 'issuer_id' => null, 'issuer_reference_id' => null, 'issuer_tin' => null, 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, 'reference_id' => null, - 'email' => null, - 'tin_type' => null, 'tin' => null, 'recipient_name' => null, + 'tin_type' => null, 'recipient_second_name' => null, 'address' => null, 'address2' => null, 'city' => null, 'state' => null, 'zip' => null, - 'foreign_province' => null, + 'email' => null, + 'account_number' => null, + 'office_code' => null, + 'non_us_province' => null, 'country_code' => null, + 'federal_efile_date' => 'date', + 'postal_mail' => null, + 'state_efile_date' => 'date', + 'recipient_edelivery_date' => 'date', + 'tin_match' => null, + 'no_tin' => null, + 'address_verification' => null, + 'state_and_local_withholding' => null, + 'second_tin_notice' => null, + 'federal_efile_status' => null, + 'state_efile_status' => null, + 'postal_mail_status' => null, + 'tin_match_status' => null, + 'address_verification_status' => null, + 'e_delivery_status' => null, 'validation_errors' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null + 'updated_at' => 'date-time' ]; /** @@ -176,39 +188,45 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'type' => 'type', + 'id' => 'id', 'issuer_id' => 'issuerId', 'issuer_reference_id' => 'issuerReferenceId', 'issuer_tin' => 'issuerTin', 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', 'tin' => 'tin', 'recipient_name' => 'recipientName', + 'tin_type' => 'tinType', 'recipient_second_name' => 'recipientSecondName', 'address' => 'address', 'address2' => 'address2', 'city' => 'city', 'state' => 'state', 'zip' => 'zip', - 'foreign_province' => 'foreignProvince', + 'email' => 'email', + 'account_number' => 'accountNumber', + 'office_code' => 'officeCode', + 'non_us_province' => 'nonUsProvince', 'country_code' => 'countryCode', + 'federal_efile_date' => 'federalEfileDate', + 'postal_mail' => 'postalMail', + 'state_efile_date' => 'stateEfileDate', + 'recipient_edelivery_date' => 'recipientEdeliveryDate', + 'tin_match' => 'tinMatch', + 'no_tin' => 'noTin', + 'address_verification' => 'addressVerification', + 'state_and_local_withholding' => 'stateAndLocalWithholding', + 'second_tin_notice' => 'secondTinNotice', + 'federal_efile_status' => 'federalEfileStatus', + 'state_efile_status' => 'stateEfileStatus', + 'postal_mail_status' => 'postalMailStatus', + 'tin_match_status' => 'tinMatchStatus', + 'address_verification_status' => 'addressVerificationStatus', + 'e_delivery_status' => 'eDeliveryStatus', 'validation_errors' => 'validationErrors', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' + 'updated_at' => 'updatedAt' ]; /** @@ -217,39 +235,45 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'type' => 'setType', + 'id' => 'setId', 'issuer_id' => 'setIssuerId', 'issuer_reference_id' => 'setIssuerReferenceId', 'issuer_tin' => 'setIssuerTin', 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', 'tin' => 'setTin', 'recipient_name' => 'setRecipientName', + 'tin_type' => 'setTinType', 'recipient_second_name' => 'setRecipientSecondName', 'address' => 'setAddress', 'address2' => 'setAddress2', 'city' => 'setCity', 'state' => 'setState', 'zip' => 'setZip', - 'foreign_province' => 'setForeignProvince', + 'email' => 'setEmail', + 'account_number' => 'setAccountNumber', + 'office_code' => 'setOfficeCode', + 'non_us_province' => 'setNonUsProvince', 'country_code' => 'setCountryCode', + 'federal_efile_date' => 'setFederalEfileDate', + 'postal_mail' => 'setPostalMail', + 'state_efile_date' => 'setStateEfileDate', + 'recipient_edelivery_date' => 'setRecipientEdeliveryDate', + 'tin_match' => 'setTinMatch', + 'no_tin' => 'setNoTin', + 'address_verification' => 'setAddressVerification', + 'state_and_local_withholding' => 'setStateAndLocalWithholding', + 'second_tin_notice' => 'setSecondTinNotice', + 'federal_efile_status' => 'setFederalEfileStatus', + 'state_efile_status' => 'setStateEfileStatus', + 'postal_mail_status' => 'setPostalMailStatus', + 'tin_match_status' => 'setTinMatchStatus', + 'address_verification_status' => 'setAddressVerificationStatus', + 'e_delivery_status' => 'setEDeliveryStatus', 'validation_errors' => 'setValidationErrors', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' + 'updated_at' => 'setUpdatedAt' ]; /** @@ -258,39 +282,45 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'type' => 'getType', + 'id' => 'getId', 'issuer_id' => 'getIssuerId', 'issuer_reference_id' => 'getIssuerReferenceId', 'issuer_tin' => 'getIssuerTin', 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', 'tin' => 'getTin', 'recipient_name' => 'getRecipientName', + 'tin_type' => 'getTinType', 'recipient_second_name' => 'getRecipientSecondName', 'address' => 'getAddress', 'address2' => 'getAddress2', 'city' => 'getCity', 'state' => 'getState', 'zip' => 'getZip', - 'foreign_province' => 'getForeignProvince', + 'email' => 'getEmail', + 'account_number' => 'getAccountNumber', + 'office_code' => 'getOfficeCode', + 'non_us_province' => 'getNonUsProvince', 'country_code' => 'getCountryCode', + 'federal_efile_date' => 'getFederalEfileDate', + 'postal_mail' => 'getPostalMail', + 'state_efile_date' => 'getStateEfileDate', + 'recipient_edelivery_date' => 'getRecipientEdeliveryDate', + 'tin_match' => 'getTinMatch', + 'no_tin' => 'getNoTin', + 'address_verification' => 'getAddressVerification', + 'state_and_local_withholding' => 'getStateAndLocalWithholding', + 'second_tin_notice' => 'getSecondTinNotice', + 'federal_efile_status' => 'getFederalEfileStatus', + 'state_efile_status' => 'getStateEfileStatus', + 'postal_mail_status' => 'getPostalMailStatus', + 'tin_match_status' => 'getTinMatchStatus', + 'address_verification_status' => 'getAddressVerificationStatus', + 'e_delivery_status' => 'getEDeliveryStatus', 'validation_errors' => 'getValidationErrors', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' + 'updated_at' => 'getUpdatedAt' ]; /** @@ -334,6 +364,56 @@ public function getModelName() return self::$openAPIModelName; } + const TYPE__1099_NEC = '1099-NEC'; + const TYPE__1099_MISC = '1099-MISC'; + const TYPE__1099_DIV = '1099-DIV'; + const TYPE__1099_R = '1099-R'; + const TYPE__1099_K = '1099-K'; + const TYPE__1095_B = '1095-B'; + const TYPE__1042_S = '1042-S'; + const TYPE__1095_C = '1095-C'; + const TYPE__1099_INT = '1099-INT'; + const TIN_TYPE__EMPTY = 'Empty'; + const TIN_TYPE_EIN = 'EIN'; + const TIN_TYPE_SSN = 'SSN'; + const TIN_TYPE_ITIN = 'ITIN'; + const TIN_TYPE_ATIN = 'ATIN'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE__1099_NEC, + self::TYPE__1099_MISC, + self::TYPE__1099_DIV, + self::TYPE__1099_R, + self::TYPE__1099_K, + self::TYPE__1095_B, + self::TYPE__1042_S, + self::TYPE__1095_C, + self::TYPE__1099_INT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTinTypeAllowableValues() + { + return [ + self::TIN_TYPE__EMPTY, + self::TIN_TYPE_EIN, + self::TIN_TYPE_SSN, + self::TIN_TYPE_ITIN, + self::TIN_TYPE_ATIN, + ]; + } /** * Associative array for storing property values @@ -350,39 +430,45 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; $this->container['issuer_id'] = $data['issuer_id'] ?? null; $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['tin'] = $data['tin'] ?? null; $this->container['recipient_name'] = $data['recipient_name'] ?? null; + $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['address2'] = $data['address2'] ?? null; $this->container['city'] = $data['city'] ?? null; $this->container['state'] = $data['state'] ?? null; $this->container['zip'] = $data['zip'] ?? null; - $this->container['foreign_province'] = $data['foreign_province'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['account_number'] = $data['account_number'] ?? null; + $this->container['office_code'] = $data['office_code'] ?? null; + $this->container['non_us_province'] = $data['non_us_province'] ?? null; $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['federal_efile_date'] = $data['federal_efile_date'] ?? null; + $this->container['postal_mail'] = $data['postal_mail'] ?? null; + $this->container['state_efile_date'] = $data['state_efile_date'] ?? null; + $this->container['recipient_edelivery_date'] = $data['recipient_edelivery_date'] ?? null; + $this->container['tin_match'] = $data['tin_match'] ?? null; + $this->container['no_tin'] = $data['no_tin'] ?? null; + $this->container['address_verification'] = $data['address_verification'] ?? null; + $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; + $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; + $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; + $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; + $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; + $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; + $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; + $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['validation_errors'] = $data['validation_errors'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; } /** @@ -394,6 +480,39 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['recipient_name'] === null) { + $invalidProperties[] = "'recipient_name' can't be null"; + } + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tin_type', must be one of '%s'", + $this->container['tin_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } return $invalidProperties; } @@ -410,49 +529,59 @@ public function valid() /** - * Gets id + * Gets type * - * @return string|null + * @return string */ - public function getId() + public function getType() { - return $this->container['id']; + return $this->container['type']; } /** - * Sets id + * Sets type * - * @param string|null $id id + * @param string $type Form type * * @return self */ - public function setId($id) + public function setType($type) { - $this->container['id'] = $id; + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; return $this; } /** - * Gets type + * Gets id * * @return string|null */ - public function getType() + public function getId() { - return $this->container['type']; + return $this->container['id']; } /** - * Sets type + * Sets id * - * @param string|null $type type + * @param string|null $id Form ID. Unique identifier set when the record is created. * * @return self */ - public function setType($type) + public function setId($id) { - $this->container['type'] = $type; + $this->container['id'] = $id; return $this; } @@ -460,7 +589,7 @@ public function setType($type) /** * Gets issuer_id * - * @return int|null + * @return string|null */ public function getIssuerId() { @@ -470,7 +599,7 @@ public function getIssuerId() /** * Sets issuer_id * - * @param int|null $issuer_id issuer_id + * @param string|null $issuer_id Issuer ID - only required when creating forms * * @return self */ @@ -494,7 +623,7 @@ public function getIssuerReferenceId() /** * Sets issuer_reference_id * - * @param string|null $issuer_reference_id issuer_reference_id + * @param string|null $issuer_reference_id Issuer Reference ID - only required when creating forms * * @return self */ @@ -518,7 +647,7 @@ public function getIssuerTin() /** * Sets issuer_tin * - * @param string|null $issuer_tin issuer_tin + * @param string|null $issuer_tin Issuer TIN - readonly * * @return self */ @@ -542,7 +671,7 @@ public function getTaxYear() /** * Sets tax_year * - * @param int|null $tax_year tax_year + * @param int|null $tax_year Tax Year - only required when creating forms * * @return self */ @@ -554,555 +683,733 @@ public function setTaxYear($tax_year) } /** - * Gets federal_efile + * Gets reference_id * - * @return bool|null + * @return string|null */ - public function getFederalEfile() + public function getReferenceId() { - return $this->container['federal_efile']; + return $this->container['reference_id']; } /** - * Sets federal_efile + * Sets reference_id * - * @param bool|null $federal_efile federal_efile + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ - public function setFederalEfile($federal_efile) + public function setReferenceId($reference_id) { - $this->container['federal_efile'] = $federal_efile; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets federal_efile_status + * Gets tin * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getFederalEfileStatus() + public function getTin() { - return $this->container['federal_efile_status']; + return $this->container['tin']; } /** - * Sets federal_efile_status + * Sets tin * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status federal_efile_status + * @param string|null $tin Recipient's Federal Tax Identification Number (TIN). * * @return self */ - public function setFederalEfileStatus($federal_efile_status) + public function setTin($tin) { - $this->container['federal_efile_status'] = $federal_efile_status; + $this->container['tin'] = $tin; return $this; } /** - * Gets state_efile + * Gets recipient_name * - * @return bool|null + * @return string */ - public function getStateEfile() + public function getRecipientName() { - return $this->container['state_efile']; + return $this->container['recipient_name']; } /** - * Sets state_efile + * Sets recipient_name * - * @param bool|null $state_efile state_efile + * @param string $recipient_name Recipient name * * @return self */ - public function setStateEfile($state_efile) + public function setRecipientName($recipient_name) { - $this->container['state_efile'] = $state_efile; + $this->container['recipient_name'] = $recipient_name; return $this; } /** - * Gets state_efile_status + * Gets tin_type * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null + * @return string|null */ - public function getStateEfileStatus() + public function getTinType() { - return $this->container['state_efile_status']; + return $this->container['tin_type']; } /** - * Sets state_efile_status + * Sets tin_type * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status state_efile_status + * @param string|null $tin_type Type of TIN (Tax ID Number) * * @return self */ - public function setStateEfileStatus($state_efile_status) + public function setTinType($tin_type) { - - - $this->container['state_efile_status'] = $state_efile_status; + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tin_type', must be one of '%s'", + $tin_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tin_type'] = $tin_type; return $this; } /** - * Gets postal_mail + * Gets recipient_second_name * - * @return bool|null + * @return string|null */ - public function getPostalMail() + public function getRecipientSecondName() { - return $this->container['postal_mail']; + return $this->container['recipient_second_name']; } /** - * Sets postal_mail + * Sets recipient_second_name * - * @param bool|null $postal_mail postal_mail + * @param string|null $recipient_second_name Recipient second name * * @return self */ - public function setPostalMail($postal_mail) + public function setRecipientSecondName($recipient_second_name) { - $this->container['postal_mail'] = $postal_mail; + $this->container['recipient_second_name'] = $recipient_second_name; return $this; } /** - * Gets postal_mail_status + * Gets address * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string */ - public function getPostalMailStatus() + public function getAddress() { - return $this->container['postal_mail_status']; + return $this->container['address']; } /** - * Sets postal_mail_status + * Sets address * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status postal_mail_status + * @param string $address Address. * * @return self */ - public function setPostalMailStatus($postal_mail_status) + public function setAddress($address) { - $this->container['postal_mail_status'] = $postal_mail_status; + $this->container['address'] = $address; return $this; } /** - * Gets tin_match + * Gets address2 * - * @return bool|null + * @return string|null */ - public function getTinMatch() + public function getAddress2() { - return $this->container['tin_match']; + return $this->container['address2']; } /** - * Sets tin_match + * Sets address2 * - * @param bool|null $tin_match tin_match + * @param string|null $address2 Address line 2. * * @return self */ - public function setTinMatch($tin_match) + public function setAddress2($address2) { - $this->container['tin_match'] = $tin_match; + $this->container['address2'] = $address2; return $this; } /** - * Gets tin_match_status + * Gets city * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string */ - public function getTinMatchStatus() + public function getCity() { - return $this->container['tin_match_status']; + return $this->container['city']; } /** - * Sets tin_match_status + * Sets city * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status tin_match_status + * @param string $city City. * * @return self */ - public function setTinMatchStatus($tin_match_status) + public function setCity($city) { - $this->container['tin_match_status'] = $tin_match_status; + $this->container['city'] = $city; return $this; } /** - * Gets address_verification + * Gets state * - * @return bool|null + * @return string|null */ - public function getAddressVerification() + public function getState() { - return $this->container['address_verification']; + return $this->container['state']; } /** - * Sets address_verification + * Sets state * - * @param bool|null $address_verification address_verification + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ - public function setAddressVerification($address_verification) + public function setState($state) { - $this->container['address_verification'] = $address_verification; + $this->container['state'] = $state; return $this; } /** - * Gets address_verification_status + * Gets zip * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getAddressVerificationStatus() + public function getZip() { - return $this->container['address_verification_status']; + return $this->container['zip']; } /** - * Sets address_verification_status + * Sets zip * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status address_verification_status + * @param string|null $zip ZIP/postal code. * * @return self */ - public function setAddressVerificationStatus($address_verification_status) + public function setZip($zip) { - $this->container['address_verification_status'] = $address_verification_status; + $this->container['zip'] = $zip; return $this; } /** - * Gets reference_id + * Gets email * * @return string|null */ - public function getReferenceId() + public function getEmail() { - return $this->container['reference_id']; + return $this->container['email']; } /** - * Sets reference_id + * Sets email * - * @param string|null $reference_id reference_id + * @param string|null $email Recipient's Contact email address. * * @return self */ - public function setReferenceId($reference_id) + public function setEmail($email) { - $this->container['reference_id'] = $reference_id; + $this->container['email'] = $email; return $this; } /** - * Gets email + * Gets account_number * * @return string|null */ - public function getEmail() + public function getAccountNumber() { - return $this->container['email']; + return $this->container['account_number']; } /** - * Sets email + * Sets account_number * - * @param string|null $email email + * @param string|null $account_number Account number * * @return self */ - public function setEmail($email) + public function setAccountNumber($account_number) { - $this->container['email'] = $email; + $this->container['account_number'] = $account_number; return $this; } /** - * Gets tin_type + * Gets office_code * * @return string|null */ - public function getTinType() + public function getOfficeCode() { - return $this->container['tin_type']; + return $this->container['office_code']; } /** - * Sets tin_type + * Sets office_code * - * @param string|null $tin_type tin_type + * @param string|null $office_code Office code * * @return self */ - public function setTinType($tin_type) + public function setOfficeCode($office_code) { - $this->container['tin_type'] = $tin_type; + $this->container['office_code'] = $office_code; return $this; } /** - * Gets tin + * Gets non_us_province * * @return string|null */ - public function getTin() + public function getNonUsProvince() { - return $this->container['tin']; + return $this->container['non_us_province']; } /** - * Sets tin + * Sets non_us_province * - * @param string|null $tin tin + * @param string|null $non_us_province Province or region for non-US/CA addresses. * * @return self */ - public function setTin($tin) + public function setNonUsProvince($non_us_province) { - $this->container['tin'] = $tin; + $this->container['non_us_province'] = $non_us_province; return $this; } /** - * Gets recipient_name + * Gets country_code * - * @return string|null + * @return string */ - public function getRecipientName() + public function getCountryCode() { - return $this->container['recipient_name']; + return $this->container['country_code']; } /** - * Sets recipient_name + * Sets country_code * - * @param string|null $recipient_name recipient_name + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ - public function setRecipientName($recipient_name) + public function setCountryCode($country_code) { - $this->container['recipient_name'] = $recipient_name; + $this->container['country_code'] = $country_code; return $this; } /** - * Gets recipient_second_name + * Gets federal_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getRecipientSecondName() + public function getFederalEfileDate() { - return $this->container['recipient_second_name']; + return $this->container['federal_efile_date']; } /** - * Sets recipient_second_name + * Sets federal_efile_date * - * @param string|null $recipient_second_name recipient_second_name + * @param \DateTime|null $federal_efile_date Date when federal e-filing should be scheduled for this form * * @return self */ - public function setRecipientSecondName($recipient_second_name) + public function setFederalEfileDate($federal_efile_date) { - $this->container['recipient_second_name'] = $recipient_second_name; + $this->container['federal_efile_date'] = $federal_efile_date; return $this; } /** - * Gets address + * Gets postal_mail * - * @return string|null + * @return bool|null */ - public function getAddress() + public function getPostalMail() { - return $this->container['address']; + return $this->container['postal_mail']; } /** - * Sets address + * Sets postal_mail * - * @param string|null $address address + * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form * * @return self */ - public function setAddress($address) + public function setPostalMail($postal_mail) { - $this->container['address'] = $address; + $this->container['postal_mail'] = $postal_mail; return $this; } /** - * Gets address2 + * Gets state_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getAddress2() + public function getStateEfileDate() { - return $this->container['address2']; + return $this->container['state_efile_date']; } /** - * Sets address2 + * Sets state_efile_date * - * @param string|null $address2 address2 + * @param \DateTime|null $state_efile_date Date when state e-filing should be scheduled for this form * * @return self */ - public function setAddress2($address2) + public function setStateEfileDate($state_efile_date) { - $this->container['address2'] = $address2; + $this->container['state_efile_date'] = $state_efile_date; return $this; } /** - * Gets city + * Gets recipient_edelivery_date * - * @return string|null + * @return \DateTime|null */ - public function getCity() + public function getRecipientEdeliveryDate() { - return $this->container['city']; + return $this->container['recipient_edelivery_date']; } /** - * Sets city + * Sets recipient_edelivery_date * - * @param string|null $city city + * @param \DateTime|null $recipient_edelivery_date Date when recipient e-delivery should be scheduled for this form * * @return self */ - public function setCity($city) + public function setRecipientEdeliveryDate($recipient_edelivery_date) { - $this->container['city'] = $city; + $this->container['recipient_edelivery_date'] = $recipient_edelivery_date; return $this; } /** - * Gets state + * Gets tin_match * - * @return string|null + * @return bool|null */ - public function getState() + public function getTinMatch() { - return $this->container['state']; + return $this->container['tin_match']; } /** - * Sets state + * Sets tin_match * - * @param string|null $state state + * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form * * @return self */ - public function setState($state) + public function setTinMatch($tin_match) { - $this->container['state'] = $state; + $this->container['tin_match'] = $tin_match; return $this; } /** - * Gets zip + * Gets no_tin * - * @return string|null + * @return bool|null */ - public function getZip() + public function getNoTin() { - return $this->container['zip']; + return $this->container['no_tin']; } /** - * Sets zip + * Sets no_tin * - * @param string|null $zip zip + * @param bool|null $no_tin No TIN indicator * * @return self */ - public function setZip($zip) + public function setNoTin($no_tin) { - $this->container['zip'] = $zip; + $this->container['no_tin'] = $no_tin; return $this; } /** - * Gets foreign_province + * Gets address_verification * - * @return string|null + * @return bool|null */ - public function getForeignProvince() + public function getAddressVerification() { - return $this->container['foreign_province']; + return $this->container['address_verification']; } /** - * Sets foreign_province + * Sets address_verification * - * @param string|null $foreign_province foreign_province + * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form * * @return self */ - public function setForeignProvince($foreign_province) + public function setAddressVerification($address_verification) { - $this->container['foreign_province'] = $foreign_province; + $this->container['address_verification'] = $address_verification; return $this; } /** - * Gets country_code + * Gets state_and_local_withholding * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null */ - public function getCountryCode() + public function getStateAndLocalWithholding() { - return $this->container['country_code']; + return $this->container['state_and_local_withholding']; } /** - * Sets country_code + * Sets state_and_local_withholding * - * @param string|null $country_code country_code + * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding State and local withholding information * * @return self */ - public function setCountryCode($country_code) + public function setStateAndLocalWithholding($state_and_local_withholding) { - $this->container['country_code'] = $country_code; + $this->container['state_and_local_withholding'] = $state_and_local_withholding; + + return $this; + } + + /** + * Gets second_tin_notice + * + * @return bool|null + */ + public function getSecondTinNotice() + { + return $this->container['second_tin_notice']; + } + + /** + * Sets second_tin_notice + * + * @param bool|null $second_tin_notice Second TIN notice + * + * @return self + */ + public function setSecondTinNotice($second_tin_notice) + { + $this->container['second_tin_notice'] = $second_tin_notice; + + return $this; + } + + /** + * Gets federal_efile_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getFederalEfileStatus() + { + return $this->container['federal_efile_status']; + } + + /** + * Sets federal_efile_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status Federal e-file status + * + * @return self + */ + public function setFederalEfileStatus($federal_efile_status) + { + $this->container['federal_efile_status'] = $federal_efile_status; + + return $this; + } + + /** + * Gets state_efile_status + * + * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null + */ + public function getStateEfileStatus() + { + return $this->container['state_efile_status']; + } + + /** + * Sets state_efile_status + * + * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status State e-file status + * + * @return self + */ + public function setStateEfileStatus($state_efile_status) + { + + + $this->container['state_efile_status'] = $state_efile_status; + + return $this; + } + + /** + * Gets postal_mail_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getPostalMailStatus() + { + return $this->container['postal_mail_status']; + } + + /** + * Sets postal_mail_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status Postal mail to recipient status + * + * @return self + */ + public function setPostalMailStatus($postal_mail_status) + { + $this->container['postal_mail_status'] = $postal_mail_status; + + return $this; + } + + /** + * Gets tin_match_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getTinMatchStatus() + { + return $this->container['tin_match_status']; + } + + /** + * Sets tin_match_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status TIN Match status + * + * @return self + */ + public function setTinMatchStatus($tin_match_status) + { + $this->container['tin_match_status'] = $tin_match_status; + + return $this; + } + + /** + * Gets address_verification_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getAddressVerificationStatus() + { + return $this->container['address_verification_status']; + } + + /** + * Sets address_verification_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status Address verification status + * + * @return self + */ + public function setAddressVerificationStatus($address_verification_status) + { + $this->container['address_verification_status'] = $address_verification_status; + + return $this; + } + + /** + * Gets e_delivery_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getEDeliveryStatus() + { + return $this->container['e_delivery_status']; + } + + /** + * Sets e_delivery_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $e_delivery_status EDelivery status + * + * @return self + */ + public function setEDeliveryStatus($e_delivery_status) + { + $this->container['e_delivery_status'] = $e_delivery_status; return $this; } @@ -1120,7 +1427,7 @@ public function getValidationErrors() /** * Sets validation_errors * - * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors validation_errors + * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors Validation errors * * @return self */ @@ -1146,7 +1453,7 @@ public function getCreatedAt() /** * Sets created_at * - * @param \DateTime|null $created_at created_at + * @param \DateTime|null $created_at Date time when the record was created. * * @return self */ @@ -1170,7 +1477,7 @@ public function getUpdatedAt() /** * Sets updated_at * - * @param \DateTime|null $updated_at updated_at + * @param \DateTime|null $updated_at Date time when the record was last updated. * * @return self */ @@ -1180,30 +1487,6 @@ public function setUpdatedAt($updated_at) return $this; } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/Form1099BaseResponse.php b/lib/Model/A1099/V2/Form1099BaseResponse.php deleted file mode 100644 index e07a929..0000000 --- a/lib/Model/A1099/V2/Form1099BaseResponse.php +++ /dev/null @@ -1,1518 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099BaseResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099BaseResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099BaseResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'id' => 'string', - 'type' => 'string', - 'issuer_id' => 'int', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', - 'tin' => 'string', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'recipient_name' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'fatca_filing_requirement' => 'bool', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'id' => null, - 'type' => null, - 'issuer_id' => 'int32', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, - 'e_delivery_status' => null, - 'reference_id' => null, - 'email' => null, - 'tin_type' => null, - 'tin' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'recipient_name' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'non_us_province' => null, - 'country_code' => null, - 'account_number' => null, - 'office_code' => null, - 'fatca_filing_requirement' => null, - 'validation_errors' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', - 'tin' => 'tin', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'recipient_name' => 'recipientName', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'validation_errors' => 'validationErrors', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', - 'tin' => 'setTin', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'recipient_name' => 'setRecipientName', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'validation_errors' => 'setValidationErrors', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', - 'tin' => 'getTin', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'recipient_name' => 'getRecipientName', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'validation_errors' => 'getValidationErrors', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ((mb_strlen($this->container['id']) < 1)) { - $invalidProperties[] = "invalid value for 'id', the character length must be bigger than or equal to 1."; - } - - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ((mb_strlen($this->container['type']) < 1)) { - $invalidProperties[] = "invalid value for 'type', the character length must be bigger than or equal to 1."; - } - - if ($this->container['issuer_id'] === null) { - $invalidProperties[] = "'issuer_id' can't be null"; - } - if ($this->container['federal_efile'] === null) { - $invalidProperties[] = "'federal_efile' can't be null"; - } - if ($this->container['state_efile'] === null) { - $invalidProperties[] = "'state_efile' can't be null"; - } - if ($this->container['postal_mail'] === null) { - $invalidProperties[] = "'postal_mail' can't be null"; - } - if ($this->container['tin_match'] === null) { - $invalidProperties[] = "'tin_match' can't be null"; - } - if ($this->container['address_verification'] === null) { - $invalidProperties[] = "'address_verification' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID of the form - * - * @return self - */ - public function setId($id) - { - - if ((mb_strlen($id) < 1)) { - throw new \InvalidArgumentException('invalid length for $id when calling Form1099BaseResponse., must be bigger than or equal to 1.'); - } - - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * - * @return self - */ - public function setType($type) - { - - if ((mb_strlen($type) < 1)) { - throw new \InvalidArgumentException('invalid length for $type when calling Form1099BaseResponse., must be bigger than or equal to 1.'); - } - - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return int - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param int $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets federal_efile - * - * @return bool - */ - public function getFederalEfile() - { - return $this->container['federal_efile']; - } - - /** - * Sets federal_efile - * - * @param bool $federal_efile Boolean indicating that federal e-filing has been scheduled for this form - * - * @return self - */ - public function setFederalEfile($federal_efile) - { - $this->container['federal_efile'] = $federal_efile; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status Federal e-file status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets state_efile - * - * @return bool - */ - public function getStateEfile() - { - return $this->container['state_efile']; - } - - /** - * Sets state_efile - * - * @param bool $state_efile Boolean indicating that state e-filing has been scheduled for this form - * - * @return self - */ - public function setStateEfile($state_efile) - { - $this->container['state_efile'] = $state_efile; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status State e-file status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool $postal_mail Boolean indicating that postal mailing to the recipient has been scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status Postal mail to recipient status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool $tin_match Boolean indicating that TIN Matching has been scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status TIN Match status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool $address_verification Boolean indicating that address verification has been scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status Address verification status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status EDelivery status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin Recipient Tax ID Number - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second Tin Notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address Address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city City - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account Number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office Code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors Validation errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Creation time - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Update time - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099DivListItemResponse.php b/lib/Model/A1099/V2/Form1099Div.php similarity index 77% rename from lib/Model/A1099/V2/Form1099DivListItemResponse.php rename to lib/Model/A1099/V2/Form1099Div.php index 83d0f73..87dbbca 100644 --- a/lib/Model/A1099/V2/Form1099DivListItemResponse.php +++ b/lib/Model/A1099/V2/Form1099Div.php @@ -1,6 +1,6 @@ 'string', - 'qualified_dividends' => 'string', - 'total_capital_gain_distributions' => 'string', - 'unrecaptured_section1250_gain' => 'string', - 'section1202_gain' => 'string', - 'collectibles_gain' => 'string', - 'section897_ordinary_dividends' => 'string', - 'section897_capital_gain' => 'string', - 'nondividend_distributions' => 'string', - 'federal_income_tax_withheld' => 'string', - 'section199_a_dividends' => 'string', - 'investment_expenses' => 'string', - 'foreign_tax_paid' => 'string', + 'total_ordinary_dividends' => 'float', + 'qualified_dividends' => 'float', + 'total_capital_gain_distributions' => 'float', + 'unrecaptured_section1250_gain' => 'float', + 'section1202_gain' => 'float', + 'collectibles_gain' => 'float', + 'section897_ordinary_dividends' => 'float', + 'section897_capital_gain' => 'float', + 'nondividend_distributions' => 'float', + 'federal_income_tax_withheld' => 'float', + 'section199_a_dividends' => 'float', + 'investment_expenses' => 'float', + 'foreign_tax_paid' => 'float', 'foreign_country_or_us_possession' => 'string', - 'cash_liquidation_distributions' => 'string', - 'noncash_liquidation_distributions' => 'string', - 'exempt_interest_dividends' => 'string', - 'specified_private_activity_bond_interest_dividends' => 'string', + 'cash_liquidation_distributions' => 'float', + 'noncash_liquidation_distributions' => 'float', + 'exempt_interest_dividends' => 'float', + 'specified_private_activity_bond_interest_dividends' => 'float', 'fatca_filing_requirement' => 'bool', - 'id' => 'string', 'type' => 'string', - 'issuer_id' => 'int', + 'id' => 'string', + 'issuer_id' => 'string', 'issuer_reference_id' => 'string', 'issuer_tin' => 'string', 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', 'tin' => 'string', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', 'recipient_name' => 'string', + 'tin_type' => 'string', 'recipient_second_name' => 'string', 'address' => 'string', 'address2' => 'string', 'city' => 'string', 'state' => 'string', 'zip' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', + 'email' => 'string', 'account_number' => 'string', 'office_code' => 'string', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]', + 'non_us_province' => 'string', + 'country_code' => 'string', + 'federal_efile_date' => '\DateTime', + 'postal_mail' => 'bool', + 'state_efile_date' => '\DateTime', + 'recipient_edelivery_date' => '\DateTime', + 'tin_match' => 'bool', + 'no_tin' => 'bool', + 'address_verification' => 'bool', + 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding', + 'second_tin_notice' => 'bool', + 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', + 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationError[]', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse' + 'updated_at' => '\DateTime' ]; /** @@ -138,63 +140,64 @@ class Form1099DivListItemResponse implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $openAPIFormats = [ - 'total_ordinary_dividends' => null, - 'qualified_dividends' => null, - 'total_capital_gain_distributions' => null, - 'unrecaptured_section1250_gain' => null, - 'section1202_gain' => null, - 'collectibles_gain' => null, - 'section897_ordinary_dividends' => null, - 'section897_capital_gain' => null, - 'nondividend_distributions' => null, - 'federal_income_tax_withheld' => null, - 'section199_a_dividends' => null, - 'investment_expenses' => null, - 'foreign_tax_paid' => null, + 'total_ordinary_dividends' => 'double', + 'qualified_dividends' => 'double', + 'total_capital_gain_distributions' => 'double', + 'unrecaptured_section1250_gain' => 'double', + 'section1202_gain' => 'double', + 'collectibles_gain' => 'double', + 'section897_ordinary_dividends' => 'double', + 'section897_capital_gain' => 'double', + 'nondividend_distributions' => 'double', + 'federal_income_tax_withheld' => 'double', + 'section199_a_dividends' => 'double', + 'investment_expenses' => 'double', + 'foreign_tax_paid' => 'double', 'foreign_country_or_us_possession' => null, - 'cash_liquidation_distributions' => null, - 'noncash_liquidation_distributions' => null, - 'exempt_interest_dividends' => null, - 'specified_private_activity_bond_interest_dividends' => null, + 'cash_liquidation_distributions' => 'double', + 'noncash_liquidation_distributions' => 'double', + 'exempt_interest_dividends' => 'double', + 'specified_private_activity_bond_interest_dividends' => 'double', 'fatca_filing_requirement' => null, - 'id' => null, 'type' => null, - 'issuer_id' => 'int32', + 'id' => null, + 'issuer_id' => null, 'issuer_reference_id' => null, 'issuer_tin' => null, 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, - 'e_delivery_status' => null, 'reference_id' => null, - 'email' => null, - 'tin_type' => null, 'tin' => null, - 'no_tin' => null, - 'second_tin_notice' => null, 'recipient_name' => null, + 'tin_type' => null, 'recipient_second_name' => null, 'address' => null, 'address2' => null, 'city' => null, 'state' => null, 'zip' => null, - 'non_us_province' => null, - 'country_code' => null, + 'email' => null, 'account_number' => null, 'office_code' => null, + 'non_us_province' => null, + 'country_code' => null, + 'federal_efile_date' => 'date', + 'postal_mail' => null, + 'state_efile_date' => 'date', + 'recipient_edelivery_date' => 'date', + 'tin_match' => null, + 'no_tin' => null, + 'address_verification' => null, + 'state_and_local_withholding' => null, + 'second_tin_notice' => null, + 'federal_efile_status' => null, + 'state_efile_status' => null, + 'postal_mail_status' => null, + 'tin_match_status' => null, + 'address_verification_status' => null, + 'e_delivery_status' => null, 'validation_errors' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null + 'updated_at' => 'date-time' ]; /** @@ -243,44 +246,45 @@ public static function openAPIFormats() 'exempt_interest_dividends' => 'exemptInterestDividends', 'specified_private_activity_bond_interest_dividends' => 'specifiedPrivateActivityBondInterestDividends', 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'id' => 'id', 'type' => 'type', + 'id' => 'id', 'issuer_id' => 'issuerId', 'issuer_reference_id' => 'issuerReferenceId', 'issuer_tin' => 'issuerTin', 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', - 'e_delivery_status' => 'eDeliveryStatus', 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', 'tin' => 'tin', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', 'recipient_name' => 'recipientName', + 'tin_type' => 'tinType', 'recipient_second_name' => 'recipientSecondName', 'address' => 'address', 'address2' => 'address2', 'city' => 'city', 'state' => 'state', 'zip' => 'zip', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', + 'email' => 'email', 'account_number' => 'accountNumber', 'office_code' => 'officeCode', + 'non_us_province' => 'nonUsProvince', + 'country_code' => 'countryCode', + 'federal_efile_date' => 'federalEfileDate', + 'postal_mail' => 'postalMail', + 'state_efile_date' => 'stateEfileDate', + 'recipient_edelivery_date' => 'recipientEdeliveryDate', + 'tin_match' => 'tinMatch', + 'no_tin' => 'noTin', + 'address_verification' => 'addressVerification', + 'state_and_local_withholding' => 'stateAndLocalWithholding', + 'second_tin_notice' => 'secondTinNotice', + 'federal_efile_status' => 'federalEfileStatus', + 'state_efile_status' => 'stateEfileStatus', + 'postal_mail_status' => 'postalMailStatus', + 'tin_match_status' => 'tinMatchStatus', + 'address_verification_status' => 'addressVerificationStatus', + 'e_delivery_status' => 'eDeliveryStatus', 'validation_errors' => 'validationErrors', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' + 'updated_at' => 'updatedAt' ]; /** @@ -308,44 +312,45 @@ public static function openAPIFormats() 'exempt_interest_dividends' => 'setExemptInterestDividends', 'specified_private_activity_bond_interest_dividends' => 'setSpecifiedPrivateActivityBondInterestDividends', 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'id' => 'setId', 'type' => 'setType', + 'id' => 'setId', 'issuer_id' => 'setIssuerId', 'issuer_reference_id' => 'setIssuerReferenceId', 'issuer_tin' => 'setIssuerTin', 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', - 'e_delivery_status' => 'setEDeliveryStatus', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', 'tin' => 'setTin', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', 'recipient_name' => 'setRecipientName', + 'tin_type' => 'setTinType', 'recipient_second_name' => 'setRecipientSecondName', 'address' => 'setAddress', 'address2' => 'setAddress2', 'city' => 'setCity', 'state' => 'setState', 'zip' => 'setZip', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', + 'email' => 'setEmail', 'account_number' => 'setAccountNumber', 'office_code' => 'setOfficeCode', + 'non_us_province' => 'setNonUsProvince', + 'country_code' => 'setCountryCode', + 'federal_efile_date' => 'setFederalEfileDate', + 'postal_mail' => 'setPostalMail', + 'state_efile_date' => 'setStateEfileDate', + 'recipient_edelivery_date' => 'setRecipientEdeliveryDate', + 'tin_match' => 'setTinMatch', + 'no_tin' => 'setNoTin', + 'address_verification' => 'setAddressVerification', + 'state_and_local_withholding' => 'setStateAndLocalWithholding', + 'second_tin_notice' => 'setSecondTinNotice', + 'federal_efile_status' => 'setFederalEfileStatus', + 'state_efile_status' => 'setStateEfileStatus', + 'postal_mail_status' => 'setPostalMailStatus', + 'tin_match_status' => 'setTinMatchStatus', + 'address_verification_status' => 'setAddressVerificationStatus', + 'e_delivery_status' => 'setEDeliveryStatus', 'validation_errors' => 'setValidationErrors', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' + 'updated_at' => 'setUpdatedAt' ]; /** @@ -373,44 +378,45 @@ public static function openAPIFormats() 'exempt_interest_dividends' => 'getExemptInterestDividends', 'specified_private_activity_bond_interest_dividends' => 'getSpecifiedPrivateActivityBondInterestDividends', 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'id' => 'getId', 'type' => 'getType', + 'id' => 'getId', 'issuer_id' => 'getIssuerId', 'issuer_reference_id' => 'getIssuerReferenceId', 'issuer_tin' => 'getIssuerTin', 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', - 'e_delivery_status' => 'getEDeliveryStatus', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', 'tin' => 'getTin', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', 'recipient_name' => 'getRecipientName', + 'tin_type' => 'getTinType', 'recipient_second_name' => 'getRecipientSecondName', 'address' => 'getAddress', 'address2' => 'getAddress2', 'city' => 'getCity', 'state' => 'getState', 'zip' => 'getZip', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', + 'email' => 'getEmail', 'account_number' => 'getAccountNumber', 'office_code' => 'getOfficeCode', + 'non_us_province' => 'getNonUsProvince', + 'country_code' => 'getCountryCode', + 'federal_efile_date' => 'getFederalEfileDate', + 'postal_mail' => 'getPostalMail', + 'state_efile_date' => 'getStateEfileDate', + 'recipient_edelivery_date' => 'getRecipientEdeliveryDate', + 'tin_match' => 'getTinMatch', + 'no_tin' => 'getNoTin', + 'address_verification' => 'getAddressVerification', + 'state_and_local_withholding' => 'getStateAndLocalWithholding', + 'second_tin_notice' => 'getSecondTinNotice', + 'federal_efile_status' => 'getFederalEfileStatus', + 'state_efile_status' => 'getStateEfileStatus', + 'postal_mail_status' => 'getPostalMailStatus', + 'tin_match_status' => 'getTinMatchStatus', + 'address_verification_status' => 'getAddressVerificationStatus', + 'e_delivery_status' => 'getEDeliveryStatus', 'validation_errors' => 'getValidationErrors', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' + 'updated_at' => 'getUpdatedAt' ]; /** @@ -454,6 +460,56 @@ public function getModelName() return self::$openAPIModelName; } + const TYPE__1099_NEC = '1099-NEC'; + const TYPE__1099_MISC = '1099-MISC'; + const TYPE__1099_DIV = '1099-DIV'; + const TYPE__1099_R = '1099-R'; + const TYPE__1099_K = '1099-K'; + const TYPE__1095_B = '1095-B'; + const TYPE__1042_S = '1042-S'; + const TYPE__1095_C = '1095-C'; + const TYPE__1099_INT = '1099-INT'; + const TIN_TYPE__EMPTY = 'Empty'; + const TIN_TYPE_EIN = 'EIN'; + const TIN_TYPE_SSN = 'SSN'; + const TIN_TYPE_ITIN = 'ITIN'; + const TIN_TYPE_ATIN = 'ATIN'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE__1099_NEC, + self::TYPE__1099_MISC, + self::TYPE__1099_DIV, + self::TYPE__1099_R, + self::TYPE__1099_K, + self::TYPE__1095_B, + self::TYPE__1042_S, + self::TYPE__1095_C, + self::TYPE__1099_INT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTinTypeAllowableValues() + { + return [ + self::TIN_TYPE__EMPTY, + self::TIN_TYPE_EIN, + self::TIN_TYPE_SSN, + self::TIN_TYPE_ITIN, + self::TIN_TYPE_ATIN, + ]; + } /** * Associative array for storing property values @@ -489,44 +545,45 @@ public function __construct(array $data = null) $this->container['exempt_interest_dividends'] = $data['exempt_interest_dividends'] ?? null; $this->container['specified_private_activity_bond_interest_dividends'] = $data['specified_private_activity_bond_interest_dividends'] ?? null; $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['id'] = $data['id'] ?? null; $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; $this->container['issuer_id'] = $data['issuer_id'] ?? null; $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['tin'] = $data['tin'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; $this->container['recipient_name'] = $data['recipient_name'] ?? null; + $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['address2'] = $data['address2'] ?? null; $this->container['city'] = $data['city'] ?? null; $this->container['state'] = $data['state'] ?? null; $this->container['zip'] = $data['zip'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['email'] = $data['email'] ?? null; $this->container['account_number'] = $data['account_number'] ?? null; $this->container['office_code'] = $data['office_code'] ?? null; + $this->container['non_us_province'] = $data['non_us_province'] ?? null; + $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['federal_efile_date'] = $data['federal_efile_date'] ?? null; + $this->container['postal_mail'] = $data['postal_mail'] ?? null; + $this->container['state_efile_date'] = $data['state_efile_date'] ?? null; + $this->container['recipient_edelivery_date'] = $data['recipient_edelivery_date'] ?? null; + $this->container['tin_match'] = $data['tin_match'] ?? null; + $this->container['no_tin'] = $data['no_tin'] ?? null; + $this->container['address_verification'] = $data['address_verification'] ?? null; + $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; + $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; + $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; + $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; + $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; + $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; + $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; + $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['validation_errors'] = $data['validation_errors'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; } /** @@ -538,37 +595,38 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ((mb_strlen($this->container['id']) < 1)) { - $invalidProperties[] = "invalid value for 'id', the character length must be bigger than or equal to 1."; - } - if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } - if ((mb_strlen($this->container['type']) < 1)) { - $invalidProperties[] = "invalid value for 'type', the character length must be bigger than or equal to 1."; + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); } - if ($this->container['issuer_id'] === null) { - $invalidProperties[] = "'issuer_id' can't be null"; - } - if ($this->container['federal_efile'] === null) { - $invalidProperties[] = "'federal_efile' can't be null"; + if ($this->container['recipient_name'] === null) { + $invalidProperties[] = "'recipient_name' can't be null"; } - if ($this->container['state_efile'] === null) { - $invalidProperties[] = "'state_efile' can't be null"; + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tin_type', must be one of '%s'", + $this->container['tin_type'], + implode("', '", $allowedValues) + ); } - if ($this->container['postal_mail'] === null) { - $invalidProperties[] = "'postal_mail' can't be null"; + + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; } - if ($this->container['tin_match'] === null) { - $invalidProperties[] = "'tin_match' can't be null"; + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; } - if ($this->container['address_verification'] === null) { - $invalidProperties[] = "'address_verification' can't be null"; + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; } return $invalidProperties; } @@ -588,7 +646,7 @@ public function valid() /** * Gets total_ordinary_dividends * - * @return string|null + * @return float|null */ public function getTotalOrdinaryDividends() { @@ -598,7 +656,7 @@ public function getTotalOrdinaryDividends() /** * Sets total_ordinary_dividends * - * @param string|null $total_ordinary_dividends Total ordinary dividends + * @param float|null $total_ordinary_dividends Total ordinary dividends * * @return self */ @@ -612,7 +670,7 @@ public function setTotalOrdinaryDividends($total_ordinary_dividends) /** * Gets qualified_dividends * - * @return string|null + * @return float|null */ public function getQualifiedDividends() { @@ -622,7 +680,7 @@ public function getQualifiedDividends() /** * Sets qualified_dividends * - * @param string|null $qualified_dividends Qualified dividends + * @param float|null $qualified_dividends Qualified dividends * * @return self */ @@ -636,7 +694,7 @@ public function setQualifiedDividends($qualified_dividends) /** * Gets total_capital_gain_distributions * - * @return string|null + * @return float|null */ public function getTotalCapitalGainDistributions() { @@ -646,7 +704,7 @@ public function getTotalCapitalGainDistributions() /** * Sets total_capital_gain_distributions * - * @param string|null $total_capital_gain_distributions Total capital gain distributions + * @param float|null $total_capital_gain_distributions Total capital gain distributions * * @return self */ @@ -660,7 +718,7 @@ public function setTotalCapitalGainDistributions($total_capital_gain_distributio /** * Gets unrecaptured_section1250_gain * - * @return string|null + * @return float|null */ public function getUnrecapturedSection1250Gain() { @@ -670,7 +728,7 @@ public function getUnrecapturedSection1250Gain() /** * Sets unrecaptured_section1250_gain * - * @param string|null $unrecaptured_section1250_gain Unrecaptured Section 1250 gain + * @param float|null $unrecaptured_section1250_gain Unrecaptured Section 1250 gain * * @return self */ @@ -684,7 +742,7 @@ public function setUnrecapturedSection1250Gain($unrecaptured_section1250_gain) /** * Gets section1202_gain * - * @return string|null + * @return float|null */ public function getSection1202Gain() { @@ -694,7 +752,7 @@ public function getSection1202Gain() /** * Sets section1202_gain * - * @param string|null $section1202_gain Section 1202 gain + * @param float|null $section1202_gain Section 1202 gain * * @return self */ @@ -708,7 +766,7 @@ public function setSection1202Gain($section1202_gain) /** * Gets collectibles_gain * - * @return string|null + * @return float|null */ public function getCollectiblesGain() { @@ -718,7 +776,7 @@ public function getCollectiblesGain() /** * Sets collectibles_gain * - * @param string|null $collectibles_gain Collectibles (28%) gain + * @param float|null $collectibles_gain Collectibles (28%) gain * * @return self */ @@ -732,7 +790,7 @@ public function setCollectiblesGain($collectibles_gain) /** * Gets section897_ordinary_dividends * - * @return string|null + * @return float|null */ public function getSection897OrdinaryDividends() { @@ -742,7 +800,7 @@ public function getSection897OrdinaryDividends() /** * Sets section897_ordinary_dividends * - * @param string|null $section897_ordinary_dividends Section 897 ordinary dividends + * @param float|null $section897_ordinary_dividends Section 897 ordinary dividends * * @return self */ @@ -756,7 +814,7 @@ public function setSection897OrdinaryDividends($section897_ordinary_dividends) /** * Gets section897_capital_gain * - * @return string|null + * @return float|null */ public function getSection897CapitalGain() { @@ -766,7 +824,7 @@ public function getSection897CapitalGain() /** * Sets section897_capital_gain * - * @param string|null $section897_capital_gain Section 897 capital gain + * @param float|null $section897_capital_gain Section 897 capital gain * * @return self */ @@ -780,7 +838,7 @@ public function setSection897CapitalGain($section897_capital_gain) /** * Gets nondividend_distributions * - * @return string|null + * @return float|null */ public function getNondividendDistributions() { @@ -790,7 +848,7 @@ public function getNondividendDistributions() /** * Sets nondividend_distributions * - * @param string|null $nondividend_distributions Nondividend distributions + * @param float|null $nondividend_distributions Nondividend distributions * * @return self */ @@ -804,7 +862,7 @@ public function setNondividendDistributions($nondividend_distributions) /** * Gets federal_income_tax_withheld * - * @return string|null + * @return float|null */ public function getFederalIncomeTaxWithheld() { @@ -814,7 +872,7 @@ public function getFederalIncomeTaxWithheld() /** * Sets federal_income_tax_withheld * - * @param string|null $federal_income_tax_withheld Federal income tax withheld + * @param float|null $federal_income_tax_withheld Federal income tax withheld * * @return self */ @@ -828,7 +886,7 @@ public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) /** * Gets section199_a_dividends * - * @return string|null + * @return float|null */ public function getSection199ADividends() { @@ -838,7 +896,7 @@ public function getSection199ADividends() /** * Sets section199_a_dividends * - * @param string|null $section199_a_dividends Section 199A dividends + * @param float|null $section199_a_dividends Section 199A dividends * * @return self */ @@ -852,7 +910,7 @@ public function setSection199ADividends($section199_a_dividends) /** * Gets investment_expenses * - * @return string|null + * @return float|null */ public function getInvestmentExpenses() { @@ -862,7 +920,7 @@ public function getInvestmentExpenses() /** * Sets investment_expenses * - * @param string|null $investment_expenses Investment expenses + * @param float|null $investment_expenses Investment expenses * * @return self */ @@ -876,7 +934,7 @@ public function setInvestmentExpenses($investment_expenses) /** * Gets foreign_tax_paid * - * @return string|null + * @return float|null */ public function getForeignTaxPaid() { @@ -886,7 +944,7 @@ public function getForeignTaxPaid() /** * Sets foreign_tax_paid * - * @param string|null $foreign_tax_paid Foreign tax paid + * @param float|null $foreign_tax_paid Foreign tax paid * * @return self */ @@ -924,7 +982,7 @@ public function setForeignCountryOrUsPossession($foreign_country_or_us_possessio /** * Gets cash_liquidation_distributions * - * @return string|null + * @return float|null */ public function getCashLiquidationDistributions() { @@ -934,7 +992,7 @@ public function getCashLiquidationDistributions() /** * Sets cash_liquidation_distributions * - * @param string|null $cash_liquidation_distributions Cash liquidation distributions + * @param float|null $cash_liquidation_distributions Cash liquidation distributions * * @return self */ @@ -948,7 +1006,7 @@ public function setCashLiquidationDistributions($cash_liquidation_distributions) /** * Gets noncash_liquidation_distributions * - * @return string|null + * @return float|null */ public function getNoncashLiquidationDistributions() { @@ -958,7 +1016,7 @@ public function getNoncashLiquidationDistributions() /** * Sets noncash_liquidation_distributions * - * @param string|null $noncash_liquidation_distributions Noncash liquidation distributions + * @param float|null $noncash_liquidation_distributions Noncash liquidation distributions * * @return self */ @@ -972,7 +1030,7 @@ public function setNoncashLiquidationDistributions($noncash_liquidation_distribu /** * Gets exempt_interest_dividends * - * @return string|null + * @return float|null */ public function getExemptInterestDividends() { @@ -982,7 +1040,7 @@ public function getExemptInterestDividends() /** * Sets exempt_interest_dividends * - * @param string|null $exempt_interest_dividends Exempt-interest dividends + * @param float|null $exempt_interest_dividends Exempt-interest dividends * * @return self */ @@ -996,7 +1054,7 @@ public function setExemptInterestDividends($exempt_interest_dividends) /** * Gets specified_private_activity_bond_interest_dividends * - * @return string|null + * @return float|null */ public function getSpecifiedPrivateActivityBondInterestDividends() { @@ -1006,7 +1064,7 @@ public function getSpecifiedPrivateActivityBondInterestDividends() /** * Sets specified_private_activity_bond_interest_dividends * - * @param string|null $specified_private_activity_bond_interest_dividends Specified private activity bond interest dividends + * @param float|null $specified_private_activity_bond_interest_dividends Specified private activity bond interest dividends * * @return self */ @@ -1042,59 +1100,59 @@ public function setFatcaFilingRequirement($fatca_filing_requirement) } /** - * Gets id + * Gets type * * @return string */ - public function getId() + public function getType() { - return $this->container['id']; + return $this->container['type']; } /** - * Sets id + * Sets type * - * @param string $id ID of the form + * @param string $type Form type * * @return self */ - public function setId($id) + public function setType($type) { - - if ((mb_strlen($id) < 1)) { - throw new \InvalidArgumentException('invalid length for $id when calling Form1099DivListItemResponse., must be bigger than or equal to 1.'); + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); } - - $this->container['id'] = $id; + $this->container['type'] = $type; return $this; } /** - * Gets type + * Gets id * - * @return string + * @return string|null */ - public function getType() + public function getId() { - return $this->container['type']; + return $this->container['id']; } /** - * Sets type + * Sets id * - * @param string $type Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC + * @param string|null $id Form ID. Unique identifier set when the record is created. * * @return self */ - public function setType($type) + public function setId($id) { - - if ((mb_strlen($type) < 1)) { - throw new \InvalidArgumentException('invalid length for $type when calling Form1099DivListItemResponse., must be bigger than or equal to 1.'); - } - - $this->container['type'] = $type; + $this->container['id'] = $id; return $this; } @@ -1102,7 +1160,7 @@ public function setType($type) /** * Gets issuer_id * - * @return int + * @return string|null */ public function getIssuerId() { @@ -1112,7 +1170,7 @@ public function getIssuerId() /** * Sets issuer_id * - * @param int $issuer_id Issuer ID + * @param string|null $issuer_id Issuer ID - only required when creating forms * * @return self */ @@ -1136,7 +1194,7 @@ public function getIssuerReferenceId() /** * Sets issuer_reference_id * - * @param string|null $issuer_reference_id Issuer Reference ID + * @param string|null $issuer_reference_id Issuer Reference ID - only required when creating forms * * @return self */ @@ -1160,7 +1218,7 @@ public function getIssuerTin() /** * Sets issuer_tin * - * @param string|null $issuer_tin Issuer TIN + * @param string|null $issuer_tin Issuer TIN - readonly * * @return self */ @@ -1184,7 +1242,7 @@ public function getTaxYear() /** * Sets tax_year * - * @param int|null $tax_year Tax year + * @param int|null $tax_year Tax Year - only required when creating forms * * @return self */ @@ -1196,675 +1254,733 @@ public function setTaxYear($tax_year) } /** - * Gets federal_efile + * Gets reference_id * - * @return bool + * @return string|null */ - public function getFederalEfile() + public function getReferenceId() { - return $this->container['federal_efile']; + return $this->container['reference_id']; } /** - * Sets federal_efile + * Sets reference_id * - * @param bool $federal_efile Boolean indicating that federal e-filing has been scheduled for this form + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ - public function setFederalEfile($federal_efile) + public function setReferenceId($reference_id) { - $this->container['federal_efile'] = $federal_efile; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets federal_efile_status + * Gets tin * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getFederalEfileStatus() + public function getTin() { - return $this->container['federal_efile_status']; + return $this->container['tin']; } /** - * Sets federal_efile_status + * Sets tin * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status Federal e-file status + * @param string|null $tin Recipient's Federal Tax Identification Number (TIN). * * @return self */ - public function setFederalEfileStatus($federal_efile_status) + public function setTin($tin) { - $this->container['federal_efile_status'] = $federal_efile_status; + $this->container['tin'] = $tin; return $this; } /** - * Gets state_efile + * Gets recipient_name * - * @return bool + * @return string */ - public function getStateEfile() + public function getRecipientName() { - return $this->container['state_efile']; + return $this->container['recipient_name']; } /** - * Sets state_efile + * Sets recipient_name * - * @param bool $state_efile Boolean indicating that state e-filing has been scheduled for this form + * @param string $recipient_name Recipient name * * @return self */ - public function setStateEfile($state_efile) + public function setRecipientName($recipient_name) { - $this->container['state_efile'] = $state_efile; + $this->container['recipient_name'] = $recipient_name; return $this; } /** - * Gets state_efile_status + * Gets tin_type * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null + * @return string|null */ - public function getStateEfileStatus() + public function getTinType() { - return $this->container['state_efile_status']; + return $this->container['tin_type']; } /** - * Sets state_efile_status + * Sets tin_type * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status State e-file status + * @param string|null $tin_type Type of TIN (Tax ID Number) * * @return self */ - public function setStateEfileStatus($state_efile_status) + public function setTinType($tin_type) { + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tin_type', must be one of '%s'", + $tin_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tin_type'] = $tin_type; + return $this; + } - $this->container['state_efile_status'] = $state_efile_status; + /** + * Gets recipient_second_name + * + * @return string|null + */ + public function getRecipientSecondName() + { + return $this->container['recipient_second_name']; + } + + /** + * Sets recipient_second_name + * + * @param string|null $recipient_second_name Recipient second name + * + * @return self + */ + public function setRecipientSecondName($recipient_second_name) + { + $this->container['recipient_second_name'] = $recipient_second_name; return $this; } /** - * Gets postal_mail + * Gets address * - * @return bool + * @return string */ - public function getPostalMail() + public function getAddress() { - return $this->container['postal_mail']; + return $this->container['address']; } /** - * Sets postal_mail + * Sets address * - * @param bool $postal_mail Boolean indicating that postal mailing to the recipient has been scheduled for this form + * @param string $address Address. * * @return self */ - public function setPostalMail($postal_mail) + public function setAddress($address) { - $this->container['postal_mail'] = $postal_mail; + $this->container['address'] = $address; return $this; } /** - * Gets postal_mail_status + * Gets address2 * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getPostalMailStatus() + public function getAddress2() { - return $this->container['postal_mail_status']; + return $this->container['address2']; } /** - * Sets postal_mail_status + * Sets address2 * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status Postal mail to recipient status + * @param string|null $address2 Address line 2. * * @return self */ - public function setPostalMailStatus($postal_mail_status) + public function setAddress2($address2) { - $this->container['postal_mail_status'] = $postal_mail_status; + $this->container['address2'] = $address2; return $this; } /** - * Gets tin_match + * Gets city * - * @return bool + * @return string */ - public function getTinMatch() + public function getCity() { - return $this->container['tin_match']; + return $this->container['city']; } /** - * Sets tin_match + * Sets city * - * @param bool $tin_match Boolean indicating that TIN Matching has been scheduled for this form + * @param string $city City. * * @return self */ - public function setTinMatch($tin_match) + public function setCity($city) { - $this->container['tin_match'] = $tin_match; + $this->container['city'] = $city; return $this; } /** - * Gets tin_match_status + * Gets state * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getTinMatchStatus() + public function getState() { - return $this->container['tin_match_status']; + return $this->container['state']; } /** - * Sets tin_match_status + * Sets state * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status TIN Match status + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ - public function setTinMatchStatus($tin_match_status) + public function setState($state) { - $this->container['tin_match_status'] = $tin_match_status; + $this->container['state'] = $state; return $this; } /** - * Gets address_verification + * Gets zip * - * @return bool + * @return string|null */ - public function getAddressVerification() + public function getZip() { - return $this->container['address_verification']; + return $this->container['zip']; } /** - * Sets address_verification + * Sets zip * - * @param bool $address_verification Boolean indicating that address verification has been scheduled for this form + * @param string|null $zip ZIP/postal code. * * @return self */ - public function setAddressVerification($address_verification) + public function setZip($zip) { - $this->container['address_verification'] = $address_verification; + $this->container['zip'] = $zip; return $this; } /** - * Gets address_verification_status + * Gets email * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getAddressVerificationStatus() + public function getEmail() { - return $this->container['address_verification_status']; + return $this->container['email']; } /** - * Sets address_verification_status + * Sets email * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status Address verification status + * @param string|null $email Recipient's Contact email address. * * @return self */ - public function setAddressVerificationStatus($address_verification_status) + public function setEmail($email) { - $this->container['address_verification_status'] = $address_verification_status; + $this->container['email'] = $email; return $this; } /** - * Gets e_delivery_status + * Gets account_number * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getEDeliveryStatus() + public function getAccountNumber() { - return $this->container['e_delivery_status']; + return $this->container['account_number']; } /** - * Sets e_delivery_status + * Sets account_number * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status EDelivery status + * @param string|null $account_number Account number * * @return self */ - public function setEDeliveryStatus($e_delivery_status) + public function setAccountNumber($account_number) { - $this->container['e_delivery_status'] = $e_delivery_status; + $this->container['account_number'] = $account_number; return $this; } /** - * Gets reference_id + * Gets office_code * * @return string|null */ - public function getReferenceId() + public function getOfficeCode() { - return $this->container['reference_id']; + return $this->container['office_code']; } /** - * Sets reference_id + * Sets office_code * - * @param string|null $reference_id Reference ID + * @param string|null $office_code Office code * * @return self */ - public function setReferenceId($reference_id) + public function setOfficeCode($office_code) { - $this->container['reference_id'] = $reference_id; + $this->container['office_code'] = $office_code; return $this; } /** - * Gets email + * Gets non_us_province * * @return string|null */ - public function getEmail() + public function getNonUsProvince() { - return $this->container['email']; + return $this->container['non_us_province']; } /** - * Sets email + * Sets non_us_province * - * @param string|null $email Recipient email address + * @param string|null $non_us_province Province or region for non-US/CA addresses. * * @return self */ - public function setEmail($email) + public function setNonUsProvince($non_us_province) { - $this->container['email'] = $email; + $this->container['non_us_province'] = $non_us_province; return $this; } /** - * Gets tin_type + * Gets country_code * - * @return string|null + * @return string */ - public function getTinType() + public function getCountryCode() { - return $this->container['tin_type']; + return $this->container['country_code']; } /** - * Sets tin_type + * Sets country_code * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ - public function setTinType($tin_type) + public function setCountryCode($country_code) { - $this->container['tin_type'] = $tin_type; + $this->container['country_code'] = $country_code; return $this; } /** - * Gets tin + * Gets federal_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getTin() + public function getFederalEfileDate() { - return $this->container['tin']; + return $this->container['federal_efile_date']; } /** - * Sets tin + * Sets federal_efile_date * - * @param string|null $tin Recipient Tax ID Number + * @param \DateTime|null $federal_efile_date Date when federal e-filing should be scheduled for this form * * @return self */ - public function setTin($tin) + public function setFederalEfileDate($federal_efile_date) { - $this->container['tin'] = $tin; + $this->container['federal_efile_date'] = $federal_efile_date; return $this; } /** - * Gets no_tin + * Gets postal_mail * * @return bool|null */ - public function getNoTin() + public function getPostalMail() { - return $this->container['no_tin']; + return $this->container['postal_mail']; } /** - * Sets no_tin + * Sets postal_mail * - * @param bool|null $no_tin Indicates whether the recipient has no TIN + * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form * * @return self */ - public function setNoTin($no_tin) + public function setPostalMail($postal_mail) { - $this->container['no_tin'] = $no_tin; + $this->container['postal_mail'] = $postal_mail; return $this; } /** - * Gets second_tin_notice + * Gets state_efile_date * - * @return bool|null + * @return \DateTime|null */ - public function getSecondTinNotice() + public function getStateEfileDate() { - return $this->container['second_tin_notice']; + return $this->container['state_efile_date']; } /** - * Sets second_tin_notice + * Sets state_efile_date * - * @param bool|null $second_tin_notice Second Tin Notice + * @param \DateTime|null $state_efile_date Date when state e-filing should be scheduled for this form * * @return self */ - public function setSecondTinNotice($second_tin_notice) + public function setStateEfileDate($state_efile_date) { - $this->container['second_tin_notice'] = $second_tin_notice; + $this->container['state_efile_date'] = $state_efile_date; return $this; } /** - * Gets recipient_name + * Gets recipient_edelivery_date * - * @return string|null + * @return \DateTime|null */ - public function getRecipientName() + public function getRecipientEdeliveryDate() { - return $this->container['recipient_name']; + return $this->container['recipient_edelivery_date']; } /** - * Sets recipient_name + * Sets recipient_edelivery_date * - * @param string|null $recipient_name Recipient name + * @param \DateTime|null $recipient_edelivery_date Date when recipient e-delivery should be scheduled for this form * * @return self */ - public function setRecipientName($recipient_name) + public function setRecipientEdeliveryDate($recipient_edelivery_date) { - $this->container['recipient_name'] = $recipient_name; + $this->container['recipient_edelivery_date'] = $recipient_edelivery_date; return $this; } /** - * Gets recipient_second_name + * Gets tin_match * - * @return string|null + * @return bool|null */ - public function getRecipientSecondName() + public function getTinMatch() { - return $this->container['recipient_second_name']; + return $this->container['tin_match']; } /** - * Sets recipient_second_name + * Sets tin_match * - * @param string|null $recipient_second_name Recipient second name + * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form * * @return self */ - public function setRecipientSecondName($recipient_second_name) + public function setTinMatch($tin_match) { - $this->container['recipient_second_name'] = $recipient_second_name; + $this->container['tin_match'] = $tin_match; return $this; } /** - * Gets address + * Gets no_tin * - * @return string|null + * @return bool|null */ - public function getAddress() + public function getNoTin() { - return $this->container['address']; + return $this->container['no_tin']; } /** - * Sets address + * Sets no_tin * - * @param string|null $address Address + * @param bool|null $no_tin No TIN indicator * * @return self */ - public function setAddress($address) + public function setNoTin($no_tin) { - $this->container['address'] = $address; + $this->container['no_tin'] = $no_tin; return $this; } /** - * Gets address2 + * Gets address_verification * - * @return string|null + * @return bool|null */ - public function getAddress2() + public function getAddressVerification() { - return $this->container['address2']; + return $this->container['address_verification']; } /** - * Sets address2 + * Sets address_verification * - * @param string|null $address2 Address line 2 + * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form * * @return self */ - public function setAddress2($address2) + public function setAddressVerification($address_verification) { - $this->container['address2'] = $address2; + $this->container['address_verification'] = $address_verification; return $this; } /** - * Gets city + * Gets state_and_local_withholding * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null */ - public function getCity() + public function getStateAndLocalWithholding() { - return $this->container['city']; + return $this->container['state_and_local_withholding']; } /** - * Sets city + * Sets state_and_local_withholding * - * @param string|null $city City + * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding State and local withholding information * * @return self */ - public function setCity($city) + public function setStateAndLocalWithholding($state_and_local_withholding) { - $this->container['city'] = $city; + $this->container['state_and_local_withholding'] = $state_and_local_withholding; return $this; } /** - * Gets state + * Gets second_tin_notice * - * @return string|null + * @return bool|null */ - public function getState() + public function getSecondTinNotice() { - return $this->container['state']; + return $this->container['second_tin_notice']; } /** - * Sets state + * Sets second_tin_notice * - * @param string|null $state US state + * @param bool|null $second_tin_notice Second TIN notice * * @return self */ - public function setState($state) + public function setSecondTinNotice($second_tin_notice) { - $this->container['state'] = $state; + $this->container['second_tin_notice'] = $second_tin_notice; return $this; } /** - * Gets zip + * Gets federal_efile_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getZip() + public function getFederalEfileStatus() { - return $this->container['zip']; + return $this->container['federal_efile_status']; } /** - * Sets zip + * Sets federal_efile_status * - * @param string|null $zip Zip/postal code + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status Federal e-file status * * @return self */ - public function setZip($zip) + public function setFederalEfileStatus($federal_efile_status) { - $this->container['zip'] = $zip; + $this->container['federal_efile_status'] = $federal_efile_status; return $this; } /** - * Gets non_us_province + * Gets state_efile_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null */ - public function getNonUsProvince() + public function getStateEfileStatus() { - return $this->container['non_us_province']; + return $this->container['state_efile_status']; } /** - * Sets non_us_province + * Sets state_efile_status * - * @param string|null $non_us_province Foreign province + * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status State e-file status * * @return self */ - public function setNonUsProvince($non_us_province) + public function setStateEfileStatus($state_efile_status) { - $this->container['non_us_province'] = $non_us_province; + + + $this->container['state_efile_status'] = $state_efile_status; return $this; } /** - * Gets country_code + * Gets postal_mail_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getCountryCode() + public function getPostalMailStatus() { - return $this->container['country_code']; + return $this->container['postal_mail_status']; } /** - * Sets country_code + * Sets postal_mail_status * - * @param string|null $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status Postal mail to recipient status * * @return self */ - public function setCountryCode($country_code) + public function setPostalMailStatus($postal_mail_status) { - $this->container['country_code'] = $country_code; + $this->container['postal_mail_status'] = $postal_mail_status; return $this; } /** - * Gets account_number + * Gets tin_match_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getAccountNumber() + public function getTinMatchStatus() { - return $this->container['account_number']; + return $this->container['tin_match_status']; } /** - * Sets account_number + * Sets tin_match_status * - * @param string|null $account_number Account Number + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status TIN Match status * * @return self */ - public function setAccountNumber($account_number) + public function setTinMatchStatus($tin_match_status) { - $this->container['account_number'] = $account_number; + $this->container['tin_match_status'] = $tin_match_status; return $this; } /** - * Gets office_code + * Gets address_verification_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getOfficeCode() + public function getAddressVerificationStatus() { - return $this->container['office_code']; + return $this->container['address_verification_status']; } /** - * Sets office_code + * Sets address_verification_status * - * @param string|null $office_code Office Code + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status Address verification status * * @return self */ - public function setOfficeCode($office_code) + public function setAddressVerificationStatus($address_verification_status) { - $this->container['office_code'] = $office_code; + $this->container['address_verification_status'] = $address_verification_status; + + return $this; + } + + /** + * Gets e_delivery_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getEDeliveryStatus() + { + return $this->container['e_delivery_status']; + } + + /** + * Sets e_delivery_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $e_delivery_status EDelivery status + * + * @return self + */ + public function setEDeliveryStatus($e_delivery_status) + { + $this->container['e_delivery_status'] = $e_delivery_status; return $this; } @@ -1872,7 +1988,7 @@ public function setOfficeCode($office_code) /** * Gets validation_errors * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null + * @return \Avalara\SDK\Model\A1099\V2\ValidationError[]|null */ public function getValidationErrors() { @@ -1882,7 +1998,7 @@ public function getValidationErrors() /** * Sets validation_errors * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors Validation errors + * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors Validation errors * * @return self */ @@ -1908,7 +2024,7 @@ public function getCreatedAt() /** * Sets created_at * - * @param \DateTime|null $created_at Creation time + * @param \DateTime|null $created_at Date time when the record was created. * * @return self */ @@ -1932,7 +2048,7 @@ public function getUpdatedAt() /** * Sets updated_at * - * @param \DateTime|null $updated_at Update time + * @param \DateTime|null $updated_at Date time when the record was last updated. * * @return self */ @@ -1942,30 +2058,6 @@ public function setUpdatedAt($updated_at) return $this; } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/Form1099DivList.php b/lib/Model/A1099/V2/Form1099DivList.php deleted file mode 100644 index 77867fe..0000000 --- a/lib/Model/A1099/V2/Form1099DivList.php +++ /dev/null @@ -1,364 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099DivList Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099DivList implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099DivList'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'forms' => '\Avalara\SDK\Model\A1099\V2\Form1099DivListItem[]', - 'form_type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'forms' => null, - 'form_type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'forms' => 'forms', - 'form_type' => 'formType' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'forms' => 'setForms', - 'form_type' => 'setFormType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'forms' => 'getForms', - 'form_type' => 'getFormType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['forms'] = $data['forms'] ?? null; - $this->container['form_type'] = $data['form_type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets forms - * - * @return \Avalara\SDK\Model\A1099\V2\Form1099DivListItem[]|null - */ - public function getForms() - { - return $this->container['forms']; - } - - /** - * Sets forms - * - * @param \Avalara\SDK\Model\A1099\V2\Form1099DivListItem[]|null $forms forms - * - * @return self - */ - public function setForms($forms) - { - - - $this->container['forms'] = $forms; - - return $this; - } - - /** - * Gets form_type - * - * @return string|null - */ - public function getFormType() - { - return $this->container['form_type']; - } - - /** - * Sets form_type - * - * @param string|null $form_type form_type - * - * @return self - */ - public function setFormType($form_type) - { - $this->container['form_type'] = $form_type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099DivListItem.php b/lib/Model/A1099/V2/Form1099DivListItem.php deleted file mode 100644 index f2b6eea..0000000 --- a/lib/Model/A1099/V2/Form1099DivListItem.php +++ /dev/null @@ -1,1759 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099DivListItem Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099DivListItem implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099DivListItem'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'total_ordinary_dividends' => 'string', - 'qualified_dividends' => 'string', - 'total_capital_gain_distributions' => 'string', - 'unrecaptured_section1250_gain' => 'string', - 'section1202_gain' => 'string', - 'collectibles_gain' => 'string', - 'section897_ordinary_dividends' => 'string', - 'section897_capital_gain' => 'string', - 'nondividend_distributions' => 'string', - 'federal_income_tax_withheld' => 'string', - 'section199_a_dividends' => 'string', - 'investment_expenses' => 'string', - 'foreign_tax_paid' => 'string', - 'foreign_country_or_us_possession' => 'string', - 'cash_liquidation_distributions' => 'string', - 'noncash_liquidation_distributions' => 'string', - 'exempt_interest_dividends' => 'string', - 'specified_private_activity_bond_interest_dividends' => 'string', - 'fatca_filing_requirement' => 'bool', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'total_ordinary_dividends' => null, - 'qualified_dividends' => null, - 'total_capital_gain_distributions' => null, - 'unrecaptured_section1250_gain' => null, - 'section1202_gain' => null, - 'collectibles_gain' => null, - 'section897_ordinary_dividends' => null, - 'section897_capital_gain' => null, - 'nondividend_distributions' => null, - 'federal_income_tax_withheld' => null, - 'section199_a_dividends' => null, - 'investment_expenses' => null, - 'foreign_tax_paid' => null, - 'foreign_country_or_us_possession' => null, - 'cash_liquidation_distributions' => null, - 'noncash_liquidation_distributions' => null, - 'exempt_interest_dividends' => null, - 'specified_private_activity_bond_interest_dividends' => null, - 'fatca_filing_requirement' => null, - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'total_ordinary_dividends' => 'totalOrdinaryDividends', - 'qualified_dividends' => 'qualifiedDividends', - 'total_capital_gain_distributions' => 'totalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'unrecapturedSection1250Gain', - 'section1202_gain' => 'section1202Gain', - 'collectibles_gain' => 'collectiblesGain', - 'section897_ordinary_dividends' => 'section897OrdinaryDividends', - 'section897_capital_gain' => 'section897CapitalGain', - 'nondividend_distributions' => 'nondividendDistributions', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'section199_a_dividends' => 'section199ADividends', - 'investment_expenses' => 'investmentExpenses', - 'foreign_tax_paid' => 'foreignTaxPaid', - 'foreign_country_or_us_possession' => 'foreignCountryOrUSPossession', - 'cash_liquidation_distributions' => 'cashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'noncashLiquidationDistributions', - 'exempt_interest_dividends' => 'exemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'specifiedPrivateActivityBondInterestDividends', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'total_ordinary_dividends' => 'setTotalOrdinaryDividends', - 'qualified_dividends' => 'setQualifiedDividends', - 'total_capital_gain_distributions' => 'setTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'setUnrecapturedSection1250Gain', - 'section1202_gain' => 'setSection1202Gain', - 'collectibles_gain' => 'setCollectiblesGain', - 'section897_ordinary_dividends' => 'setSection897OrdinaryDividends', - 'section897_capital_gain' => 'setSection897CapitalGain', - 'nondividend_distributions' => 'setNondividendDistributions', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'section199_a_dividends' => 'setSection199ADividends', - 'investment_expenses' => 'setInvestmentExpenses', - 'foreign_tax_paid' => 'setForeignTaxPaid', - 'foreign_country_or_us_possession' => 'setForeignCountryOrUsPossession', - 'cash_liquidation_distributions' => 'setCashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'setNoncashLiquidationDistributions', - 'exempt_interest_dividends' => 'setExemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'setSpecifiedPrivateActivityBondInterestDividends', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'total_ordinary_dividends' => 'getTotalOrdinaryDividends', - 'qualified_dividends' => 'getQualifiedDividends', - 'total_capital_gain_distributions' => 'getTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'getUnrecapturedSection1250Gain', - 'section1202_gain' => 'getSection1202Gain', - 'collectibles_gain' => 'getCollectiblesGain', - 'section897_ordinary_dividends' => 'getSection897OrdinaryDividends', - 'section897_capital_gain' => 'getSection897CapitalGain', - 'nondividend_distributions' => 'getNondividendDistributions', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'section199_a_dividends' => 'getSection199ADividends', - 'investment_expenses' => 'getInvestmentExpenses', - 'foreign_tax_paid' => 'getForeignTaxPaid', - 'foreign_country_or_us_possession' => 'getForeignCountryOrUsPossession', - 'cash_liquidation_distributions' => 'getCashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'getNoncashLiquidationDistributions', - 'exempt_interest_dividends' => 'getExemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'getSpecifiedPrivateActivityBondInterestDividends', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['total_ordinary_dividends'] = $data['total_ordinary_dividends'] ?? null; - $this->container['qualified_dividends'] = $data['qualified_dividends'] ?? null; - $this->container['total_capital_gain_distributions'] = $data['total_capital_gain_distributions'] ?? null; - $this->container['unrecaptured_section1250_gain'] = $data['unrecaptured_section1250_gain'] ?? null; - $this->container['section1202_gain'] = $data['section1202_gain'] ?? null; - $this->container['collectibles_gain'] = $data['collectibles_gain'] ?? null; - $this->container['section897_ordinary_dividends'] = $data['section897_ordinary_dividends'] ?? null; - $this->container['section897_capital_gain'] = $data['section897_capital_gain'] ?? null; - $this->container['nondividend_distributions'] = $data['nondividend_distributions'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['section199_a_dividends'] = $data['section199_a_dividends'] ?? null; - $this->container['investment_expenses'] = $data['investment_expenses'] ?? null; - $this->container['foreign_tax_paid'] = $data['foreign_tax_paid'] ?? null; - $this->container['foreign_country_or_us_possession'] = $data['foreign_country_or_us_possession'] ?? null; - $this->container['cash_liquidation_distributions'] = $data['cash_liquidation_distributions'] ?? null; - $this->container['noncash_liquidation_distributions'] = $data['noncash_liquidation_distributions'] ?? null; - $this->container['exempt_interest_dividends'] = $data['exempt_interest_dividends'] ?? null; - $this->container['specified_private_activity_bond_interest_dividends'] = $data['specified_private_activity_bond_interest_dividends'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['tax_year'] === null) { - $invalidProperties[] = "'tax_year' can't be null"; - } - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets total_ordinary_dividends - * - * @return string|null - */ - public function getTotalOrdinaryDividends() - { - return $this->container['total_ordinary_dividends']; - } - - /** - * Sets total_ordinary_dividends - * - * @param string|null $total_ordinary_dividends Total ordinary dividends - * - * @return self - */ - public function setTotalOrdinaryDividends($total_ordinary_dividends) - { - $this->container['total_ordinary_dividends'] = $total_ordinary_dividends; - - return $this; - } - - /** - * Gets qualified_dividends - * - * @return string|null - */ - public function getQualifiedDividends() - { - return $this->container['qualified_dividends']; - } - - /** - * Sets qualified_dividends - * - * @param string|null $qualified_dividends Qualified dividends - * - * @return self - */ - public function setQualifiedDividends($qualified_dividends) - { - $this->container['qualified_dividends'] = $qualified_dividends; - - return $this; - } - - /** - * Gets total_capital_gain_distributions - * - * @return string|null - */ - public function getTotalCapitalGainDistributions() - { - return $this->container['total_capital_gain_distributions']; - } - - /** - * Sets total_capital_gain_distributions - * - * @param string|null $total_capital_gain_distributions Total capital gain distributions - * - * @return self - */ - public function setTotalCapitalGainDistributions($total_capital_gain_distributions) - { - $this->container['total_capital_gain_distributions'] = $total_capital_gain_distributions; - - return $this; - } - - /** - * Gets unrecaptured_section1250_gain - * - * @return string|null - */ - public function getUnrecapturedSection1250Gain() - { - return $this->container['unrecaptured_section1250_gain']; - } - - /** - * Sets unrecaptured_section1250_gain - * - * @param string|null $unrecaptured_section1250_gain Unrecaptured Section 1250 gain - * - * @return self - */ - public function setUnrecapturedSection1250Gain($unrecaptured_section1250_gain) - { - $this->container['unrecaptured_section1250_gain'] = $unrecaptured_section1250_gain; - - return $this; - } - - /** - * Gets section1202_gain - * - * @return string|null - */ - public function getSection1202Gain() - { - return $this->container['section1202_gain']; - } - - /** - * Sets section1202_gain - * - * @param string|null $section1202_gain Section 1202 gain - * - * @return self - */ - public function setSection1202Gain($section1202_gain) - { - $this->container['section1202_gain'] = $section1202_gain; - - return $this; - } - - /** - * Gets collectibles_gain - * - * @return string|null - */ - public function getCollectiblesGain() - { - return $this->container['collectibles_gain']; - } - - /** - * Sets collectibles_gain - * - * @param string|null $collectibles_gain Collectibles (28%) gain - * - * @return self - */ - public function setCollectiblesGain($collectibles_gain) - { - $this->container['collectibles_gain'] = $collectibles_gain; - - return $this; - } - - /** - * Gets section897_ordinary_dividends - * - * @return string|null - */ - public function getSection897OrdinaryDividends() - { - return $this->container['section897_ordinary_dividends']; - } - - /** - * Sets section897_ordinary_dividends - * - * @param string|null $section897_ordinary_dividends Section 897 ordinary dividends - * - * @return self - */ - public function setSection897OrdinaryDividends($section897_ordinary_dividends) - { - $this->container['section897_ordinary_dividends'] = $section897_ordinary_dividends; - - return $this; - } - - /** - * Gets section897_capital_gain - * - * @return string|null - */ - public function getSection897CapitalGain() - { - return $this->container['section897_capital_gain']; - } - - /** - * Sets section897_capital_gain - * - * @param string|null $section897_capital_gain Section 897 capital gain - * - * @return self - */ - public function setSection897CapitalGain($section897_capital_gain) - { - $this->container['section897_capital_gain'] = $section897_capital_gain; - - return $this; - } - - /** - * Gets nondividend_distributions - * - * @return string|null - */ - public function getNondividendDistributions() - { - return $this->container['nondividend_distributions']; - } - - /** - * Sets nondividend_distributions - * - * @param string|null $nondividend_distributions Nondividend distributions - * - * @return self - */ - public function setNondividendDistributions($nondividend_distributions) - { - $this->container['nondividend_distributions'] = $nondividend_distributions; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return string|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param string|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets section199_a_dividends - * - * @return string|null - */ - public function getSection199ADividends() - { - return $this->container['section199_a_dividends']; - } - - /** - * Sets section199_a_dividends - * - * @param string|null $section199_a_dividends Section 199A dividends - * - * @return self - */ - public function setSection199ADividends($section199_a_dividends) - { - $this->container['section199_a_dividends'] = $section199_a_dividends; - - return $this; - } - - /** - * Gets investment_expenses - * - * @return string|null - */ - public function getInvestmentExpenses() - { - return $this->container['investment_expenses']; - } - - /** - * Sets investment_expenses - * - * @param string|null $investment_expenses Investment expenses - * - * @return self - */ - public function setInvestmentExpenses($investment_expenses) - { - $this->container['investment_expenses'] = $investment_expenses; - - return $this; - } - - /** - * Gets foreign_tax_paid - * - * @return string|null - */ - public function getForeignTaxPaid() - { - return $this->container['foreign_tax_paid']; - } - - /** - * Sets foreign_tax_paid - * - * @param string|null $foreign_tax_paid Foreign tax paid - * - * @return self - */ - public function setForeignTaxPaid($foreign_tax_paid) - { - $this->container['foreign_tax_paid'] = $foreign_tax_paid; - - return $this; - } - - /** - * Gets foreign_country_or_us_possession - * - * @return string|null - */ - public function getForeignCountryOrUsPossession() - { - return $this->container['foreign_country_or_us_possession']; - } - - /** - * Sets foreign_country_or_us_possession - * - * @param string|null $foreign_country_or_us_possession Foreign country or U.S. possession - * - * @return self - */ - public function setForeignCountryOrUsPossession($foreign_country_or_us_possession) - { - $this->container['foreign_country_or_us_possession'] = $foreign_country_or_us_possession; - - return $this; - } - - /** - * Gets cash_liquidation_distributions - * - * @return string|null - */ - public function getCashLiquidationDistributions() - { - return $this->container['cash_liquidation_distributions']; - } - - /** - * Sets cash_liquidation_distributions - * - * @param string|null $cash_liquidation_distributions Cash liquidation distributions - * - * @return self - */ - public function setCashLiquidationDistributions($cash_liquidation_distributions) - { - $this->container['cash_liquidation_distributions'] = $cash_liquidation_distributions; - - return $this; - } - - /** - * Gets noncash_liquidation_distributions - * - * @return string|null - */ - public function getNoncashLiquidationDistributions() - { - return $this->container['noncash_liquidation_distributions']; - } - - /** - * Sets noncash_liquidation_distributions - * - * @param string|null $noncash_liquidation_distributions Noncash liquidation distributions - * - * @return self - */ - public function setNoncashLiquidationDistributions($noncash_liquidation_distributions) - { - $this->container['noncash_liquidation_distributions'] = $noncash_liquidation_distributions; - - return $this; - } - - /** - * Gets exempt_interest_dividends - * - * @return string|null - */ - public function getExemptInterestDividends() - { - return $this->container['exempt_interest_dividends']; - } - - /** - * Sets exempt_interest_dividends - * - * @param string|null $exempt_interest_dividends Exempt-interest dividends - * - * @return self - */ - public function setExemptInterestDividends($exempt_interest_dividends) - { - $this->container['exempt_interest_dividends'] = $exempt_interest_dividends; - - return $this; - } - - /** - * Gets specified_private_activity_bond_interest_dividends - * - * @return string|null - */ - public function getSpecifiedPrivateActivityBondInterestDividends() - { - return $this->container['specified_private_activity_bond_interest_dividends']; - } - - /** - * Sets specified_private_activity_bond_interest_dividends - * - * @param string|null $specified_private_activity_bond_interest_dividends Specified private activity bond interest dividends - * - * @return self - */ - public function setSpecifiedPrivateActivityBondInterestDividends($specified_private_activity_bond_interest_dividends) - { - $this->container['specified_private_activity_bond_interest_dividends'] = $specified_private_activity_bond_interest_dividends; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1099DivListItem., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1099DivListItem., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1099DivListItem., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099DivRequest.php b/lib/Model/A1099/V2/Form1099DivRequest.php deleted file mode 100644 index ad05970..0000000 --- a/lib/Model/A1099/V2/Form1099DivRequest.php +++ /dev/null @@ -1,1742 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099DivRequest Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099DivRequest implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099DivRequest'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'total_ordinary_dividends' => 'string', - 'qualified_dividends' => 'string', - 'total_capital_gain_distributions' => 'string', - 'unrecaptured_section1250_gain' => 'string', - 'section1202_gain' => 'string', - 'collectibles_gain' => 'string', - 'section897_ordinary_dividends' => 'string', - 'section897_capital_gain' => 'string', - 'nondividend_distributions' => 'string', - 'federal_income_tax_withheld' => 'string', - 'section199_a_dividends' => 'string', - 'investment_expenses' => 'string', - 'foreign_tax_paid' => 'string', - 'foreign_country_or_us_possession' => 'string', - 'cash_liquidation_distributions' => 'string', - 'noncash_liquidation_distributions' => 'string', - 'exempt_interest_dividends' => 'string', - 'specified_private_activity_bond_interest_dividends' => 'string', - 'fatca_filing_requirement' => 'bool', - 'type' => 'string', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'total_ordinary_dividends' => null, - 'qualified_dividends' => null, - 'total_capital_gain_distributions' => null, - 'unrecaptured_section1250_gain' => null, - 'section1202_gain' => null, - 'collectibles_gain' => null, - 'section897_ordinary_dividends' => null, - 'section897_capital_gain' => null, - 'nondividend_distributions' => null, - 'federal_income_tax_withheld' => null, - 'section199_a_dividends' => null, - 'investment_expenses' => null, - 'foreign_tax_paid' => null, - 'foreign_country_or_us_possession' => null, - 'cash_liquidation_distributions' => null, - 'noncash_liquidation_distributions' => null, - 'exempt_interest_dividends' => null, - 'specified_private_activity_bond_interest_dividends' => null, - 'fatca_filing_requirement' => null, - 'type' => null, - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'total_ordinary_dividends' => 'totalOrdinaryDividends', - 'qualified_dividends' => 'qualifiedDividends', - 'total_capital_gain_distributions' => 'totalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'unrecapturedSection1250Gain', - 'section1202_gain' => 'section1202Gain', - 'collectibles_gain' => 'collectiblesGain', - 'section897_ordinary_dividends' => 'section897OrdinaryDividends', - 'section897_capital_gain' => 'section897CapitalGain', - 'nondividend_distributions' => 'nondividendDistributions', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'section199_a_dividends' => 'section199ADividends', - 'investment_expenses' => 'investmentExpenses', - 'foreign_tax_paid' => 'foreignTaxPaid', - 'foreign_country_or_us_possession' => 'foreignCountryOrUSPossession', - 'cash_liquidation_distributions' => 'cashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'noncashLiquidationDistributions', - 'exempt_interest_dividends' => 'exemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'specifiedPrivateActivityBondInterestDividends', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'total_ordinary_dividends' => 'setTotalOrdinaryDividends', - 'qualified_dividends' => 'setQualifiedDividends', - 'total_capital_gain_distributions' => 'setTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'setUnrecapturedSection1250Gain', - 'section1202_gain' => 'setSection1202Gain', - 'collectibles_gain' => 'setCollectiblesGain', - 'section897_ordinary_dividends' => 'setSection897OrdinaryDividends', - 'section897_capital_gain' => 'setSection897CapitalGain', - 'nondividend_distributions' => 'setNondividendDistributions', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'section199_a_dividends' => 'setSection199ADividends', - 'investment_expenses' => 'setInvestmentExpenses', - 'foreign_tax_paid' => 'setForeignTaxPaid', - 'foreign_country_or_us_possession' => 'setForeignCountryOrUsPossession', - 'cash_liquidation_distributions' => 'setCashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'setNoncashLiquidationDistributions', - 'exempt_interest_dividends' => 'setExemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'setSpecifiedPrivateActivityBondInterestDividends', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'total_ordinary_dividends' => 'getTotalOrdinaryDividends', - 'qualified_dividends' => 'getQualifiedDividends', - 'total_capital_gain_distributions' => 'getTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'getUnrecapturedSection1250Gain', - 'section1202_gain' => 'getSection1202Gain', - 'collectibles_gain' => 'getCollectiblesGain', - 'section897_ordinary_dividends' => 'getSection897OrdinaryDividends', - 'section897_capital_gain' => 'getSection897CapitalGain', - 'nondividend_distributions' => 'getNondividendDistributions', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'section199_a_dividends' => 'getSection199ADividends', - 'investment_expenses' => 'getInvestmentExpenses', - 'foreign_tax_paid' => 'getForeignTaxPaid', - 'foreign_country_or_us_possession' => 'getForeignCountryOrUsPossession', - 'cash_liquidation_distributions' => 'getCashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'getNoncashLiquidationDistributions', - 'exempt_interest_dividends' => 'getExemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'getSpecifiedPrivateActivityBondInterestDividends', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['total_ordinary_dividends'] = $data['total_ordinary_dividends'] ?? null; - $this->container['qualified_dividends'] = $data['qualified_dividends'] ?? null; - $this->container['total_capital_gain_distributions'] = $data['total_capital_gain_distributions'] ?? null; - $this->container['unrecaptured_section1250_gain'] = $data['unrecaptured_section1250_gain'] ?? null; - $this->container['section1202_gain'] = $data['section1202_gain'] ?? null; - $this->container['collectibles_gain'] = $data['collectibles_gain'] ?? null; - $this->container['section897_ordinary_dividends'] = $data['section897_ordinary_dividends'] ?? null; - $this->container['section897_capital_gain'] = $data['section897_capital_gain'] ?? null; - $this->container['nondividend_distributions'] = $data['nondividend_distributions'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['section199_a_dividends'] = $data['section199_a_dividends'] ?? null; - $this->container['investment_expenses'] = $data['investment_expenses'] ?? null; - $this->container['foreign_tax_paid'] = $data['foreign_tax_paid'] ?? null; - $this->container['foreign_country_or_us_possession'] = $data['foreign_country_or_us_possession'] ?? null; - $this->container['cash_liquidation_distributions'] = $data['cash_liquidation_distributions'] ?? null; - $this->container['noncash_liquidation_distributions'] = $data['noncash_liquidation_distributions'] ?? null; - $this->container['exempt_interest_dividends'] = $data['exempt_interest_dividends'] ?? null; - $this->container['specified_private_activity_bond_interest_dividends'] = $data['specified_private_activity_bond_interest_dividends'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets total_ordinary_dividends - * - * @return string|null - */ - public function getTotalOrdinaryDividends() - { - return $this->container['total_ordinary_dividends']; - } - - /** - * Sets total_ordinary_dividends - * - * @param string|null $total_ordinary_dividends Total ordinary dividends - * - * @return self - */ - public function setTotalOrdinaryDividends($total_ordinary_dividends) - { - $this->container['total_ordinary_dividends'] = $total_ordinary_dividends; - - return $this; - } - - /** - * Gets qualified_dividends - * - * @return string|null - */ - public function getQualifiedDividends() - { - return $this->container['qualified_dividends']; - } - - /** - * Sets qualified_dividends - * - * @param string|null $qualified_dividends Qualified dividends - * - * @return self - */ - public function setQualifiedDividends($qualified_dividends) - { - $this->container['qualified_dividends'] = $qualified_dividends; - - return $this; - } - - /** - * Gets total_capital_gain_distributions - * - * @return string|null - */ - public function getTotalCapitalGainDistributions() - { - return $this->container['total_capital_gain_distributions']; - } - - /** - * Sets total_capital_gain_distributions - * - * @param string|null $total_capital_gain_distributions Total capital gain distributions - * - * @return self - */ - public function setTotalCapitalGainDistributions($total_capital_gain_distributions) - { - $this->container['total_capital_gain_distributions'] = $total_capital_gain_distributions; - - return $this; - } - - /** - * Gets unrecaptured_section1250_gain - * - * @return string|null - */ - public function getUnrecapturedSection1250Gain() - { - return $this->container['unrecaptured_section1250_gain']; - } - - /** - * Sets unrecaptured_section1250_gain - * - * @param string|null $unrecaptured_section1250_gain Unrecaptured Section 1250 gain - * - * @return self - */ - public function setUnrecapturedSection1250Gain($unrecaptured_section1250_gain) - { - $this->container['unrecaptured_section1250_gain'] = $unrecaptured_section1250_gain; - - return $this; - } - - /** - * Gets section1202_gain - * - * @return string|null - */ - public function getSection1202Gain() - { - return $this->container['section1202_gain']; - } - - /** - * Sets section1202_gain - * - * @param string|null $section1202_gain Section 1202 gain - * - * @return self - */ - public function setSection1202Gain($section1202_gain) - { - $this->container['section1202_gain'] = $section1202_gain; - - return $this; - } - - /** - * Gets collectibles_gain - * - * @return string|null - */ - public function getCollectiblesGain() - { - return $this->container['collectibles_gain']; - } - - /** - * Sets collectibles_gain - * - * @param string|null $collectibles_gain Collectibles (28%) gain - * - * @return self - */ - public function setCollectiblesGain($collectibles_gain) - { - $this->container['collectibles_gain'] = $collectibles_gain; - - return $this; - } - - /** - * Gets section897_ordinary_dividends - * - * @return string|null - */ - public function getSection897OrdinaryDividends() - { - return $this->container['section897_ordinary_dividends']; - } - - /** - * Sets section897_ordinary_dividends - * - * @param string|null $section897_ordinary_dividends Section 897 ordinary dividends - * - * @return self - */ - public function setSection897OrdinaryDividends($section897_ordinary_dividends) - { - $this->container['section897_ordinary_dividends'] = $section897_ordinary_dividends; - - return $this; - } - - /** - * Gets section897_capital_gain - * - * @return string|null - */ - public function getSection897CapitalGain() - { - return $this->container['section897_capital_gain']; - } - - /** - * Sets section897_capital_gain - * - * @param string|null $section897_capital_gain Section 897 capital gain - * - * @return self - */ - public function setSection897CapitalGain($section897_capital_gain) - { - $this->container['section897_capital_gain'] = $section897_capital_gain; - - return $this; - } - - /** - * Gets nondividend_distributions - * - * @return string|null - */ - public function getNondividendDistributions() - { - return $this->container['nondividend_distributions']; - } - - /** - * Sets nondividend_distributions - * - * @param string|null $nondividend_distributions Nondividend distributions - * - * @return self - */ - public function setNondividendDistributions($nondividend_distributions) - { - $this->container['nondividend_distributions'] = $nondividend_distributions; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return string|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param string|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets section199_a_dividends - * - * @return string|null - */ - public function getSection199ADividends() - { - return $this->container['section199_a_dividends']; - } - - /** - * Sets section199_a_dividends - * - * @param string|null $section199_a_dividends Section 199A dividends - * - * @return self - */ - public function setSection199ADividends($section199_a_dividends) - { - $this->container['section199_a_dividends'] = $section199_a_dividends; - - return $this; - } - - /** - * Gets investment_expenses - * - * @return string|null - */ - public function getInvestmentExpenses() - { - return $this->container['investment_expenses']; - } - - /** - * Sets investment_expenses - * - * @param string|null $investment_expenses Investment expenses - * - * @return self - */ - public function setInvestmentExpenses($investment_expenses) - { - $this->container['investment_expenses'] = $investment_expenses; - - return $this; - } - - /** - * Gets foreign_tax_paid - * - * @return string|null - */ - public function getForeignTaxPaid() - { - return $this->container['foreign_tax_paid']; - } - - /** - * Sets foreign_tax_paid - * - * @param string|null $foreign_tax_paid Foreign tax paid - * - * @return self - */ - public function setForeignTaxPaid($foreign_tax_paid) - { - $this->container['foreign_tax_paid'] = $foreign_tax_paid; - - return $this; - } - - /** - * Gets foreign_country_or_us_possession - * - * @return string|null - */ - public function getForeignCountryOrUsPossession() - { - return $this->container['foreign_country_or_us_possession']; - } - - /** - * Sets foreign_country_or_us_possession - * - * @param string|null $foreign_country_or_us_possession Foreign country or U.S. possession - * - * @return self - */ - public function setForeignCountryOrUsPossession($foreign_country_or_us_possession) - { - $this->container['foreign_country_or_us_possession'] = $foreign_country_or_us_possession; - - return $this; - } - - /** - * Gets cash_liquidation_distributions - * - * @return string|null - */ - public function getCashLiquidationDistributions() - { - return $this->container['cash_liquidation_distributions']; - } - - /** - * Sets cash_liquidation_distributions - * - * @param string|null $cash_liquidation_distributions Cash liquidation distributions - * - * @return self - */ - public function setCashLiquidationDistributions($cash_liquidation_distributions) - { - $this->container['cash_liquidation_distributions'] = $cash_liquidation_distributions; - - return $this; - } - - /** - * Gets noncash_liquidation_distributions - * - * @return string|null - */ - public function getNoncashLiquidationDistributions() - { - return $this->container['noncash_liquidation_distributions']; - } - - /** - * Sets noncash_liquidation_distributions - * - * @param string|null $noncash_liquidation_distributions Noncash liquidation distributions - * - * @return self - */ - public function setNoncashLiquidationDistributions($noncash_liquidation_distributions) - { - $this->container['noncash_liquidation_distributions'] = $noncash_liquidation_distributions; - - return $this; - } - - /** - * Gets exempt_interest_dividends - * - * @return string|null - */ - public function getExemptInterestDividends() - { - return $this->container['exempt_interest_dividends']; - } - - /** - * Sets exempt_interest_dividends - * - * @param string|null $exempt_interest_dividends Exempt-interest dividends - * - * @return self - */ - public function setExemptInterestDividends($exempt_interest_dividends) - { - $this->container['exempt_interest_dividends'] = $exempt_interest_dividends; - - return $this; - } - - /** - * Gets specified_private_activity_bond_interest_dividends - * - * @return string|null - */ - public function getSpecifiedPrivateActivityBondInterestDividends() - { - return $this->container['specified_private_activity_bond_interest_dividends']; - } - - /** - * Sets specified_private_activity_bond_interest_dividends - * - * @param string|null $specified_private_activity_bond_interest_dividends Specified private activity bond interest dividends - * - * @return self - */ - public function setSpecifiedPrivateActivityBondInterestDividends($specified_private_activity_bond_interest_dividends) - { - $this->container['specified_private_activity_bond_interest_dividends'] = $specified_private_activity_bond_interest_dividends; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1099DivRequest., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1099DivRequest., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1099DivRequest., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099DivResponse.php b/lib/Model/A1099/V2/Form1099DivResponse.php deleted file mode 100644 index 51587d0..0000000 --- a/lib/Model/A1099/V2/Form1099DivResponse.php +++ /dev/null @@ -1,1530 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099DivResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099DivResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099DivResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'type' => 'string', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse', - 'tin_type' => 'string', - 'id' => 'string', - 'issuer_id' => 'string', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'reference_id' => 'string', - 'recipient_name' => 'string', - 'recipient_tin' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'type' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null, - 'tin_type' => null, - 'id' => null, - 'issuer_id' => null, - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'reference_id' => null, - 'recipient_name' => null, - 'recipient_tin' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'federal_efile_status' => null, - 'e_delivery_status' => null, - 'state_efile_status' => null, - 'postal_mail_status' => null, - 'tin_match_status' => null, - 'address_verification_status' => null, - 'validation_errors' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'tin_type' => 'tinType', - 'id' => 'id', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'reference_id' => 'referenceId', - 'recipient_name' => 'recipientName', - 'recipient_tin' => 'recipientTin', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'federal_efile_status' => 'federalEfileStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification_status' => 'addressVerificationStatus', - 'validation_errors' => 'validationErrors' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'tin_type' => 'setTinType', - 'id' => 'setId', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'reference_id' => 'setReferenceId', - 'recipient_name' => 'setRecipientName', - 'recipient_tin' => 'setRecipientTin', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'federal_efile_status' => 'setFederalEfileStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification_status' => 'setAddressVerificationStatus', - 'validation_errors' => 'setValidationErrors' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'tin_type' => 'getTinType', - 'id' => 'getId', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'reference_id' => 'getReferenceId', - 'recipient_name' => 'getRecipientName', - 'recipient_tin' => 'getRecipientTin', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'federal_efile_status' => 'getFederalEfileStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification_status' => 'getAddressVerificationStatus', - 'validation_errors' => 'getValidationErrors' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at created_at - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at updated_at - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type tin_type - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id issuer_id - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id issuer_reference_id - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin issuer_tin - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year tax_year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id reference_id - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name recipient_name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin recipient_tin - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name recipient_second_name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 address2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city city - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip zip - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email email - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number account_number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code office_code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province non_us_province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code country_code - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file federal_e_file - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail postal_mail - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file state_e_file - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match tin_match - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin no_tin - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice second_tin_notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification address_verification - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status federal_efile_status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status e_delivery_status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status state_efile_status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status postal_mail_status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status tin_match_status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status address_verification_status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors validation_errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099KResponse.php b/lib/Model/A1099/V2/Form1099Int.php similarity index 65% rename from lib/Model/A1099/V2/Form1099KResponse.php rename to lib/Model/A1099/V2/Form1099Int.php index a5b87cb..0f5bf2f 100644 --- a/lib/Model/A1099/V2/Form1099KResponse.php +++ b/lib/Model/A1099/V2/Form1099Int.php @@ -1,6 +1,6 @@ 'string', - 'payment_type' => 'string', - 'payment_settlement_entity_name_phone_number' => 'string', - 'gross_amount_payment_card' => 'float', - 'card_not_present_transactions' => 'float', - 'merchant_category_code' => 'string', - 'payment_transaction_number' => 'float', + 'interest_income' => 'float', + 'early_withdrawal_penalty' => 'float', + 'us_savings_bonds_interest' => 'float', 'federal_income_tax_withheld' => 'float', - 'january' => 'float', - 'february' => 'float', - 'march' => 'float', - 'april' => 'float', - 'may' => 'float', - 'june' => 'float', - 'july' => 'float', - 'august' => 'float', - 'sept' => 'float', - 'october' => 'float', - 'november' => 'float', - 'december' => 'float', + 'investment_expenses' => 'float', + 'foreign_tax_paid' => 'float', + 'foreign_country' => 'string', + 'tax_exempt_interest' => 'float', + 'specified_private_activity_bond_interest' => 'float', + 'market_discount' => 'float', + 'bond_premium' => 'float', + 'bond_premium_on_treasury_obligations' => 'float', + 'bond_premium_on_tax_exempt_bond' => 'float', + 'tax_exempt_bond_cusip_number' => 'string', + 'fatca_filing_requirement' => 'bool', 'type' => 'string', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse', - 'tin_type' => 'string', 'id' => 'string', 'issuer_id' => 'string', 'issuer_reference_id' => 'string', 'issuer_tin' => 'string', 'tax_year' => 'int', 'reference_id' => 'string', + 'tin' => 'string', 'recipient_name' => 'string', - 'recipient_tin' => 'string', + 'tin_type' => 'string', 'recipient_second_name' => 'string', 'address' => 'string', 'address2' => 'string', @@ -115,20 +107,24 @@ class Form1099KResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'office_code' => 'string', 'non_us_province' => 'string', 'country_code' => 'string', - 'federal_e_file' => 'bool', + 'federal_efile_date' => '\DateTime', 'postal_mail' => 'bool', - 'state_e_file' => 'bool', + 'state_efile_date' => '\DateTime', + 'recipient_edelivery_date' => '\DateTime', 'tin_match' => 'bool', 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', 'address_verification' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]' + 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding', + 'second_tin_notice' => 'bool', + 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', + 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationError[]', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime' ]; /** @@ -139,39 +135,31 @@ class Form1099KResponse implements ModelInterface, ArrayAccess, \JsonSerializabl * @psalm-var array */ protected static $openAPIFormats = [ - 'filer_type' => null, - 'payment_type' => null, - 'payment_settlement_entity_name_phone_number' => null, - 'gross_amount_payment_card' => 'double', - 'card_not_present_transactions' => 'double', - 'merchant_category_code' => null, - 'payment_transaction_number' => 'double', + 'interest_income' => 'double', + 'early_withdrawal_penalty' => 'double', + 'us_savings_bonds_interest' => 'double', 'federal_income_tax_withheld' => 'double', - 'january' => 'double', - 'february' => 'double', - 'march' => 'double', - 'april' => 'double', - 'may' => 'double', - 'june' => 'double', - 'july' => 'double', - 'august' => 'double', - 'sept' => 'double', - 'october' => 'double', - 'november' => 'double', - 'december' => 'double', + 'investment_expenses' => 'double', + 'foreign_tax_paid' => 'double', + 'foreign_country' => null, + 'tax_exempt_interest' => 'double', + 'specified_private_activity_bond_interest' => 'double', + 'market_discount' => 'double', + 'bond_premium' => 'double', + 'bond_premium_on_treasury_obligations' => 'double', + 'bond_premium_on_tax_exempt_bond' => 'double', + 'tax_exempt_bond_cusip_number' => null, + 'fatca_filing_requirement' => null, 'type' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null, - 'tin_type' => null, 'id' => null, 'issuer_id' => null, 'issuer_reference_id' => null, 'issuer_tin' => null, 'tax_year' => 'int32', 'reference_id' => null, + 'tin' => null, 'recipient_name' => null, - 'recipient_tin' => null, + 'tin_type' => null, 'recipient_second_name' => null, 'address' => null, 'address2' => null, @@ -183,20 +171,24 @@ class Form1099KResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'office_code' => null, 'non_us_province' => null, 'country_code' => null, - 'federal_e_file' => null, + 'federal_efile_date' => 'date', 'postal_mail' => null, - 'state_e_file' => null, + 'state_efile_date' => 'date', + 'recipient_edelivery_date' => 'date', 'tin_match' => null, 'no_tin' => null, - 'second_tin_notice' => null, 'address_verification' => null, + 'state_and_local_withholding' => null, + 'second_tin_notice' => null, 'federal_efile_status' => null, - 'e_delivery_status' => null, 'state_efile_status' => null, 'postal_mail_status' => null, 'tin_match_status' => null, 'address_verification_status' => null, - 'validation_errors' => null + 'e_delivery_status' => null, + 'validation_errors' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time' ]; /** @@ -226,39 +218,31 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'filer_type' => 'filerType', - 'payment_type' => 'paymentType', - 'payment_settlement_entity_name_phone_number' => 'paymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'grossAmountPaymentCard', - 'card_not_present_transactions' => 'cardNotPresentTransactions', - 'merchant_category_code' => 'merchantCategoryCode', - 'payment_transaction_number' => 'paymentTransactionNumber', + 'interest_income' => 'interestIncome', + 'early_withdrawal_penalty' => 'earlyWithdrawalPenalty', + 'us_savings_bonds_interest' => 'usSavingsBondsInterest', 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'january' => 'january', - 'february' => 'february', - 'march' => 'march', - 'april' => 'april', - 'may' => 'may', - 'june' => 'june', - 'july' => 'july', - 'august' => 'august', - 'sept' => 'sept', - 'october' => 'october', - 'november' => 'november', - 'december' => 'december', + 'investment_expenses' => 'investmentExpenses', + 'foreign_tax_paid' => 'foreignTaxPaid', + 'foreign_country' => 'foreignCountry', + 'tax_exempt_interest' => 'taxExemptInterest', + 'specified_private_activity_bond_interest' => 'specifiedPrivateActivityBondInterest', + 'market_discount' => 'marketDiscount', + 'bond_premium' => 'bondPremium', + 'bond_premium_on_treasury_obligations' => 'bondPremiumOnTreasuryObligations', + 'bond_premium_on_tax_exempt_bond' => 'bondPremiumOnTaxExemptBond', + 'tax_exempt_bond_cusip_number' => 'taxExemptBondCusipNumber', + 'fatca_filing_requirement' => 'fatcaFilingRequirement', 'type' => 'type', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'tin_type' => 'tinType', 'id' => 'id', 'issuer_id' => 'issuerId', 'issuer_reference_id' => 'issuerReferenceId', 'issuer_tin' => 'issuerTin', 'tax_year' => 'taxYear', 'reference_id' => 'referenceId', + 'tin' => 'tin', 'recipient_name' => 'recipientName', - 'recipient_tin' => 'recipientTin', + 'tin_type' => 'tinType', 'recipient_second_name' => 'recipientSecondName', 'address' => 'address', 'address2' => 'address2', @@ -270,20 +254,24 @@ public static function openAPIFormats() 'office_code' => 'officeCode', 'non_us_province' => 'nonUsProvince', 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', + 'federal_efile_date' => 'federalEfileDate', 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', + 'state_efile_date' => 'stateEfileDate', + 'recipient_edelivery_date' => 'recipientEdeliveryDate', 'tin_match' => 'tinMatch', 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', 'address_verification' => 'addressVerification', + 'state_and_local_withholding' => 'stateAndLocalWithholding', + 'second_tin_notice' => 'secondTinNotice', 'federal_efile_status' => 'federalEfileStatus', - 'e_delivery_status' => 'eDeliveryStatus', 'state_efile_status' => 'stateEfileStatus', 'postal_mail_status' => 'postalMailStatus', 'tin_match_status' => 'tinMatchStatus', 'address_verification_status' => 'addressVerificationStatus', - 'validation_errors' => 'validationErrors' + 'e_delivery_status' => 'eDeliveryStatus', + 'validation_errors' => 'validationErrors', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt' ]; /** @@ -292,39 +280,31 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'filer_type' => 'setFilerType', - 'payment_type' => 'setPaymentType', - 'payment_settlement_entity_name_phone_number' => 'setPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'setGrossAmountPaymentCard', - 'card_not_present_transactions' => 'setCardNotPresentTransactions', - 'merchant_category_code' => 'setMerchantCategoryCode', - 'payment_transaction_number' => 'setPaymentTransactionNumber', + 'interest_income' => 'setInterestIncome', + 'early_withdrawal_penalty' => 'setEarlyWithdrawalPenalty', + 'us_savings_bonds_interest' => 'setUsSavingsBondsInterest', 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'january' => 'setJanuary', - 'february' => 'setFebruary', - 'march' => 'setMarch', - 'april' => 'setApril', - 'may' => 'setMay', - 'june' => 'setJune', - 'july' => 'setJuly', - 'august' => 'setAugust', - 'sept' => 'setSept', - 'october' => 'setOctober', - 'november' => 'setNovember', - 'december' => 'setDecember', + 'investment_expenses' => 'setInvestmentExpenses', + 'foreign_tax_paid' => 'setForeignTaxPaid', + 'foreign_country' => 'setForeignCountry', + 'tax_exempt_interest' => 'setTaxExemptInterest', + 'specified_private_activity_bond_interest' => 'setSpecifiedPrivateActivityBondInterest', + 'market_discount' => 'setMarketDiscount', + 'bond_premium' => 'setBondPremium', + 'bond_premium_on_treasury_obligations' => 'setBondPremiumOnTreasuryObligations', + 'bond_premium_on_tax_exempt_bond' => 'setBondPremiumOnTaxExemptBond', + 'tax_exempt_bond_cusip_number' => 'setTaxExemptBondCusipNumber', + 'fatca_filing_requirement' => 'setFatcaFilingRequirement', 'type' => 'setType', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'tin_type' => 'setTinType', 'id' => 'setId', 'issuer_id' => 'setIssuerId', 'issuer_reference_id' => 'setIssuerReferenceId', 'issuer_tin' => 'setIssuerTin', 'tax_year' => 'setTaxYear', 'reference_id' => 'setReferenceId', + 'tin' => 'setTin', 'recipient_name' => 'setRecipientName', - 'recipient_tin' => 'setRecipientTin', + 'tin_type' => 'setTinType', 'recipient_second_name' => 'setRecipientSecondName', 'address' => 'setAddress', 'address2' => 'setAddress2', @@ -336,20 +316,24 @@ public static function openAPIFormats() 'office_code' => 'setOfficeCode', 'non_us_province' => 'setNonUsProvince', 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', + 'federal_efile_date' => 'setFederalEfileDate', 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', + 'state_efile_date' => 'setStateEfileDate', + 'recipient_edelivery_date' => 'setRecipientEdeliveryDate', 'tin_match' => 'setTinMatch', 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', 'address_verification' => 'setAddressVerification', + 'state_and_local_withholding' => 'setStateAndLocalWithholding', + 'second_tin_notice' => 'setSecondTinNotice', 'federal_efile_status' => 'setFederalEfileStatus', - 'e_delivery_status' => 'setEDeliveryStatus', 'state_efile_status' => 'setStateEfileStatus', 'postal_mail_status' => 'setPostalMailStatus', 'tin_match_status' => 'setTinMatchStatus', 'address_verification_status' => 'setAddressVerificationStatus', - 'validation_errors' => 'setValidationErrors' + 'e_delivery_status' => 'setEDeliveryStatus', + 'validation_errors' => 'setValidationErrors', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -358,39 +342,31 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'filer_type' => 'getFilerType', - 'payment_type' => 'getPaymentType', - 'payment_settlement_entity_name_phone_number' => 'getPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'getGrossAmountPaymentCard', - 'card_not_present_transactions' => 'getCardNotPresentTransactions', - 'merchant_category_code' => 'getMerchantCategoryCode', - 'payment_transaction_number' => 'getPaymentTransactionNumber', + 'interest_income' => 'getInterestIncome', + 'early_withdrawal_penalty' => 'getEarlyWithdrawalPenalty', + 'us_savings_bonds_interest' => 'getUsSavingsBondsInterest', 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'january' => 'getJanuary', - 'february' => 'getFebruary', - 'march' => 'getMarch', - 'april' => 'getApril', - 'may' => 'getMay', - 'june' => 'getJune', - 'july' => 'getJuly', - 'august' => 'getAugust', - 'sept' => 'getSept', - 'october' => 'getOctober', - 'november' => 'getNovember', - 'december' => 'getDecember', + 'investment_expenses' => 'getInvestmentExpenses', + 'foreign_tax_paid' => 'getForeignTaxPaid', + 'foreign_country' => 'getForeignCountry', + 'tax_exempt_interest' => 'getTaxExemptInterest', + 'specified_private_activity_bond_interest' => 'getSpecifiedPrivateActivityBondInterest', + 'market_discount' => 'getMarketDiscount', + 'bond_premium' => 'getBondPremium', + 'bond_premium_on_treasury_obligations' => 'getBondPremiumOnTreasuryObligations', + 'bond_premium_on_tax_exempt_bond' => 'getBondPremiumOnTaxExemptBond', + 'tax_exempt_bond_cusip_number' => 'getTaxExemptBondCusipNumber', + 'fatca_filing_requirement' => 'getFatcaFilingRequirement', 'type' => 'getType', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'tin_type' => 'getTinType', 'id' => 'getId', 'issuer_id' => 'getIssuerId', 'issuer_reference_id' => 'getIssuerReferenceId', 'issuer_tin' => 'getIssuerTin', 'tax_year' => 'getTaxYear', 'reference_id' => 'getReferenceId', + 'tin' => 'getTin', 'recipient_name' => 'getRecipientName', - 'recipient_tin' => 'getRecipientTin', + 'tin_type' => 'getTinType', 'recipient_second_name' => 'getRecipientSecondName', 'address' => 'getAddress', 'address2' => 'getAddress2', @@ -402,20 +378,24 @@ public static function openAPIFormats() 'office_code' => 'getOfficeCode', 'non_us_province' => 'getNonUsProvince', 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', + 'federal_efile_date' => 'getFederalEfileDate', 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', + 'state_efile_date' => 'getStateEfileDate', + 'recipient_edelivery_date' => 'getRecipientEdeliveryDate', 'tin_match' => 'getTinMatch', 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', 'address_verification' => 'getAddressVerification', + 'state_and_local_withholding' => 'getStateAndLocalWithholding', + 'second_tin_notice' => 'getSecondTinNotice', 'federal_efile_status' => 'getFederalEfileStatus', - 'e_delivery_status' => 'getEDeliveryStatus', 'state_efile_status' => 'getStateEfileStatus', 'postal_mail_status' => 'getPostalMailStatus', 'tin_match_status' => 'getTinMatchStatus', 'address_verification_status' => 'getAddressVerificationStatus', - 'validation_errors' => 'getValidationErrors' + 'e_delivery_status' => 'getEDeliveryStatus', + 'validation_errors' => 'getValidationErrors', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -459,11 +439,6 @@ public function getModelName() return self::$openAPIModelName; } - const FILER_TYPE_PSE = 'PSE'; - const FILER_TYPE_EPF = 'EPF'; - const FILER_TYPE_OTHER = 'Other'; - const PAYMENT_TYPE_MERCHANT_PAYMENT_CARD = 'MerchantPaymentCard'; - const PAYMENT_TYPE_THIRD_PARTY_NETWORK = 'ThirdPartyNetwork'; const TYPE__1099_NEC = '1099-NEC'; const TYPE__1099_MISC = '1099-MISC'; const TYPE__1099_DIV = '1099-DIV'; @@ -472,38 +447,13 @@ public function getModelName() const TYPE__1095_B = '1095-B'; const TYPE__1042_S = '1042-S'; const TYPE__1095_C = '1095-C'; + const TYPE__1099_INT = '1099-INT'; + const TIN_TYPE__EMPTY = 'Empty'; const TIN_TYPE_EIN = 'EIN'; const TIN_TYPE_SSN = 'SSN'; const TIN_TYPE_ITIN = 'ITIN'; const TIN_TYPE_ATIN = 'ATIN'; - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getFilerTypeAllowableValues() - { - return [ - self::FILER_TYPE_PSE, - self::FILER_TYPE_EPF, - self::FILER_TYPE_OTHER, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPaymentTypeAllowableValues() - { - return [ - self::PAYMENT_TYPE_MERCHANT_PAYMENT_CARD, - self::PAYMENT_TYPE_THIRD_PARTY_NETWORK, - ]; - } - /** * Gets allowable values of the enum * @@ -520,6 +470,7 @@ public function getTypeAllowableValues() self::TYPE__1095_B, self::TYPE__1042_S, self::TYPE__1095_C, + self::TYPE__1099_INT, ]; } @@ -531,6 +482,7 @@ public function getTypeAllowableValues() public function getTinTypeAllowableValues() { return [ + self::TIN_TYPE__EMPTY, self::TIN_TYPE_EIN, self::TIN_TYPE_SSN, self::TIN_TYPE_ITIN, @@ -553,39 +505,31 @@ public function getTinTypeAllowableValues() */ public function __construct(array $data = null) { - $this->container['filer_type'] = $data['filer_type'] ?? null; - $this->container['payment_type'] = $data['payment_type'] ?? null; - $this->container['payment_settlement_entity_name_phone_number'] = $data['payment_settlement_entity_name_phone_number'] ?? null; - $this->container['gross_amount_payment_card'] = $data['gross_amount_payment_card'] ?? null; - $this->container['card_not_present_transactions'] = $data['card_not_present_transactions'] ?? null; - $this->container['merchant_category_code'] = $data['merchant_category_code'] ?? null; - $this->container['payment_transaction_number'] = $data['payment_transaction_number'] ?? null; + $this->container['interest_income'] = $data['interest_income'] ?? null; + $this->container['early_withdrawal_penalty'] = $data['early_withdrawal_penalty'] ?? null; + $this->container['us_savings_bonds_interest'] = $data['us_savings_bonds_interest'] ?? null; $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['january'] = $data['january'] ?? null; - $this->container['february'] = $data['february'] ?? null; - $this->container['march'] = $data['march'] ?? null; - $this->container['april'] = $data['april'] ?? null; - $this->container['may'] = $data['may'] ?? null; - $this->container['june'] = $data['june'] ?? null; - $this->container['july'] = $data['july'] ?? null; - $this->container['august'] = $data['august'] ?? null; - $this->container['sept'] = $data['sept'] ?? null; - $this->container['october'] = $data['october'] ?? null; - $this->container['november'] = $data['november'] ?? null; - $this->container['december'] = $data['december'] ?? null; + $this->container['investment_expenses'] = $data['investment_expenses'] ?? null; + $this->container['foreign_tax_paid'] = $data['foreign_tax_paid'] ?? null; + $this->container['foreign_country'] = $data['foreign_country'] ?? null; + $this->container['tax_exempt_interest'] = $data['tax_exempt_interest'] ?? null; + $this->container['specified_private_activity_bond_interest'] = $data['specified_private_activity_bond_interest'] ?? null; + $this->container['market_discount'] = $data['market_discount'] ?? null; + $this->container['bond_premium'] = $data['bond_premium'] ?? null; + $this->container['bond_premium_on_treasury_obligations'] = $data['bond_premium_on_treasury_obligations'] ?? null; + $this->container['bond_premium_on_tax_exempt_bond'] = $data['bond_premium_on_tax_exempt_bond'] ?? null; + $this->container['tax_exempt_bond_cusip_number'] = $data['tax_exempt_bond_cusip_number'] ?? null; + $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; $this->container['type'] = $data['type'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['issuer_id'] = $data['issuer_id'] ?? null; $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; $this->container['tax_year'] = $data['tax_year'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; + $this->container['tin'] = $data['tin'] ?? null; $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; + $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['address2'] = $data['address2'] ?? null; @@ -597,20 +541,24 @@ public function __construct(array $data = null) $this->container['office_code'] = $data['office_code'] ?? null; $this->container['non_us_province'] = $data['non_us_province'] ?? null; $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; + $this->container['federal_efile_date'] = $data['federal_efile_date'] ?? null; $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; + $this->container['state_efile_date'] = $data['state_efile_date'] ?? null; + $this->container['recipient_edelivery_date'] = $data['recipient_edelivery_date'] ?? null; $this->container['tin_match'] = $data['tin_match'] ?? null; $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; $this->container['address_verification'] = $data['address_verification'] ?? null; + $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; + $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; + $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['validation_errors'] = $data['validation_errors'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -622,24 +570,9 @@ public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($this->container['filer_type']) && !in_array($this->container['filer_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'filer_type', must be one of '%s'", - $this->container['filer_type'], - implode("', '", $allowedValues) - ); + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; } - - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($this->container['payment_type']) && !in_array($this->container['payment_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'payment_type', must be one of '%s'", - $this->container['payment_type'], - implode("', '", $allowedValues) - ); - } - $allowedValues = $this->getTypeAllowableValues(); if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -649,6 +582,9 @@ public function listInvalidProperties() ); } + if ($this->container['recipient_name'] === null) { + $invalidProperties[] = "'recipient_name' can't be null"; + } $allowedValues = $this->getTinTypeAllowableValues(); if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -658,6 +594,15 @@ public function listInvalidProperties() ); } + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } return $invalidProperties; } @@ -674,189 +619,73 @@ public function valid() /** - * Gets filer_type - * - * @return string|null - */ - public function getFilerType() - { - return $this->container['filer_type']; - } - - /** - * Sets filer_type - * - * @param string|null $filer_type filer_type - * - * @return self - */ - public function setFilerType($filer_type) - { - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($filer_type) && !in_array($filer_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'filer_type', must be one of '%s'", - $filer_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['filer_type'] = $filer_type; - - return $this; - } - - /** - * Gets payment_type - * - * @return string|null - */ - public function getPaymentType() - { - return $this->container['payment_type']; - } - - /** - * Sets payment_type - * - * @param string|null $payment_type payment_type - * - * @return self - */ - public function setPaymentType($payment_type) - { - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($payment_type) && !in_array($payment_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'payment_type', must be one of '%s'", - $payment_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['payment_type'] = $payment_type; - - return $this; - } - - /** - * Gets payment_settlement_entity_name_phone_number - * - * @return string|null - */ - public function getPaymentSettlementEntityNamePhoneNumber() - { - return $this->container['payment_settlement_entity_name_phone_number']; - } - - /** - * Sets payment_settlement_entity_name_phone_number - * - * @param string|null $payment_settlement_entity_name_phone_number payment_settlement_entity_name_phone_number - * - * @return self - */ - public function setPaymentSettlementEntityNamePhoneNumber($payment_settlement_entity_name_phone_number) - { - $this->container['payment_settlement_entity_name_phone_number'] = $payment_settlement_entity_name_phone_number; - - return $this; - } - - /** - * Gets gross_amount_payment_card + * Gets interest_income * * @return float|null */ - public function getGrossAmountPaymentCard() + public function getInterestIncome() { - return $this->container['gross_amount_payment_card']; + return $this->container['interest_income']; } /** - * Sets gross_amount_payment_card + * Sets interest_income * - * @param float|null $gross_amount_payment_card gross_amount_payment_card + * @param float|null $interest_income Interest Income * * @return self */ - public function setGrossAmountPaymentCard($gross_amount_payment_card) + public function setInterestIncome($interest_income) { - $this->container['gross_amount_payment_card'] = $gross_amount_payment_card; + $this->container['interest_income'] = $interest_income; return $this; } /** - * Gets card_not_present_transactions + * Gets early_withdrawal_penalty * * @return float|null */ - public function getCardNotPresentTransactions() - { - return $this->container['card_not_present_transactions']; - } - - /** - * Sets card_not_present_transactions - * - * @param float|null $card_not_present_transactions card_not_present_transactions - * - * @return self - */ - public function setCardNotPresentTransactions($card_not_present_transactions) - { - $this->container['card_not_present_transactions'] = $card_not_present_transactions; - - return $this; - } - - /** - * Gets merchant_category_code - * - * @return string|null - */ - public function getMerchantCategoryCode() + public function getEarlyWithdrawalPenalty() { - return $this->container['merchant_category_code']; + return $this->container['early_withdrawal_penalty']; } /** - * Sets merchant_category_code + * Sets early_withdrawal_penalty * - * @param string|null $merchant_category_code merchant_category_code + * @param float|null $early_withdrawal_penalty Early Withdrawal Penalty * * @return self */ - public function setMerchantCategoryCode($merchant_category_code) + public function setEarlyWithdrawalPenalty($early_withdrawal_penalty) { - $this->container['merchant_category_code'] = $merchant_category_code; + $this->container['early_withdrawal_penalty'] = $early_withdrawal_penalty; return $this; } /** - * Gets payment_transaction_number + * Gets us_savings_bonds_interest * * @return float|null */ - public function getPaymentTransactionNumber() + public function getUsSavingsBondsInterest() { - return $this->container['payment_transaction_number']; + return $this->container['us_savings_bonds_interest']; } /** - * Sets payment_transaction_number + * Sets us_savings_bonds_interest * - * @param float|null $payment_transaction_number payment_transaction_number + * @param float|null $us_savings_bonds_interest Interest on U.S. Savings Bonds and Treasury obligations * * @return self */ - public function setPaymentTransactionNumber($payment_transaction_number) + public function setUsSavingsBondsInterest($us_savings_bonds_interest) { - $this->container['payment_transaction_number'] = $payment_transaction_number; + $this->container['us_savings_bonds_interest'] = $us_savings_bonds_interest; return $this; } @@ -874,7 +703,7 @@ public function getFederalIncomeTaxWithheld() /** * Sets federal_income_tax_withheld * - * @param float|null $federal_income_tax_withheld federal_income_tax_withheld + * @param float|null $federal_income_tax_withheld Federal income tax withheld * * @return self */ @@ -886,289 +715,265 @@ public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) } /** - * Gets january + * Gets investment_expenses * * @return float|null */ - public function getJanuary() + public function getInvestmentExpenses() { - return $this->container['january']; + return $this->container['investment_expenses']; } /** - * Sets january + * Sets investment_expenses * - * @param float|null $january january + * @param float|null $investment_expenses Investment Expenses * * @return self */ - public function setJanuary($january) + public function setInvestmentExpenses($investment_expenses) { - $this->container['january'] = $january; + $this->container['investment_expenses'] = $investment_expenses; return $this; } /** - * Gets february + * Gets foreign_tax_paid * * @return float|null */ - public function getFebruary() + public function getForeignTaxPaid() { - return $this->container['february']; + return $this->container['foreign_tax_paid']; } /** - * Sets february + * Sets foreign_tax_paid * - * @param float|null $february february + * @param float|null $foreign_tax_paid Foreign tax paid * * @return self */ - public function setFebruary($february) + public function setForeignTaxPaid($foreign_tax_paid) { - $this->container['february'] = $february; + $this->container['foreign_tax_paid'] = $foreign_tax_paid; return $this; } /** - * Gets march + * Gets foreign_country * - * @return float|null - */ - public function getMarch() - { - return $this->container['march']; - } - - /** - * Sets march - * - * @param float|null $march march - * - * @return self - */ - public function setMarch($march) - { - $this->container['march'] = $march; - - return $this; - } - - /** - * Gets april - * - * @return float|null + * @return string|null */ - public function getApril() + public function getForeignCountry() { - return $this->container['april']; + return $this->container['foreign_country']; } /** - * Sets april + * Sets foreign_country * - * @param float|null $april april + * @param string|null $foreign_country Foreign country or U.S. possession * * @return self */ - public function setApril($april) + public function setForeignCountry($foreign_country) { - $this->container['april'] = $april; + $this->container['foreign_country'] = $foreign_country; return $this; } /** - * Gets may + * Gets tax_exempt_interest * * @return float|null */ - public function getMay() + public function getTaxExemptInterest() { - return $this->container['may']; + return $this->container['tax_exempt_interest']; } /** - * Sets may + * Sets tax_exempt_interest * - * @param float|null $may may + * @param float|null $tax_exempt_interest Tax-Exempt Interest * * @return self */ - public function setMay($may) + public function setTaxExemptInterest($tax_exempt_interest) { - $this->container['may'] = $may; + $this->container['tax_exempt_interest'] = $tax_exempt_interest; return $this; } /** - * Gets june + * Gets specified_private_activity_bond_interest * * @return float|null */ - public function getJune() + public function getSpecifiedPrivateActivityBondInterest() { - return $this->container['june']; + return $this->container['specified_private_activity_bond_interest']; } /** - * Sets june + * Sets specified_private_activity_bond_interest * - * @param float|null $june june + * @param float|null $specified_private_activity_bond_interest Specified Private activity * * @return self */ - public function setJune($june) + public function setSpecifiedPrivateActivityBondInterest($specified_private_activity_bond_interest) { - $this->container['june'] = $june; + $this->container['specified_private_activity_bond_interest'] = $specified_private_activity_bond_interest; return $this; } /** - * Gets july + * Gets market_discount * * @return float|null */ - public function getJuly() + public function getMarketDiscount() { - return $this->container['july']; + return $this->container['market_discount']; } /** - * Sets july + * Sets market_discount * - * @param float|null $july july + * @param float|null $market_discount Market Discount * * @return self */ - public function setJuly($july) + public function setMarketDiscount($market_discount) { - $this->container['july'] = $july; + $this->container['market_discount'] = $market_discount; return $this; } /** - * Gets august + * Gets bond_premium * * @return float|null */ - public function getAugust() + public function getBondPremium() { - return $this->container['august']; + return $this->container['bond_premium']; } /** - * Sets august + * Sets bond_premium * - * @param float|null $august august + * @param float|null $bond_premium Bond Premium * * @return self */ - public function setAugust($august) + public function setBondPremium($bond_premium) { - $this->container['august'] = $august; + $this->container['bond_premium'] = $bond_premium; return $this; } /** - * Gets sept + * Gets bond_premium_on_treasury_obligations * * @return float|null */ - public function getSept() + public function getBondPremiumOnTreasuryObligations() { - return $this->container['sept']; + return $this->container['bond_premium_on_treasury_obligations']; } /** - * Sets sept + * Sets bond_premium_on_treasury_obligations * - * @param float|null $sept sept + * @param float|null $bond_premium_on_treasury_obligations Bond Premium on Treasury obligations * * @return self */ - public function setSept($sept) + public function setBondPremiumOnTreasuryObligations($bond_premium_on_treasury_obligations) { - $this->container['sept'] = $sept; + $this->container['bond_premium_on_treasury_obligations'] = $bond_premium_on_treasury_obligations; return $this; } /** - * Gets october + * Gets bond_premium_on_tax_exempt_bond * * @return float|null */ - public function getOctober() + public function getBondPremiumOnTaxExemptBond() { - return $this->container['october']; + return $this->container['bond_premium_on_tax_exempt_bond']; } /** - * Sets october + * Sets bond_premium_on_tax_exempt_bond * - * @param float|null $october october + * @param float|null $bond_premium_on_tax_exempt_bond Bond Premium on tax exempt bond * * @return self */ - public function setOctober($october) + public function setBondPremiumOnTaxExemptBond($bond_premium_on_tax_exempt_bond) { - $this->container['october'] = $october; + $this->container['bond_premium_on_tax_exempt_bond'] = $bond_premium_on_tax_exempt_bond; return $this; } /** - * Gets november + * Gets tax_exempt_bond_cusip_number * - * @return float|null + * @return string|null */ - public function getNovember() + public function getTaxExemptBondCusipNumber() { - return $this->container['november']; + return $this->container['tax_exempt_bond_cusip_number']; } /** - * Sets november + * Sets tax_exempt_bond_cusip_number * - * @param float|null $november november + * @param string|null $tax_exempt_bond_cusip_number Tax exempt bond CUSIP no. * * @return self */ - public function setNovember($november) + public function setTaxExemptBondCusipNumber($tax_exempt_bond_cusip_number) { - $this->container['november'] = $november; + $this->container['tax_exempt_bond_cusip_number'] = $tax_exempt_bond_cusip_number; return $this; } /** - * Gets december + * Gets fatca_filing_requirement * - * @return float|null + * @return bool|null */ - public function getDecember() + public function getFatcaFilingRequirement() { - return $this->container['december']; + return $this->container['fatca_filing_requirement']; } /** - * Sets december + * Sets fatca_filing_requirement * - * @param float|null $december december + * @param bool|null $fatca_filing_requirement FATCA filing requirement * * @return self */ - public function setDecember($december) + public function setFatcaFilingRequirement($fatca_filing_requirement) { - $this->container['december'] = $december; + $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; return $this; } @@ -1176,7 +981,7 @@ public function setDecember($december) /** * Gets type * - * @return string|null + * @return string */ public function getType() { @@ -1186,14 +991,14 @@ public function getType() /** * Sets type * - * @param string|null $type type + * @param string $type Form type * * @return self */ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { + if (!in_array($type, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( "Invalid value '%s' for 'type', must be one of '%s'", @@ -1207,112 +1012,6 @@ public function setType($type) return $this; } - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at created_at - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at updated_at - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type tin_type - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - /** * Gets id * @@ -1326,7 +1025,7 @@ public function getId() /** * Sets id * - * @param string|null $id id + * @param string|null $id Form ID. Unique identifier set when the record is created. * * @return self */ @@ -1350,7 +1049,7 @@ public function getIssuerId() /** * Sets issuer_id * - * @param string|null $issuer_id issuer_id + * @param string|null $issuer_id Issuer ID - only required when creating forms * * @return self */ @@ -1374,7 +1073,7 @@ public function getIssuerReferenceId() /** * Sets issuer_reference_id * - * @param string|null $issuer_reference_id issuer_reference_id + * @param string|null $issuer_reference_id Issuer Reference ID - only required when creating forms * * @return self */ @@ -1398,7 +1097,7 @@ public function getIssuerTin() /** * Sets issuer_tin * - * @param string|null $issuer_tin issuer_tin + * @param string|null $issuer_tin Issuer TIN - readonly * * @return self */ @@ -1422,7 +1121,7 @@ public function getTaxYear() /** * Sets tax_year * - * @param int|null $tax_year tax_year + * @param int|null $tax_year Tax Year - only required when creating forms * * @return self */ @@ -1446,7 +1145,7 @@ public function getReferenceId() /** * Sets reference_id * - * @param string|null $reference_id reference_id + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ @@ -1458,10 +1157,34 @@ public function setReferenceId($reference_id) } /** - * Gets recipient_name + * Gets tin * * @return string|null */ + public function getTin() + { + return $this->container['tin']; + } + + /** + * Sets tin + * + * @param string|null $tin Recipient's Federal Tax Identification Number (TIN). + * + * @return self + */ + public function setTin($tin) + { + $this->container['tin'] = $tin; + + return $this; + } + + /** + * Gets recipient_name + * + * @return string + */ public function getRecipientName() { return $this->container['recipient_name']; @@ -1470,7 +1193,7 @@ public function getRecipientName() /** * Sets recipient_name * - * @param string|null $recipient_name recipient_name + * @param string $recipient_name Recipient name * * @return self */ @@ -1482,25 +1205,35 @@ public function setRecipientName($recipient_name) } /** - * Gets recipient_tin + * Gets tin_type * * @return string|null */ - public function getRecipientTin() + public function getTinType() { - return $this->container['recipient_tin']; + return $this->container['tin_type']; } /** - * Sets recipient_tin + * Sets tin_type * - * @param string|null $recipient_tin recipient_tin + * @param string|null $tin_type Type of TIN (Tax ID Number) * * @return self */ - public function setRecipientTin($recipient_tin) + public function setTinType($tin_type) { - $this->container['recipient_tin'] = $recipient_tin; + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tin_type', must be one of '%s'", + $tin_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tin_type'] = $tin_type; return $this; } @@ -1518,7 +1251,7 @@ public function getRecipientSecondName() /** * Sets recipient_second_name * - * @param string|null $recipient_second_name recipient_second_name + * @param string|null $recipient_second_name Recipient second name * * @return self */ @@ -1532,7 +1265,7 @@ public function setRecipientSecondName($recipient_second_name) /** * Gets address * - * @return string|null + * @return string */ public function getAddress() { @@ -1542,7 +1275,7 @@ public function getAddress() /** * Sets address * - * @param string|null $address address + * @param string $address Address. * * @return self */ @@ -1566,7 +1299,7 @@ public function getAddress2() /** * Sets address2 * - * @param string|null $address2 address2 + * @param string|null $address2 Address line 2. * * @return self */ @@ -1580,7 +1313,7 @@ public function setAddress2($address2) /** * Gets city * - * @return string|null + * @return string */ public function getCity() { @@ -1590,7 +1323,7 @@ public function getCity() /** * Sets city * - * @param string|null $city city + * @param string $city City. * * @return self */ @@ -1614,7 +1347,7 @@ public function getState() /** * Sets state * - * @param string|null $state state + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ @@ -1638,7 +1371,7 @@ public function getZip() /** * Sets zip * - * @param string|null $zip zip + * @param string|null $zip ZIP/postal code. * * @return self */ @@ -1662,7 +1395,7 @@ public function getEmail() /** * Sets email * - * @param string|null $email email + * @param string|null $email Recipient's Contact email address. * * @return self */ @@ -1686,7 +1419,7 @@ public function getAccountNumber() /** * Sets account_number * - * @param string|null $account_number account_number + * @param string|null $account_number Account number * * @return self */ @@ -1710,7 +1443,7 @@ public function getOfficeCode() /** * Sets office_code * - * @param string|null $office_code office_code + * @param string|null $office_code Office code * * @return self */ @@ -1734,7 +1467,7 @@ public function getNonUsProvince() /** * Sets non_us_province * - * @param string|null $non_us_province non_us_province + * @param string|null $non_us_province Province or region for non-US/CA addresses. * * @return self */ @@ -1748,7 +1481,7 @@ public function setNonUsProvince($non_us_province) /** * Gets country_code * - * @return string|null + * @return string */ public function getCountryCode() { @@ -1758,7 +1491,7 @@ public function getCountryCode() /** * Sets country_code * - * @param string|null $country_code country_code + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ @@ -1770,25 +1503,25 @@ public function setCountryCode($country_code) } /** - * Gets federal_e_file + * Gets federal_efile_date * - * @return bool|null + * @return \DateTime|null */ - public function getFederalEFile() + public function getFederalEfileDate() { - return $this->container['federal_e_file']; + return $this->container['federal_efile_date']; } /** - * Sets federal_e_file + * Sets federal_efile_date * - * @param bool|null $federal_e_file federal_e_file + * @param \DateTime|null $federal_efile_date Date when federal e-filing should be scheduled for this form * * @return self */ - public function setFederalEFile($federal_e_file) + public function setFederalEfileDate($federal_efile_date) { - $this->container['federal_e_file'] = $federal_e_file; + $this->container['federal_efile_date'] = $federal_efile_date; return $this; } @@ -1806,7 +1539,7 @@ public function getPostalMail() /** * Sets postal_mail * - * @param bool|null $postal_mail postal_mail + * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form * * @return self */ @@ -1818,25 +1551,49 @@ public function setPostalMail($postal_mail) } /** - * Gets state_e_file + * Gets state_efile_date * - * @return bool|null + * @return \DateTime|null + */ + public function getStateEfileDate() + { + return $this->container['state_efile_date']; + } + + /** + * Sets state_efile_date + * + * @param \DateTime|null $state_efile_date Date when state e-filing should be scheduled for this form + * + * @return self + */ + public function setStateEfileDate($state_efile_date) + { + $this->container['state_efile_date'] = $state_efile_date; + + return $this; + } + + /** + * Gets recipient_edelivery_date + * + * @return \DateTime|null */ - public function getStateEFile() + public function getRecipientEdeliveryDate() { - return $this->container['state_e_file']; + return $this->container['recipient_edelivery_date']; } /** - * Sets state_e_file + * Sets recipient_edelivery_date * - * @param bool|null $state_e_file state_e_file + * @param \DateTime|null $recipient_edelivery_date Date when recipient e-delivery should be scheduled for this form * * @return self */ - public function setStateEFile($state_e_file) + public function setRecipientEdeliveryDate($recipient_edelivery_date) { - $this->container['state_e_file'] = $state_e_file; + $this->container['recipient_edelivery_date'] = $recipient_edelivery_date; return $this; } @@ -1854,7 +1611,7 @@ public function getTinMatch() /** * Sets tin_match * - * @param bool|null $tin_match tin_match + * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form * * @return self */ @@ -1878,7 +1635,7 @@ public function getNoTin() /** * Sets no_tin * - * @param bool|null $no_tin no_tin + * @param bool|null $no_tin No TIN indicator * * @return self */ @@ -1890,97 +1647,97 @@ public function setNoTin($no_tin) } /** - * Gets second_tin_notice + * Gets address_verification * * @return bool|null */ - public function getSecondTinNotice() + public function getAddressVerification() { - return $this->container['second_tin_notice']; + return $this->container['address_verification']; } /** - * Sets second_tin_notice + * Sets address_verification * - * @param bool|null $second_tin_notice second_tin_notice + * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form * * @return self */ - public function setSecondTinNotice($second_tin_notice) + public function setAddressVerification($address_verification) { - $this->container['second_tin_notice'] = $second_tin_notice; + $this->container['address_verification'] = $address_verification; return $this; } /** - * Gets address_verification + * Gets state_and_local_withholding * - * @return bool|null + * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null */ - public function getAddressVerification() + public function getStateAndLocalWithholding() { - return $this->container['address_verification']; + return $this->container['state_and_local_withholding']; } /** - * Sets address_verification + * Sets state_and_local_withholding * - * @param bool|null $address_verification address_verification + * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding State and local withholding information * * @return self */ - public function setAddressVerification($address_verification) + public function setStateAndLocalWithholding($state_and_local_withholding) { - $this->container['address_verification'] = $address_verification; + $this->container['state_and_local_withholding'] = $state_and_local_withholding; return $this; } /** - * Gets federal_efile_status + * Gets second_tin_notice * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return bool|null */ - public function getFederalEfileStatus() + public function getSecondTinNotice() { - return $this->container['federal_efile_status']; + return $this->container['second_tin_notice']; } /** - * Sets federal_efile_status + * Sets second_tin_notice * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status federal_efile_status + * @param bool|null $second_tin_notice Second TIN notice * * @return self */ - public function setFederalEfileStatus($federal_efile_status) + public function setSecondTinNotice($second_tin_notice) { - $this->container['federal_efile_status'] = $federal_efile_status; + $this->container['second_tin_notice'] = $second_tin_notice; return $this; } /** - * Gets e_delivery_status + * Gets federal_efile_status * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getEDeliveryStatus() + public function getFederalEfileStatus() { - return $this->container['e_delivery_status']; + return $this->container['federal_efile_status']; } /** - * Sets e_delivery_status + * Sets federal_efile_status * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status e_delivery_status + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status Federal e-file status * * @return self */ - public function setEDeliveryStatus($e_delivery_status) + public function setFederalEfileStatus($federal_efile_status) { - $this->container['e_delivery_status'] = $e_delivery_status; + $this->container['federal_efile_status'] = $federal_efile_status; return $this; } @@ -1988,7 +1745,7 @@ public function setEDeliveryStatus($e_delivery_status) /** * Gets state_efile_status * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null + * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null */ public function getStateEfileStatus() { @@ -1998,7 +1755,7 @@ public function getStateEfileStatus() /** * Sets state_efile_status * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status state_efile_status + * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status State e-file status * * @return self */ @@ -2014,7 +1771,7 @@ public function setStateEfileStatus($state_efile_status) /** * Gets postal_mail_status * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ public function getPostalMailStatus() { @@ -2024,7 +1781,7 @@ public function getPostalMailStatus() /** * Sets postal_mail_status * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status postal_mail_status + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status Postal mail to recipient status * * @return self */ @@ -2038,7 +1795,7 @@ public function setPostalMailStatus($postal_mail_status) /** * Gets tin_match_status * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ public function getTinMatchStatus() { @@ -2048,7 +1805,7 @@ public function getTinMatchStatus() /** * Sets tin_match_status * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status tin_match_status + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status TIN Match status * * @return self */ @@ -2062,7 +1819,7 @@ public function setTinMatchStatus($tin_match_status) /** * Gets address_verification_status * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ public function getAddressVerificationStatus() { @@ -2072,7 +1829,7 @@ public function getAddressVerificationStatus() /** * Sets address_verification_status * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status address_verification_status + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status Address verification status * * @return self */ @@ -2083,10 +1840,34 @@ public function setAddressVerificationStatus($address_verification_status) return $this; } + /** + * Gets e_delivery_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getEDeliveryStatus() + { + return $this->container['e_delivery_status']; + } + + /** + * Sets e_delivery_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $e_delivery_status EDelivery status + * + * @return self + */ + public function setEDeliveryStatus($e_delivery_status) + { + $this->container['e_delivery_status'] = $e_delivery_status; + + return $this; + } + /** * Gets validation_errors * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null + * @return \Avalara\SDK\Model\A1099\V2\ValidationError[]|null */ public function getValidationErrors() { @@ -2096,7 +1877,7 @@ public function getValidationErrors() /** * Sets validation_errors * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors validation_errors + * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors Validation errors * * @return self */ @@ -2108,6 +1889,54 @@ public function setValidationErrors($validation_errors) return $this; } + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at Date time when the record was created. + * + * @return self + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at Date time when the record was last updated. + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/Form1099K.php b/lib/Model/A1099/V2/Form1099K.php index 690d3b7..4b3467f 100644 --- a/lib/Model/A1099/V2/Form1099K.php +++ b/lib/Model/A1099/V2/Form1099K.php @@ -20,7 +20,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) * * @category Avalara client libraries * @package Avalara\SDK\API\A1099\V2 @@ -47,6 +47,7 @@ * Form1099K Class Doc Comment * * @category Class + * @description Form 1099-K: Payment Card and Third Party Network Transactions * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -87,43 +88,49 @@ class Form1099K implements ModelInterface, ArrayAccess, \JsonSerializable 'june' => 'float', 'july' => 'float', 'august' => 'float', - 'sept' => 'float', + 'september' => 'float', 'october' => 'float', 'november' => 'float', 'december' => 'float', - 'id' => 'string', 'type' => 'string', - 'issuer_id' => 'int', + 'id' => 'string', + 'issuer_id' => 'string', 'issuer_reference_id' => 'string', 'issuer_tin' => 'string', 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', 'tin' => 'string', 'recipient_name' => 'string', + 'tin_type' => 'string', 'recipient_second_name' => 'string', 'address' => 'string', 'address2' => 'string', 'city' => 'string', 'state' => 'string', 'zip' => 'string', - 'foreign_province' => 'string', + 'email' => 'string', + 'account_number' => 'string', + 'office_code' => 'string', + 'non_us_province' => 'string', 'country_code' => 'string', + 'federal_efile_date' => '\DateTime', + 'postal_mail' => 'bool', + 'state_efile_date' => '\DateTime', + 'recipient_edelivery_date' => '\DateTime', + 'tin_match' => 'bool', + 'no_tin' => 'bool', + 'address_verification' => 'bool', + 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding', + 'second_tin_notice' => 'bool', + 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', + 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationError[]', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding' + 'updated_at' => '\DateTime' ]; /** @@ -150,43 +157,49 @@ class Form1099K implements ModelInterface, ArrayAccess, \JsonSerializable 'june' => 'double', 'july' => 'double', 'august' => 'double', - 'sept' => 'double', + 'september' => 'double', 'october' => 'double', 'november' => 'double', 'december' => 'double', - 'id' => null, 'type' => null, - 'issuer_id' => 'int32', + 'id' => null, + 'issuer_id' => null, 'issuer_reference_id' => null, 'issuer_tin' => null, 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, 'reference_id' => null, - 'email' => null, - 'tin_type' => null, 'tin' => null, 'recipient_name' => null, + 'tin_type' => null, 'recipient_second_name' => null, 'address' => null, 'address2' => null, 'city' => null, 'state' => null, 'zip' => null, - 'foreign_province' => null, + 'email' => null, + 'account_number' => null, + 'office_code' => null, + 'non_us_province' => null, 'country_code' => null, + 'federal_efile_date' => 'date', + 'postal_mail' => null, + 'state_efile_date' => 'date', + 'recipient_edelivery_date' => 'date', + 'tin_match' => null, + 'no_tin' => null, + 'address_verification' => null, + 'state_and_local_withholding' => null, + 'second_tin_notice' => null, + 'federal_efile_status' => null, + 'state_efile_status' => null, + 'postal_mail_status' => null, + 'tin_match_status' => null, + 'address_verification_status' => null, + 'e_delivery_status' => null, 'validation_errors' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null + 'updated_at' => 'date-time' ]; /** @@ -232,43 +245,49 @@ public static function openAPIFormats() 'june' => 'june', 'july' => 'july', 'august' => 'august', - 'sept' => 'sept', + 'september' => 'september', 'october' => 'october', 'november' => 'november', 'december' => 'december', - 'id' => 'id', 'type' => 'type', + 'id' => 'id', 'issuer_id' => 'issuerId', 'issuer_reference_id' => 'issuerReferenceId', 'issuer_tin' => 'issuerTin', 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', 'tin' => 'tin', 'recipient_name' => 'recipientName', + 'tin_type' => 'tinType', 'recipient_second_name' => 'recipientSecondName', 'address' => 'address', 'address2' => 'address2', 'city' => 'city', 'state' => 'state', 'zip' => 'zip', - 'foreign_province' => 'foreignProvince', + 'email' => 'email', + 'account_number' => 'accountNumber', + 'office_code' => 'officeCode', + 'non_us_province' => 'nonUsProvince', 'country_code' => 'countryCode', + 'federal_efile_date' => 'federalEfileDate', + 'postal_mail' => 'postalMail', + 'state_efile_date' => 'stateEfileDate', + 'recipient_edelivery_date' => 'recipientEdeliveryDate', + 'tin_match' => 'tinMatch', + 'no_tin' => 'noTin', + 'address_verification' => 'addressVerification', + 'state_and_local_withholding' => 'stateAndLocalWithholding', + 'second_tin_notice' => 'secondTinNotice', + 'federal_efile_status' => 'federalEfileStatus', + 'state_efile_status' => 'stateEfileStatus', + 'postal_mail_status' => 'postalMailStatus', + 'tin_match_status' => 'tinMatchStatus', + 'address_verification_status' => 'addressVerificationStatus', + 'e_delivery_status' => 'eDeliveryStatus', 'validation_errors' => 'validationErrors', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' + 'updated_at' => 'updatedAt' ]; /** @@ -293,43 +312,49 @@ public static function openAPIFormats() 'june' => 'setJune', 'july' => 'setJuly', 'august' => 'setAugust', - 'sept' => 'setSept', + 'september' => 'setSeptember', 'october' => 'setOctober', 'november' => 'setNovember', 'december' => 'setDecember', - 'id' => 'setId', 'type' => 'setType', + 'id' => 'setId', 'issuer_id' => 'setIssuerId', 'issuer_reference_id' => 'setIssuerReferenceId', 'issuer_tin' => 'setIssuerTin', 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', 'tin' => 'setTin', 'recipient_name' => 'setRecipientName', + 'tin_type' => 'setTinType', 'recipient_second_name' => 'setRecipientSecondName', 'address' => 'setAddress', 'address2' => 'setAddress2', 'city' => 'setCity', 'state' => 'setState', 'zip' => 'setZip', - 'foreign_province' => 'setForeignProvince', + 'email' => 'setEmail', + 'account_number' => 'setAccountNumber', + 'office_code' => 'setOfficeCode', + 'non_us_province' => 'setNonUsProvince', 'country_code' => 'setCountryCode', + 'federal_efile_date' => 'setFederalEfileDate', + 'postal_mail' => 'setPostalMail', + 'state_efile_date' => 'setStateEfileDate', + 'recipient_edelivery_date' => 'setRecipientEdeliveryDate', + 'tin_match' => 'setTinMatch', + 'no_tin' => 'setNoTin', + 'address_verification' => 'setAddressVerification', + 'state_and_local_withholding' => 'setStateAndLocalWithholding', + 'second_tin_notice' => 'setSecondTinNotice', + 'federal_efile_status' => 'setFederalEfileStatus', + 'state_efile_status' => 'setStateEfileStatus', + 'postal_mail_status' => 'setPostalMailStatus', + 'tin_match_status' => 'setTinMatchStatus', + 'address_verification_status' => 'setAddressVerificationStatus', + 'e_delivery_status' => 'setEDeliveryStatus', 'validation_errors' => 'setValidationErrors', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' + 'updated_at' => 'setUpdatedAt' ]; /** @@ -354,43 +379,49 @@ public static function openAPIFormats() 'june' => 'getJune', 'july' => 'getJuly', 'august' => 'getAugust', - 'sept' => 'getSept', + 'september' => 'getSeptember', 'october' => 'getOctober', 'november' => 'getNovember', 'december' => 'getDecember', - 'id' => 'getId', 'type' => 'getType', + 'id' => 'getId', 'issuer_id' => 'getIssuerId', 'issuer_reference_id' => 'getIssuerReferenceId', 'issuer_tin' => 'getIssuerTin', 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', 'tin' => 'getTin', 'recipient_name' => 'getRecipientName', + 'tin_type' => 'getTinType', 'recipient_second_name' => 'getRecipientSecondName', 'address' => 'getAddress', 'address2' => 'getAddress2', 'city' => 'getCity', 'state' => 'getState', 'zip' => 'getZip', - 'foreign_province' => 'getForeignProvince', + 'email' => 'getEmail', + 'account_number' => 'getAccountNumber', + 'office_code' => 'getOfficeCode', + 'non_us_province' => 'getNonUsProvince', 'country_code' => 'getCountryCode', + 'federal_efile_date' => 'getFederalEfileDate', + 'postal_mail' => 'getPostalMail', + 'state_efile_date' => 'getStateEfileDate', + 'recipient_edelivery_date' => 'getRecipientEdeliveryDate', + 'tin_match' => 'getTinMatch', + 'no_tin' => 'getNoTin', + 'address_verification' => 'getAddressVerification', + 'state_and_local_withholding' => 'getStateAndLocalWithholding', + 'second_tin_notice' => 'getSecondTinNotice', + 'federal_efile_status' => 'getFederalEfileStatus', + 'state_efile_status' => 'getStateEfileStatus', + 'postal_mail_status' => 'getPostalMailStatus', + 'tin_match_status' => 'getTinMatchStatus', + 'address_verification_status' => 'getAddressVerificationStatus', + 'e_delivery_status' => 'getEDeliveryStatus', 'validation_errors' => 'getValidationErrors', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' + 'updated_at' => 'getUpdatedAt' ]; /** @@ -439,6 +470,20 @@ public function getModelName() const FILER_TYPE_OTHER = 'Other'; const PAYMENT_TYPE_MERCHANT_PAYMENT_CARD = 'MerchantPaymentCard'; const PAYMENT_TYPE_THIRD_PARTY_NETWORK = 'ThirdPartyNetwork'; + const TYPE__1099_NEC = '1099-NEC'; + const TYPE__1099_MISC = '1099-MISC'; + const TYPE__1099_DIV = '1099-DIV'; + const TYPE__1099_R = '1099-R'; + const TYPE__1099_K = '1099-K'; + const TYPE__1095_B = '1095-B'; + const TYPE__1042_S = '1042-S'; + const TYPE__1095_C = '1095-C'; + const TYPE__1099_INT = '1099-INT'; + const TIN_TYPE__EMPTY = 'Empty'; + const TIN_TYPE_EIN = 'EIN'; + const TIN_TYPE_SSN = 'SSN'; + const TIN_TYPE_ITIN = 'ITIN'; + const TIN_TYPE_ATIN = 'ATIN'; /** * Gets allowable values of the enum @@ -467,6 +512,42 @@ public function getPaymentTypeAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE__1099_NEC, + self::TYPE__1099_MISC, + self::TYPE__1099_DIV, + self::TYPE__1099_R, + self::TYPE__1099_K, + self::TYPE__1095_B, + self::TYPE__1042_S, + self::TYPE__1095_C, + self::TYPE__1099_INT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTinTypeAllowableValues() + { + return [ + self::TIN_TYPE__EMPTY, + self::TIN_TYPE_EIN, + self::TIN_TYPE_SSN, + self::TIN_TYPE_ITIN, + self::TIN_TYPE_ATIN, + ]; + } + /** * Associative array for storing property values * @@ -498,43 +579,49 @@ public function __construct(array $data = null) $this->container['june'] = $data['june'] ?? null; $this->container['july'] = $data['july'] ?? null; $this->container['august'] = $data['august'] ?? null; - $this->container['sept'] = $data['sept'] ?? null; + $this->container['september'] = $data['september'] ?? null; $this->container['october'] = $data['october'] ?? null; $this->container['november'] = $data['november'] ?? null; $this->container['december'] = $data['december'] ?? null; - $this->container['id'] = $data['id'] ?? null; $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; $this->container['issuer_id'] = $data['issuer_id'] ?? null; $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['tin'] = $data['tin'] ?? null; $this->container['recipient_name'] = $data['recipient_name'] ?? null; + $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['address2'] = $data['address2'] ?? null; $this->container['city'] = $data['city'] ?? null; $this->container['state'] = $data['state'] ?? null; $this->container['zip'] = $data['zip'] ?? null; - $this->container['foreign_province'] = $data['foreign_province'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['account_number'] = $data['account_number'] ?? null; + $this->container['office_code'] = $data['office_code'] ?? null; + $this->container['non_us_province'] = $data['non_us_province'] ?? null; $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['federal_efile_date'] = $data['federal_efile_date'] ?? null; + $this->container['postal_mail'] = $data['postal_mail'] ?? null; + $this->container['state_efile_date'] = $data['state_efile_date'] ?? null; + $this->container['recipient_edelivery_date'] = $data['recipient_edelivery_date'] ?? null; + $this->container['tin_match'] = $data['tin_match'] ?? null; + $this->container['no_tin'] = $data['no_tin'] ?? null; + $this->container['address_verification'] = $data['address_verification'] ?? null; + $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; + $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; + $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; + $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; + $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; + $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; + $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; + $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['validation_errors'] = $data['validation_errors'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; } /** @@ -564,6 +651,39 @@ public function listInvalidProperties() ); } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['recipient_name'] === null) { + $invalidProperties[] = "'recipient_name' can't be null"; + } + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tin_type', must be one of '%s'", + $this->container['tin_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } return $invalidProperties; } @@ -592,7 +712,7 @@ public function getFilerType() /** * Sets filer_type * - * @param string|null $filer_type filer_type + * @param string|null $filer_type Filer type (PSE or EPF) * * @return self */ @@ -626,7 +746,7 @@ public function getPaymentType() /** * Sets payment_type * - * @param string|null $payment_type payment_type + * @param string|null $payment_type Payment type (payment card or third party network) * * @return self */ @@ -660,7 +780,7 @@ public function getPaymentSettlementEntityNamePhoneNumber() /** * Sets payment_settlement_entity_name_phone_number * - * @param string|null $payment_settlement_entity_name_phone_number payment_settlement_entity_name_phone_number + * @param string|null $payment_settlement_entity_name_phone_number Payment settlement entity name and phone number * * @return self */ @@ -684,7 +804,7 @@ public function getGrossAmountPaymentCard() /** * Sets gross_amount_payment_card * - * @param float|null $gross_amount_payment_card gross_amount_payment_card + * @param float|null $gross_amount_payment_card Gross amount of payment card/third party network transactions * * @return self */ @@ -708,7 +828,7 @@ public function getCardNotPresentTransactions() /** * Sets card_not_present_transactions * - * @param float|null $card_not_present_transactions card_not_present_transactions + * @param float|null $card_not_present_transactions Card not present transactions * * @return self */ @@ -732,7 +852,7 @@ public function getMerchantCategoryCode() /** * Sets merchant_category_code * - * @param string|null $merchant_category_code merchant_category_code + * @param string|null $merchant_category_code Merchant category code * * @return self */ @@ -756,7 +876,7 @@ public function getPaymentTransactionNumber() /** * Sets payment_transaction_number * - * @param float|null $payment_transaction_number payment_transaction_number + * @param float|null $payment_transaction_number Number of payment transactions * * @return self */ @@ -780,7 +900,7 @@ public function getFederalIncomeTaxWithheld() /** * Sets federal_income_tax_withheld * - * @param float|null $federal_income_tax_withheld federal_income_tax_withheld + * @param float|null $federal_income_tax_withheld Federal income tax withheld * * @return self */ @@ -804,7 +924,7 @@ public function getJanuary() /** * Sets january * - * @param float|null $january january + * @param float|null $january January gross payments * * @return self */ @@ -828,7 +948,7 @@ public function getFebruary() /** * Sets february * - * @param float|null $february february + * @param float|null $february February gross payments * * @return self */ @@ -852,7 +972,7 @@ public function getMarch() /** * Sets march * - * @param float|null $march march + * @param float|null $march March gross payments * * @return self */ @@ -876,7 +996,7 @@ public function getApril() /** * Sets april * - * @param float|null $april april + * @param float|null $april April gross payments * * @return self */ @@ -900,7 +1020,7 @@ public function getMay() /** * Sets may * - * @param float|null $may may + * @param float|null $may May gross payments * * @return self */ @@ -924,7 +1044,7 @@ public function getJune() /** * Sets june * - * @param float|null $june june + * @param float|null $june June gross payments * * @return self */ @@ -948,7 +1068,7 @@ public function getJuly() /** * Sets july * - * @param float|null $july july + * @param float|null $july July gross payments * * @return self */ @@ -972,7 +1092,7 @@ public function getAugust() /** * Sets august * - * @param float|null $august august + * @param float|null $august August gross payments * * @return self */ @@ -984,25 +1104,25 @@ public function setAugust($august) } /** - * Gets sept + * Gets september * * @return float|null */ - public function getSept() + public function getSeptember() { - return $this->container['sept']; + return $this->container['september']; } /** - * Sets sept + * Sets september * - * @param float|null $sept sept + * @param float|null $september September gross payments * * @return self */ - public function setSept($sept) + public function setSeptember($september) { - $this->container['sept'] = $sept; + $this->container['september'] = $september; return $this; } @@ -1020,7 +1140,7 @@ public function getOctober() /** * Sets october * - * @param float|null $october october + * @param float|null $october October gross payments * * @return self */ @@ -1044,7 +1164,7 @@ public function getNovember() /** * Sets november * - * @param float|null $november november + * @param float|null $november November gross payments * * @return self */ @@ -1068,7 +1188,7 @@ public function getDecember() /** * Sets december * - * @param float|null $december december + * @param float|null $december December gross payments * * @return self */ @@ -1080,49 +1200,59 @@ public function setDecember($december) } /** - * Gets id + * Gets type * - * @return string|null + * @return string */ - public function getId() + public function getType() { - return $this->container['id']; + return $this->container['type']; } /** - * Sets id + * Sets type * - * @param string|null $id id + * @param string $type Form type * * @return self */ - public function setId($id) + public function setType($type) { - $this->container['id'] = $id; + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; return $this; } /** - * Gets type + * Gets id * * @return string|null */ - public function getType() + public function getId() { - return $this->container['type']; + return $this->container['id']; } /** - * Sets type + * Sets id * - * @param string|null $type type + * @param string|null $id Form ID. Unique identifier set when the record is created. * * @return self */ - public function setType($type) + public function setId($id) { - $this->container['type'] = $type; + $this->container['id'] = $id; return $this; } @@ -1130,7 +1260,7 @@ public function setType($type) /** * Gets issuer_id * - * @return int|null + * @return string|null */ public function getIssuerId() { @@ -1140,7 +1270,7 @@ public function getIssuerId() /** * Sets issuer_id * - * @param int|null $issuer_id issuer_id + * @param string|null $issuer_id Issuer ID - only required when creating forms * * @return self */ @@ -1164,7 +1294,7 @@ public function getIssuerReferenceId() /** * Sets issuer_reference_id * - * @param string|null $issuer_reference_id issuer_reference_id + * @param string|null $issuer_reference_id Issuer Reference ID - only required when creating forms * * @return self */ @@ -1188,7 +1318,7 @@ public function getIssuerTin() /** * Sets issuer_tin * - * @param string|null $issuer_tin issuer_tin + * @param string|null $issuer_tin Issuer TIN - readonly * * @return self */ @@ -1212,7 +1342,7 @@ public function getTaxYear() /** * Sets tax_year * - * @param int|null $tax_year tax_year + * @param int|null $tax_year Tax Year - only required when creating forms * * @return self */ @@ -1224,555 +1354,733 @@ public function setTaxYear($tax_year) } /** - * Gets federal_efile + * Gets reference_id * - * @return bool|null + * @return string|null */ - public function getFederalEfile() + public function getReferenceId() { - return $this->container['federal_efile']; + return $this->container['reference_id']; } /** - * Sets federal_efile + * Sets reference_id * - * @param bool|null $federal_efile federal_efile + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ - public function setFederalEfile($federal_efile) + public function setReferenceId($reference_id) { - $this->container['federal_efile'] = $federal_efile; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets federal_efile_status + * Gets tin * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getFederalEfileStatus() + public function getTin() { - return $this->container['federal_efile_status']; + return $this->container['tin']; } /** - * Sets federal_efile_status + * Sets tin * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status federal_efile_status + * @param string|null $tin Recipient's Federal Tax Identification Number (TIN). * * @return self */ - public function setFederalEfileStatus($federal_efile_status) + public function setTin($tin) { - $this->container['federal_efile_status'] = $federal_efile_status; + $this->container['tin'] = $tin; return $this; } /** - * Gets state_efile + * Gets recipient_name * - * @return bool|null + * @return string */ - public function getStateEfile() + public function getRecipientName() { - return $this->container['state_efile']; + return $this->container['recipient_name']; } /** - * Sets state_efile + * Sets recipient_name * - * @param bool|null $state_efile state_efile + * @param string $recipient_name Recipient name * * @return self */ - public function setStateEfile($state_efile) + public function setRecipientName($recipient_name) { - $this->container['state_efile'] = $state_efile; + $this->container['recipient_name'] = $recipient_name; return $this; } /** - * Gets state_efile_status + * Gets tin_type * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null + * @return string|null */ - public function getStateEfileStatus() + public function getTinType() { - return $this->container['state_efile_status']; + return $this->container['tin_type']; } /** - * Sets state_efile_status + * Sets tin_type * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status state_efile_status + * @param string|null $tin_type Type of TIN (Tax ID Number) * * @return self */ - public function setStateEfileStatus($state_efile_status) + public function setTinType($tin_type) { - - - $this->container['state_efile_status'] = $state_efile_status; + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tin_type', must be one of '%s'", + $tin_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tin_type'] = $tin_type; return $this; } /** - * Gets postal_mail + * Gets recipient_second_name * - * @return bool|null + * @return string|null */ - public function getPostalMail() + public function getRecipientSecondName() { - return $this->container['postal_mail']; + return $this->container['recipient_second_name']; } /** - * Sets postal_mail + * Sets recipient_second_name * - * @param bool|null $postal_mail postal_mail + * @param string|null $recipient_second_name Recipient second name * * @return self */ - public function setPostalMail($postal_mail) + public function setRecipientSecondName($recipient_second_name) { - $this->container['postal_mail'] = $postal_mail; + $this->container['recipient_second_name'] = $recipient_second_name; return $this; } /** - * Gets postal_mail_status + * Gets address * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string */ - public function getPostalMailStatus() + public function getAddress() { - return $this->container['postal_mail_status']; + return $this->container['address']; } /** - * Sets postal_mail_status + * Sets address * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status postal_mail_status + * @param string $address Address. * * @return self */ - public function setPostalMailStatus($postal_mail_status) + public function setAddress($address) { - $this->container['postal_mail_status'] = $postal_mail_status; + $this->container['address'] = $address; return $this; } /** - * Gets tin_match + * Gets address2 * - * @return bool|null + * @return string|null */ - public function getTinMatch() + public function getAddress2() { - return $this->container['tin_match']; + return $this->container['address2']; } /** - * Sets tin_match + * Sets address2 * - * @param bool|null $tin_match tin_match + * @param string|null $address2 Address line 2. * * @return self */ - public function setTinMatch($tin_match) + public function setAddress2($address2) { - $this->container['tin_match'] = $tin_match; + $this->container['address2'] = $address2; return $this; } /** - * Gets tin_match_status + * Gets city * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string */ - public function getTinMatchStatus() + public function getCity() { - return $this->container['tin_match_status']; + return $this->container['city']; } /** - * Sets tin_match_status + * Sets city * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status tin_match_status + * @param string $city City. * * @return self */ - public function setTinMatchStatus($tin_match_status) + public function setCity($city) { - $this->container['tin_match_status'] = $tin_match_status; + $this->container['city'] = $city; return $this; } /** - * Gets address_verification + * Gets state * - * @return bool|null + * @return string|null */ - public function getAddressVerification() + public function getState() { - return $this->container['address_verification']; + return $this->container['state']; } /** - * Sets address_verification + * Sets state * - * @param bool|null $address_verification address_verification + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ - public function setAddressVerification($address_verification) + public function setState($state) { - $this->container['address_verification'] = $address_verification; + $this->container['state'] = $state; return $this; } /** - * Gets address_verification_status + * Gets zip * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getAddressVerificationStatus() + public function getZip() { - return $this->container['address_verification_status']; + return $this->container['zip']; } /** - * Sets address_verification_status + * Sets zip * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status address_verification_status + * @param string|null $zip ZIP/postal code. * * @return self */ - public function setAddressVerificationStatus($address_verification_status) + public function setZip($zip) { - $this->container['address_verification_status'] = $address_verification_status; + $this->container['zip'] = $zip; return $this; } /** - * Gets reference_id + * Gets email * * @return string|null */ - public function getReferenceId() + public function getEmail() { - return $this->container['reference_id']; + return $this->container['email']; } /** - * Sets reference_id + * Sets email * - * @param string|null $reference_id reference_id + * @param string|null $email Recipient's Contact email address. * * @return self */ - public function setReferenceId($reference_id) + public function setEmail($email) { - $this->container['reference_id'] = $reference_id; + $this->container['email'] = $email; return $this; } /** - * Gets email + * Gets account_number * * @return string|null */ - public function getEmail() + public function getAccountNumber() { - return $this->container['email']; + return $this->container['account_number']; } /** - * Sets email + * Sets account_number * - * @param string|null $email email + * @param string|null $account_number Account number * * @return self */ - public function setEmail($email) + public function setAccountNumber($account_number) { - $this->container['email'] = $email; + $this->container['account_number'] = $account_number; return $this; } /** - * Gets tin_type + * Gets office_code * * @return string|null */ - public function getTinType() + public function getOfficeCode() { - return $this->container['tin_type']; + return $this->container['office_code']; } /** - * Sets tin_type + * Sets office_code * - * @param string|null $tin_type tin_type + * @param string|null $office_code Office code * * @return self */ - public function setTinType($tin_type) + public function setOfficeCode($office_code) { - $this->container['tin_type'] = $tin_type; + $this->container['office_code'] = $office_code; return $this; } /** - * Gets tin + * Gets non_us_province * * @return string|null */ - public function getTin() + public function getNonUsProvince() { - return $this->container['tin']; + return $this->container['non_us_province']; } /** - * Sets tin + * Sets non_us_province * - * @param string|null $tin tin + * @param string|null $non_us_province Province or region for non-US/CA addresses. * * @return self */ - public function setTin($tin) + public function setNonUsProvince($non_us_province) { - $this->container['tin'] = $tin; + $this->container['non_us_province'] = $non_us_province; return $this; } /** - * Gets recipient_name + * Gets country_code * - * @return string|null + * @return string */ - public function getRecipientName() + public function getCountryCode() { - return $this->container['recipient_name']; + return $this->container['country_code']; } /** - * Sets recipient_name + * Sets country_code * - * @param string|null $recipient_name recipient_name + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ - public function setRecipientName($recipient_name) + public function setCountryCode($country_code) { - $this->container['recipient_name'] = $recipient_name; + $this->container['country_code'] = $country_code; return $this; } /** - * Gets recipient_second_name + * Gets federal_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getRecipientSecondName() + public function getFederalEfileDate() { - return $this->container['recipient_second_name']; + return $this->container['federal_efile_date']; } /** - * Sets recipient_second_name + * Sets federal_efile_date * - * @param string|null $recipient_second_name recipient_second_name + * @param \DateTime|null $federal_efile_date Date when federal e-filing should be scheduled for this form * * @return self */ - public function setRecipientSecondName($recipient_second_name) + public function setFederalEfileDate($federal_efile_date) { - $this->container['recipient_second_name'] = $recipient_second_name; + $this->container['federal_efile_date'] = $federal_efile_date; return $this; } /** - * Gets address + * Gets postal_mail * - * @return string|null + * @return bool|null */ - public function getAddress() + public function getPostalMail() { - return $this->container['address']; + return $this->container['postal_mail']; } /** - * Sets address + * Sets postal_mail * - * @param string|null $address address + * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form * * @return self */ - public function setAddress($address) + public function setPostalMail($postal_mail) { - $this->container['address'] = $address; + $this->container['postal_mail'] = $postal_mail; return $this; } /** - * Gets address2 + * Gets state_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getAddress2() + public function getStateEfileDate() { - return $this->container['address2']; + return $this->container['state_efile_date']; } /** - * Sets address2 + * Sets state_efile_date * - * @param string|null $address2 address2 + * @param \DateTime|null $state_efile_date Date when state e-filing should be scheduled for this form * * @return self */ - public function setAddress2($address2) + public function setStateEfileDate($state_efile_date) { - $this->container['address2'] = $address2; + $this->container['state_efile_date'] = $state_efile_date; return $this; } /** - * Gets city + * Gets recipient_edelivery_date * - * @return string|null + * @return \DateTime|null */ - public function getCity() + public function getRecipientEdeliveryDate() { - return $this->container['city']; + return $this->container['recipient_edelivery_date']; } /** - * Sets city + * Sets recipient_edelivery_date * - * @param string|null $city city + * @param \DateTime|null $recipient_edelivery_date Date when recipient e-delivery should be scheduled for this form * * @return self */ - public function setCity($city) + public function setRecipientEdeliveryDate($recipient_edelivery_date) { - $this->container['city'] = $city; + $this->container['recipient_edelivery_date'] = $recipient_edelivery_date; return $this; } /** - * Gets state + * Gets tin_match * - * @return string|null + * @return bool|null */ - public function getState() + public function getTinMatch() { - return $this->container['state']; + return $this->container['tin_match']; } /** - * Sets state + * Sets tin_match * - * @param string|null $state state + * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form * * @return self */ - public function setState($state) + public function setTinMatch($tin_match) { - $this->container['state'] = $state; + $this->container['tin_match'] = $tin_match; return $this; } /** - * Gets zip + * Gets no_tin * - * @return string|null + * @return bool|null */ - public function getZip() + public function getNoTin() { - return $this->container['zip']; + return $this->container['no_tin']; } /** - * Sets zip + * Sets no_tin * - * @param string|null $zip zip + * @param bool|null $no_tin No TIN indicator * * @return self */ - public function setZip($zip) + public function setNoTin($no_tin) { - $this->container['zip'] = $zip; + $this->container['no_tin'] = $no_tin; return $this; } /** - * Gets foreign_province + * Gets address_verification * - * @return string|null + * @return bool|null */ - public function getForeignProvince() + public function getAddressVerification() { - return $this->container['foreign_province']; + return $this->container['address_verification']; } /** - * Sets foreign_province + * Sets address_verification * - * @param string|null $foreign_province foreign_province + * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form * * @return self */ - public function setForeignProvince($foreign_province) + public function setAddressVerification($address_verification) { - $this->container['foreign_province'] = $foreign_province; + $this->container['address_verification'] = $address_verification; return $this; } /** - * Gets country_code + * Gets state_and_local_withholding * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null */ - public function getCountryCode() + public function getStateAndLocalWithholding() { - return $this->container['country_code']; + return $this->container['state_and_local_withholding']; } /** - * Sets country_code + * Sets state_and_local_withholding * - * @param string|null $country_code country_code + * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding State and local withholding information * * @return self */ - public function setCountryCode($country_code) + public function setStateAndLocalWithholding($state_and_local_withholding) { - $this->container['country_code'] = $country_code; + $this->container['state_and_local_withholding'] = $state_and_local_withholding; + + return $this; + } + + /** + * Gets second_tin_notice + * + * @return bool|null + */ + public function getSecondTinNotice() + { + return $this->container['second_tin_notice']; + } + + /** + * Sets second_tin_notice + * + * @param bool|null $second_tin_notice Second TIN notice + * + * @return self + */ + public function setSecondTinNotice($second_tin_notice) + { + $this->container['second_tin_notice'] = $second_tin_notice; + + return $this; + } + + /** + * Gets federal_efile_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getFederalEfileStatus() + { + return $this->container['federal_efile_status']; + } + + /** + * Sets federal_efile_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status Federal e-file status + * + * @return self + */ + public function setFederalEfileStatus($federal_efile_status) + { + $this->container['federal_efile_status'] = $federal_efile_status; + + return $this; + } + + /** + * Gets state_efile_status + * + * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null + */ + public function getStateEfileStatus() + { + return $this->container['state_efile_status']; + } + + /** + * Sets state_efile_status + * + * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status State e-file status + * + * @return self + */ + public function setStateEfileStatus($state_efile_status) + { + + + $this->container['state_efile_status'] = $state_efile_status; + + return $this; + } + + /** + * Gets postal_mail_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getPostalMailStatus() + { + return $this->container['postal_mail_status']; + } + + /** + * Sets postal_mail_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status Postal mail to recipient status + * + * @return self + */ + public function setPostalMailStatus($postal_mail_status) + { + $this->container['postal_mail_status'] = $postal_mail_status; + + return $this; + } + + /** + * Gets tin_match_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getTinMatchStatus() + { + return $this->container['tin_match_status']; + } + + /** + * Sets tin_match_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status TIN Match status + * + * @return self + */ + public function setTinMatchStatus($tin_match_status) + { + $this->container['tin_match_status'] = $tin_match_status; + + return $this; + } + + /** + * Gets address_verification_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getAddressVerificationStatus() + { + return $this->container['address_verification_status']; + } + + /** + * Sets address_verification_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status Address verification status + * + * @return self + */ + public function setAddressVerificationStatus($address_verification_status) + { + $this->container['address_verification_status'] = $address_verification_status; + + return $this; + } + + /** + * Gets e_delivery_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getEDeliveryStatus() + { + return $this->container['e_delivery_status']; + } + + /** + * Sets e_delivery_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $e_delivery_status EDelivery status + * + * @return self + */ + public function setEDeliveryStatus($e_delivery_status) + { + $this->container['e_delivery_status'] = $e_delivery_status; return $this; } @@ -1790,7 +2098,7 @@ public function getValidationErrors() /** * Sets validation_errors * - * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors validation_errors + * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors Validation errors * * @return self */ @@ -1816,7 +2124,7 @@ public function getCreatedAt() /** * Sets created_at * - * @param \DateTime|null $created_at created_at + * @param \DateTime|null $created_at Date time when the record was created. * * @return self */ @@ -1840,7 +2148,7 @@ public function getUpdatedAt() /** * Sets updated_at * - * @param \DateTime|null $updated_at updated_at + * @param \DateTime|null $updated_at Date time when the record was last updated. * * @return self */ @@ -1850,30 +2158,6 @@ public function setUpdatedAt($updated_at) return $this; } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/Form1099KList.php b/lib/Model/A1099/V2/Form1099KList.php deleted file mode 100644 index 2fb4df7..0000000 --- a/lib/Model/A1099/V2/Form1099KList.php +++ /dev/null @@ -1,364 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099KList Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099KList implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099KList'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'forms' => '\Avalara\SDK\Model\A1099\V2\Form1099KListItem[]', - 'form_type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'forms' => null, - 'form_type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'forms' => 'forms', - 'form_type' => 'formType' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'forms' => 'setForms', - 'form_type' => 'setFormType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'forms' => 'getForms', - 'form_type' => 'getFormType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['forms'] = $data['forms'] ?? null; - $this->container['form_type'] = $data['form_type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets forms - * - * @return \Avalara\SDK\Model\A1099\V2\Form1099KListItem[]|null - */ - public function getForms() - { - return $this->container['forms']; - } - - /** - * Sets forms - * - * @param \Avalara\SDK\Model\A1099\V2\Form1099KListItem[]|null $forms forms - * - * @return self - */ - public function setForms($forms) - { - - - $this->container['forms'] = $forms; - - return $this; - } - - /** - * Gets form_type - * - * @return string|null - */ - public function getFormType() - { - return $this->container['form_type']; - } - - /** - * Sets form_type - * - * @param string|null $form_type form_type - * - * @return self - */ - public function setFormType($form_type) - { - $this->container['form_type'] = $form_type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099KListItem.php b/lib/Model/A1099/V2/Form1099KListItem.php deleted file mode 100644 index 91eeebe..0000000 --- a/lib/Model/A1099/V2/Form1099KListItem.php +++ /dev/null @@ -1,1859 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099KListItem Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099KListItem implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099KListItem'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'filer_type' => 'string', - 'payment_type' => 'string', - 'payment_settlement_entity_name_phone_number' => 'string', - 'gross_amount_payment_card' => 'float', - 'card_not_present_transactions' => 'float', - 'merchant_category_code' => 'string', - 'payment_transaction_number' => 'float', - 'federal_income_tax_withheld' => 'float', - 'january' => 'float', - 'february' => 'float', - 'march' => 'float', - 'april' => 'float', - 'may' => 'float', - 'june' => 'float', - 'july' => 'float', - 'august' => 'float', - 'sept' => 'float', - 'october' => 'float', - 'november' => 'float', - 'december' => 'float', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'filer_type' => null, - 'payment_type' => null, - 'payment_settlement_entity_name_phone_number' => null, - 'gross_amount_payment_card' => 'double', - 'card_not_present_transactions' => 'double', - 'merchant_category_code' => null, - 'payment_transaction_number' => 'double', - 'federal_income_tax_withheld' => 'double', - 'january' => 'double', - 'february' => 'double', - 'march' => 'double', - 'april' => 'double', - 'may' => 'double', - 'june' => 'double', - 'july' => 'double', - 'august' => 'double', - 'sept' => 'double', - 'october' => 'double', - 'november' => 'double', - 'december' => 'double', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'filer_type' => 'filerType', - 'payment_type' => 'paymentType', - 'payment_settlement_entity_name_phone_number' => 'paymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'grossAmountPaymentCard', - 'card_not_present_transactions' => 'cardNotPresentTransactions', - 'merchant_category_code' => 'merchantCategoryCode', - 'payment_transaction_number' => 'paymentTransactionNumber', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'january' => 'january', - 'february' => 'february', - 'march' => 'march', - 'april' => 'april', - 'may' => 'may', - 'june' => 'june', - 'july' => 'july', - 'august' => 'august', - 'sept' => 'sept', - 'october' => 'october', - 'november' => 'november', - 'december' => 'december', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'filer_type' => 'setFilerType', - 'payment_type' => 'setPaymentType', - 'payment_settlement_entity_name_phone_number' => 'setPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'setGrossAmountPaymentCard', - 'card_not_present_transactions' => 'setCardNotPresentTransactions', - 'merchant_category_code' => 'setMerchantCategoryCode', - 'payment_transaction_number' => 'setPaymentTransactionNumber', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'january' => 'setJanuary', - 'february' => 'setFebruary', - 'march' => 'setMarch', - 'april' => 'setApril', - 'may' => 'setMay', - 'june' => 'setJune', - 'july' => 'setJuly', - 'august' => 'setAugust', - 'sept' => 'setSept', - 'october' => 'setOctober', - 'november' => 'setNovember', - 'december' => 'setDecember', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'filer_type' => 'getFilerType', - 'payment_type' => 'getPaymentType', - 'payment_settlement_entity_name_phone_number' => 'getPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'getGrossAmountPaymentCard', - 'card_not_present_transactions' => 'getCardNotPresentTransactions', - 'merchant_category_code' => 'getMerchantCategoryCode', - 'payment_transaction_number' => 'getPaymentTransactionNumber', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'january' => 'getJanuary', - 'february' => 'getFebruary', - 'march' => 'getMarch', - 'april' => 'getApril', - 'may' => 'getMay', - 'june' => 'getJune', - 'july' => 'getJuly', - 'august' => 'getAugust', - 'sept' => 'getSept', - 'october' => 'getOctober', - 'november' => 'getNovember', - 'december' => 'getDecember', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const FILER_TYPE_PSE = 'PSE'; - const FILER_TYPE_EPF = 'EPF'; - const FILER_TYPE_OTHER = 'Other'; - const PAYMENT_TYPE_MERCHANT_PAYMENT_CARD = 'MerchantPaymentCard'; - const PAYMENT_TYPE_THIRD_PARTY_NETWORK = 'ThirdPartyNetwork'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getFilerTypeAllowableValues() - { - return [ - self::FILER_TYPE_PSE, - self::FILER_TYPE_EPF, - self::FILER_TYPE_OTHER, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPaymentTypeAllowableValues() - { - return [ - self::PAYMENT_TYPE_MERCHANT_PAYMENT_CARD, - self::PAYMENT_TYPE_THIRD_PARTY_NETWORK, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['filer_type'] = $data['filer_type'] ?? null; - $this->container['payment_type'] = $data['payment_type'] ?? null; - $this->container['payment_settlement_entity_name_phone_number'] = $data['payment_settlement_entity_name_phone_number'] ?? null; - $this->container['gross_amount_payment_card'] = $data['gross_amount_payment_card'] ?? null; - $this->container['card_not_present_transactions'] = $data['card_not_present_transactions'] ?? null; - $this->container['merchant_category_code'] = $data['merchant_category_code'] ?? null; - $this->container['payment_transaction_number'] = $data['payment_transaction_number'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['january'] = $data['january'] ?? null; - $this->container['february'] = $data['february'] ?? null; - $this->container['march'] = $data['march'] ?? null; - $this->container['april'] = $data['april'] ?? null; - $this->container['may'] = $data['may'] ?? null; - $this->container['june'] = $data['june'] ?? null; - $this->container['july'] = $data['july'] ?? null; - $this->container['august'] = $data['august'] ?? null; - $this->container['sept'] = $data['sept'] ?? null; - $this->container['october'] = $data['october'] ?? null; - $this->container['november'] = $data['november'] ?? null; - $this->container['december'] = $data['december'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($this->container['filer_type']) && !in_array($this->container['filer_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'filer_type', must be one of '%s'", - $this->container['filer_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($this->container['payment_type']) && !in_array($this->container['payment_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'payment_type', must be one of '%s'", - $this->container['payment_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['tax_year'] === null) { - $invalidProperties[] = "'tax_year' can't be null"; - } - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets filer_type - * - * @return string|null - */ - public function getFilerType() - { - return $this->container['filer_type']; - } - - /** - * Sets filer_type - * - * @param string|null $filer_type Filer type (PSE or EPF) - * - * @return self - */ - public function setFilerType($filer_type) - { - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($filer_type) && !in_array($filer_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'filer_type', must be one of '%s'", - $filer_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['filer_type'] = $filer_type; - - return $this; - } - - /** - * Gets payment_type - * - * @return string|null - */ - public function getPaymentType() - { - return $this->container['payment_type']; - } - - /** - * Sets payment_type - * - * @param string|null $payment_type Payment type (payment card or third party network) - * - * @return self - */ - public function setPaymentType($payment_type) - { - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($payment_type) && !in_array($payment_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'payment_type', must be one of '%s'", - $payment_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['payment_type'] = $payment_type; - - return $this; - } - - /** - * Gets payment_settlement_entity_name_phone_number - * - * @return string|null - */ - public function getPaymentSettlementEntityNamePhoneNumber() - { - return $this->container['payment_settlement_entity_name_phone_number']; - } - - /** - * Sets payment_settlement_entity_name_phone_number - * - * @param string|null $payment_settlement_entity_name_phone_number Payment settlement entity name and phone number - * - * @return self - */ - public function setPaymentSettlementEntityNamePhoneNumber($payment_settlement_entity_name_phone_number) - { - $this->container['payment_settlement_entity_name_phone_number'] = $payment_settlement_entity_name_phone_number; - - return $this; - } - - /** - * Gets gross_amount_payment_card - * - * @return float|null - */ - public function getGrossAmountPaymentCard() - { - return $this->container['gross_amount_payment_card']; - } - - /** - * Sets gross_amount_payment_card - * - * @param float|null $gross_amount_payment_card Gross amount of payment card/third party network transactions - * - * @return self - */ - public function setGrossAmountPaymentCard($gross_amount_payment_card) - { - $this->container['gross_amount_payment_card'] = $gross_amount_payment_card; - - return $this; - } - - /** - * Gets card_not_present_transactions - * - * @return float|null - */ - public function getCardNotPresentTransactions() - { - return $this->container['card_not_present_transactions']; - } - - /** - * Sets card_not_present_transactions - * - * @param float|null $card_not_present_transactions Card not present transactions - * - * @return self - */ - public function setCardNotPresentTransactions($card_not_present_transactions) - { - $this->container['card_not_present_transactions'] = $card_not_present_transactions; - - return $this; - } - - /** - * Gets merchant_category_code - * - * @return string|null - */ - public function getMerchantCategoryCode() - { - return $this->container['merchant_category_code']; - } - - /** - * Sets merchant_category_code - * - * @param string|null $merchant_category_code Merchant category code - * - * @return self - */ - public function setMerchantCategoryCode($merchant_category_code) - { - $this->container['merchant_category_code'] = $merchant_category_code; - - return $this; - } - - /** - * Gets payment_transaction_number - * - * @return float|null - */ - public function getPaymentTransactionNumber() - { - return $this->container['payment_transaction_number']; - } - - /** - * Sets payment_transaction_number - * - * @param float|null $payment_transaction_number Number of payment transactions - * - * @return self - */ - public function setPaymentTransactionNumber($payment_transaction_number) - { - $this->container['payment_transaction_number'] = $payment_transaction_number; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets january - * - * @return float|null - */ - public function getJanuary() - { - return $this->container['january']; - } - - /** - * Sets january - * - * @param float|null $january January gross payments - * - * @return self - */ - public function setJanuary($january) - { - $this->container['january'] = $january; - - return $this; - } - - /** - * Gets february - * - * @return float|null - */ - public function getFebruary() - { - return $this->container['february']; - } - - /** - * Sets february - * - * @param float|null $february February gross payments - * - * @return self - */ - public function setFebruary($february) - { - $this->container['february'] = $february; - - return $this; - } - - /** - * Gets march - * - * @return float|null - */ - public function getMarch() - { - return $this->container['march']; - } - - /** - * Sets march - * - * @param float|null $march March gross payments - * - * @return self - */ - public function setMarch($march) - { - $this->container['march'] = $march; - - return $this; - } - - /** - * Gets april - * - * @return float|null - */ - public function getApril() - { - return $this->container['april']; - } - - /** - * Sets april - * - * @param float|null $april April gross payments - * - * @return self - */ - public function setApril($april) - { - $this->container['april'] = $april; - - return $this; - } - - /** - * Gets may - * - * @return float|null - */ - public function getMay() - { - return $this->container['may']; - } - - /** - * Sets may - * - * @param float|null $may May gross payments - * - * @return self - */ - public function setMay($may) - { - $this->container['may'] = $may; - - return $this; - } - - /** - * Gets june - * - * @return float|null - */ - public function getJune() - { - return $this->container['june']; - } - - /** - * Sets june - * - * @param float|null $june June gross payments - * - * @return self - */ - public function setJune($june) - { - $this->container['june'] = $june; - - return $this; - } - - /** - * Gets july - * - * @return float|null - */ - public function getJuly() - { - return $this->container['july']; - } - - /** - * Sets july - * - * @param float|null $july July gross payments - * - * @return self - */ - public function setJuly($july) - { - $this->container['july'] = $july; - - return $this; - } - - /** - * Gets august - * - * @return float|null - */ - public function getAugust() - { - return $this->container['august']; - } - - /** - * Sets august - * - * @param float|null $august August gross payments - * - * @return self - */ - public function setAugust($august) - { - $this->container['august'] = $august; - - return $this; - } - - /** - * Gets sept - * - * @return float|null - */ - public function getSept() - { - return $this->container['sept']; - } - - /** - * Sets sept - * - * @param float|null $sept September gross payments - * - * @return self - */ - public function setSept($sept) - { - $this->container['sept'] = $sept; - - return $this; - } - - /** - * Gets october - * - * @return float|null - */ - public function getOctober() - { - return $this->container['october']; - } - - /** - * Sets october - * - * @param float|null $october October gross payments - * - * @return self - */ - public function setOctober($october) - { - $this->container['october'] = $october; - - return $this; - } - - /** - * Gets november - * - * @return float|null - */ - public function getNovember() - { - return $this->container['november']; - } - - /** - * Sets november - * - * @param float|null $november November gross payments - * - * @return self - */ - public function setNovember($november) - { - $this->container['november'] = $november; - - return $this; - } - - /** - * Gets december - * - * @return float|null - */ - public function getDecember() - { - return $this->container['december']; - } - - /** - * Sets december - * - * @param float|null $december December gross payments - * - * @return self - */ - public function setDecember($december) - { - $this->container['december'] = $december; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1099KListItem., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1099KListItem., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1099KListItem., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099KListItemResponse.php b/lib/Model/A1099/V2/Form1099KListItemResponse.php deleted file mode 100644 index 53884be..0000000 --- a/lib/Model/A1099/V2/Form1099KListItemResponse.php +++ /dev/null @@ -1,2188 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099KListItemResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099KListItemResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099KListItemResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'filer_type' => 'string', - 'payment_type' => 'string', - 'payment_settlement_entity_name_phone_number' => 'string', - 'gross_amount_payment_card' => 'float', - 'card_not_present_transactions' => 'float', - 'merchant_category_code' => 'string', - 'payment_transaction_number' => 'float', - 'federal_income_tax_withheld' => 'float', - 'january' => 'float', - 'february' => 'float', - 'march' => 'float', - 'april' => 'float', - 'may' => 'float', - 'june' => 'float', - 'july' => 'float', - 'august' => 'float', - 'sept' => 'float', - 'october' => 'float', - 'november' => 'float', - 'december' => 'float', - 'id' => 'string', - 'type' => 'string', - 'issuer_id' => 'int', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', - 'tin' => 'string', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'recipient_name' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'fatca_filing_requirement' => 'bool', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'filer_type' => null, - 'payment_type' => null, - 'payment_settlement_entity_name_phone_number' => null, - 'gross_amount_payment_card' => 'double', - 'card_not_present_transactions' => 'double', - 'merchant_category_code' => null, - 'payment_transaction_number' => 'double', - 'federal_income_tax_withheld' => 'double', - 'january' => 'double', - 'february' => 'double', - 'march' => 'double', - 'april' => 'double', - 'may' => 'double', - 'june' => 'double', - 'july' => 'double', - 'august' => 'double', - 'sept' => 'double', - 'october' => 'double', - 'november' => 'double', - 'december' => 'double', - 'id' => null, - 'type' => null, - 'issuer_id' => 'int32', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, - 'e_delivery_status' => null, - 'reference_id' => null, - 'email' => null, - 'tin_type' => null, - 'tin' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'recipient_name' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'non_us_province' => null, - 'country_code' => null, - 'account_number' => null, - 'office_code' => null, - 'fatca_filing_requirement' => null, - 'validation_errors' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'filer_type' => 'filerType', - 'payment_type' => 'paymentType', - 'payment_settlement_entity_name_phone_number' => 'paymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'grossAmountPaymentCard', - 'card_not_present_transactions' => 'cardNotPresentTransactions', - 'merchant_category_code' => 'merchantCategoryCode', - 'payment_transaction_number' => 'paymentTransactionNumber', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'january' => 'january', - 'february' => 'february', - 'march' => 'march', - 'april' => 'april', - 'may' => 'may', - 'june' => 'june', - 'july' => 'july', - 'august' => 'august', - 'sept' => 'sept', - 'october' => 'october', - 'november' => 'november', - 'december' => 'december', - 'id' => 'id', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', - 'tin' => 'tin', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'recipient_name' => 'recipientName', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'validation_errors' => 'validationErrors', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'filer_type' => 'setFilerType', - 'payment_type' => 'setPaymentType', - 'payment_settlement_entity_name_phone_number' => 'setPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'setGrossAmountPaymentCard', - 'card_not_present_transactions' => 'setCardNotPresentTransactions', - 'merchant_category_code' => 'setMerchantCategoryCode', - 'payment_transaction_number' => 'setPaymentTransactionNumber', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'january' => 'setJanuary', - 'february' => 'setFebruary', - 'march' => 'setMarch', - 'april' => 'setApril', - 'may' => 'setMay', - 'june' => 'setJune', - 'july' => 'setJuly', - 'august' => 'setAugust', - 'sept' => 'setSept', - 'october' => 'setOctober', - 'november' => 'setNovember', - 'december' => 'setDecember', - 'id' => 'setId', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', - 'tin' => 'setTin', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'recipient_name' => 'setRecipientName', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'validation_errors' => 'setValidationErrors', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'filer_type' => 'getFilerType', - 'payment_type' => 'getPaymentType', - 'payment_settlement_entity_name_phone_number' => 'getPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'getGrossAmountPaymentCard', - 'card_not_present_transactions' => 'getCardNotPresentTransactions', - 'merchant_category_code' => 'getMerchantCategoryCode', - 'payment_transaction_number' => 'getPaymentTransactionNumber', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'january' => 'getJanuary', - 'february' => 'getFebruary', - 'march' => 'getMarch', - 'april' => 'getApril', - 'may' => 'getMay', - 'june' => 'getJune', - 'july' => 'getJuly', - 'august' => 'getAugust', - 'sept' => 'getSept', - 'october' => 'getOctober', - 'november' => 'getNovember', - 'december' => 'getDecember', - 'id' => 'getId', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', - 'tin' => 'getTin', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'recipient_name' => 'getRecipientName', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'validation_errors' => 'getValidationErrors', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const FILER_TYPE_PSE = 'PSE'; - const FILER_TYPE_EPF = 'EPF'; - const FILER_TYPE_OTHER = 'Other'; - const PAYMENT_TYPE_MERCHANT_PAYMENT_CARD = 'MerchantPaymentCard'; - const PAYMENT_TYPE_THIRD_PARTY_NETWORK = 'ThirdPartyNetwork'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getFilerTypeAllowableValues() - { - return [ - self::FILER_TYPE_PSE, - self::FILER_TYPE_EPF, - self::FILER_TYPE_OTHER, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPaymentTypeAllowableValues() - { - return [ - self::PAYMENT_TYPE_MERCHANT_PAYMENT_CARD, - self::PAYMENT_TYPE_THIRD_PARTY_NETWORK, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['filer_type'] = $data['filer_type'] ?? null; - $this->container['payment_type'] = $data['payment_type'] ?? null; - $this->container['payment_settlement_entity_name_phone_number'] = $data['payment_settlement_entity_name_phone_number'] ?? null; - $this->container['gross_amount_payment_card'] = $data['gross_amount_payment_card'] ?? null; - $this->container['card_not_present_transactions'] = $data['card_not_present_transactions'] ?? null; - $this->container['merchant_category_code'] = $data['merchant_category_code'] ?? null; - $this->container['payment_transaction_number'] = $data['payment_transaction_number'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['january'] = $data['january'] ?? null; - $this->container['february'] = $data['february'] ?? null; - $this->container['march'] = $data['march'] ?? null; - $this->container['april'] = $data['april'] ?? null; - $this->container['may'] = $data['may'] ?? null; - $this->container['june'] = $data['june'] ?? null; - $this->container['july'] = $data['july'] ?? null; - $this->container['august'] = $data['august'] ?? null; - $this->container['sept'] = $data['sept'] ?? null; - $this->container['october'] = $data['october'] ?? null; - $this->container['november'] = $data['november'] ?? null; - $this->container['december'] = $data['december'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($this->container['filer_type']) && !in_array($this->container['filer_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'filer_type', must be one of '%s'", - $this->container['filer_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($this->container['payment_type']) && !in_array($this->container['payment_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'payment_type', must be one of '%s'", - $this->container['payment_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ((mb_strlen($this->container['id']) < 1)) { - $invalidProperties[] = "invalid value for 'id', the character length must be bigger than or equal to 1."; - } - - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ((mb_strlen($this->container['type']) < 1)) { - $invalidProperties[] = "invalid value for 'type', the character length must be bigger than or equal to 1."; - } - - if ($this->container['issuer_id'] === null) { - $invalidProperties[] = "'issuer_id' can't be null"; - } - if ($this->container['federal_efile'] === null) { - $invalidProperties[] = "'federal_efile' can't be null"; - } - if ($this->container['state_efile'] === null) { - $invalidProperties[] = "'state_efile' can't be null"; - } - if ($this->container['postal_mail'] === null) { - $invalidProperties[] = "'postal_mail' can't be null"; - } - if ($this->container['tin_match'] === null) { - $invalidProperties[] = "'tin_match' can't be null"; - } - if ($this->container['address_verification'] === null) { - $invalidProperties[] = "'address_verification' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets filer_type - * - * @return string|null - */ - public function getFilerType() - { - return $this->container['filer_type']; - } - - /** - * Sets filer_type - * - * @param string|null $filer_type Filer type (PSE or EPF) - * - * @return self - */ - public function setFilerType($filer_type) - { - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($filer_type) && !in_array($filer_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'filer_type', must be one of '%s'", - $filer_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['filer_type'] = $filer_type; - - return $this; - } - - /** - * Gets payment_type - * - * @return string|null - */ - public function getPaymentType() - { - return $this->container['payment_type']; - } - - /** - * Sets payment_type - * - * @param string|null $payment_type Payment type (payment card or third party network) - * - * @return self - */ - public function setPaymentType($payment_type) - { - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($payment_type) && !in_array($payment_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'payment_type', must be one of '%s'", - $payment_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['payment_type'] = $payment_type; - - return $this; - } - - /** - * Gets payment_settlement_entity_name_phone_number - * - * @return string|null - */ - public function getPaymentSettlementEntityNamePhoneNumber() - { - return $this->container['payment_settlement_entity_name_phone_number']; - } - - /** - * Sets payment_settlement_entity_name_phone_number - * - * @param string|null $payment_settlement_entity_name_phone_number Payment settlement entity name and phone number - * - * @return self - */ - public function setPaymentSettlementEntityNamePhoneNumber($payment_settlement_entity_name_phone_number) - { - $this->container['payment_settlement_entity_name_phone_number'] = $payment_settlement_entity_name_phone_number; - - return $this; - } - - /** - * Gets gross_amount_payment_card - * - * @return float|null - */ - public function getGrossAmountPaymentCard() - { - return $this->container['gross_amount_payment_card']; - } - - /** - * Sets gross_amount_payment_card - * - * @param float|null $gross_amount_payment_card Gross amount of payment card/third party network transactions - * - * @return self - */ - public function setGrossAmountPaymentCard($gross_amount_payment_card) - { - $this->container['gross_amount_payment_card'] = $gross_amount_payment_card; - - return $this; - } - - /** - * Gets card_not_present_transactions - * - * @return float|null - */ - public function getCardNotPresentTransactions() - { - return $this->container['card_not_present_transactions']; - } - - /** - * Sets card_not_present_transactions - * - * @param float|null $card_not_present_transactions Card not present transactions - * - * @return self - */ - public function setCardNotPresentTransactions($card_not_present_transactions) - { - $this->container['card_not_present_transactions'] = $card_not_present_transactions; - - return $this; - } - - /** - * Gets merchant_category_code - * - * @return string|null - */ - public function getMerchantCategoryCode() - { - return $this->container['merchant_category_code']; - } - - /** - * Sets merchant_category_code - * - * @param string|null $merchant_category_code Merchant category code - * - * @return self - */ - public function setMerchantCategoryCode($merchant_category_code) - { - $this->container['merchant_category_code'] = $merchant_category_code; - - return $this; - } - - /** - * Gets payment_transaction_number - * - * @return float|null - */ - public function getPaymentTransactionNumber() - { - return $this->container['payment_transaction_number']; - } - - /** - * Sets payment_transaction_number - * - * @param float|null $payment_transaction_number Number of payment transactions - * - * @return self - */ - public function setPaymentTransactionNumber($payment_transaction_number) - { - $this->container['payment_transaction_number'] = $payment_transaction_number; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets january - * - * @return float|null - */ - public function getJanuary() - { - return $this->container['january']; - } - - /** - * Sets january - * - * @param float|null $january January gross payments - * - * @return self - */ - public function setJanuary($january) - { - $this->container['january'] = $january; - - return $this; - } - - /** - * Gets february - * - * @return float|null - */ - public function getFebruary() - { - return $this->container['february']; - } - - /** - * Sets february - * - * @param float|null $february February gross payments - * - * @return self - */ - public function setFebruary($february) - { - $this->container['february'] = $february; - - return $this; - } - - /** - * Gets march - * - * @return float|null - */ - public function getMarch() - { - return $this->container['march']; - } - - /** - * Sets march - * - * @param float|null $march March gross payments - * - * @return self - */ - public function setMarch($march) - { - $this->container['march'] = $march; - - return $this; - } - - /** - * Gets april - * - * @return float|null - */ - public function getApril() - { - return $this->container['april']; - } - - /** - * Sets april - * - * @param float|null $april April gross payments - * - * @return self - */ - public function setApril($april) - { - $this->container['april'] = $april; - - return $this; - } - - /** - * Gets may - * - * @return float|null - */ - public function getMay() - { - return $this->container['may']; - } - - /** - * Sets may - * - * @param float|null $may May gross payments - * - * @return self - */ - public function setMay($may) - { - $this->container['may'] = $may; - - return $this; - } - - /** - * Gets june - * - * @return float|null - */ - public function getJune() - { - return $this->container['june']; - } - - /** - * Sets june - * - * @param float|null $june June gross payments - * - * @return self - */ - public function setJune($june) - { - $this->container['june'] = $june; - - return $this; - } - - /** - * Gets july - * - * @return float|null - */ - public function getJuly() - { - return $this->container['july']; - } - - /** - * Sets july - * - * @param float|null $july July gross payments - * - * @return self - */ - public function setJuly($july) - { - $this->container['july'] = $july; - - return $this; - } - - /** - * Gets august - * - * @return float|null - */ - public function getAugust() - { - return $this->container['august']; - } - - /** - * Sets august - * - * @param float|null $august August gross payments - * - * @return self - */ - public function setAugust($august) - { - $this->container['august'] = $august; - - return $this; - } - - /** - * Gets sept - * - * @return float|null - */ - public function getSept() - { - return $this->container['sept']; - } - - /** - * Sets sept - * - * @param float|null $sept September gross payments - * - * @return self - */ - public function setSept($sept) - { - $this->container['sept'] = $sept; - - return $this; - } - - /** - * Gets october - * - * @return float|null - */ - public function getOctober() - { - return $this->container['october']; - } - - /** - * Sets october - * - * @param float|null $october October gross payments - * - * @return self - */ - public function setOctober($october) - { - $this->container['october'] = $october; - - return $this; - } - - /** - * Gets november - * - * @return float|null - */ - public function getNovember() - { - return $this->container['november']; - } - - /** - * Sets november - * - * @param float|null $november November gross payments - * - * @return self - */ - public function setNovember($november) - { - $this->container['november'] = $november; - - return $this; - } - - /** - * Gets december - * - * @return float|null - */ - public function getDecember() - { - return $this->container['december']; - } - - /** - * Sets december - * - * @param float|null $december December gross payments - * - * @return self - */ - public function setDecember($december) - { - $this->container['december'] = $december; - - return $this; - } - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID of the form - * - * @return self - */ - public function setId($id) - { - - if ((mb_strlen($id) < 1)) { - throw new \InvalidArgumentException('invalid length for $id when calling Form1099KListItemResponse., must be bigger than or equal to 1.'); - } - - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * - * @return self - */ - public function setType($type) - { - - if ((mb_strlen($type) < 1)) { - throw new \InvalidArgumentException('invalid length for $type when calling Form1099KListItemResponse., must be bigger than or equal to 1.'); - } - - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return int - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param int $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets federal_efile - * - * @return bool - */ - public function getFederalEfile() - { - return $this->container['federal_efile']; - } - - /** - * Sets federal_efile - * - * @param bool $federal_efile Boolean indicating that federal e-filing has been scheduled for this form - * - * @return self - */ - public function setFederalEfile($federal_efile) - { - $this->container['federal_efile'] = $federal_efile; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status Federal e-file status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets state_efile - * - * @return bool - */ - public function getStateEfile() - { - return $this->container['state_efile']; - } - - /** - * Sets state_efile - * - * @param bool $state_efile Boolean indicating that state e-filing has been scheduled for this form - * - * @return self - */ - public function setStateEfile($state_efile) - { - $this->container['state_efile'] = $state_efile; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status State e-file status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool $postal_mail Boolean indicating that postal mailing to the recipient has been scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status Postal mail to recipient status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool $tin_match Boolean indicating that TIN Matching has been scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status TIN Match status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool $address_verification Boolean indicating that address verification has been scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status Address verification status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status EDelivery status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin Recipient Tax ID Number - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second Tin Notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address Address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city City - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account Number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office Code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors Validation errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Creation time - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Update time - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099KRequest.php b/lib/Model/A1099/V2/Form1099KRequest.php deleted file mode 100644 index a413729..0000000 --- a/lib/Model/A1099/V2/Form1099KRequest.php +++ /dev/null @@ -1,1842 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099KRequest Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099KRequest implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099KRequest'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'filer_type' => 'string', - 'payment_type' => 'string', - 'payment_settlement_entity_name_phone_number' => 'string', - 'gross_amount_payment_card' => 'float', - 'card_not_present_transactions' => 'float', - 'merchant_category_code' => 'string', - 'payment_transaction_number' => 'float', - 'federal_income_tax_withheld' => 'float', - 'january' => 'float', - 'february' => 'float', - 'march' => 'float', - 'april' => 'float', - 'may' => 'float', - 'june' => 'float', - 'july' => 'float', - 'august' => 'float', - 'sept' => 'float', - 'october' => 'float', - 'november' => 'float', - 'december' => 'float', - 'type' => 'string', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'filer_type' => null, - 'payment_type' => null, - 'payment_settlement_entity_name_phone_number' => null, - 'gross_amount_payment_card' => 'double', - 'card_not_present_transactions' => 'double', - 'merchant_category_code' => null, - 'payment_transaction_number' => 'double', - 'federal_income_tax_withheld' => 'double', - 'january' => 'double', - 'february' => 'double', - 'march' => 'double', - 'april' => 'double', - 'may' => 'double', - 'june' => 'double', - 'july' => 'double', - 'august' => 'double', - 'sept' => 'double', - 'october' => 'double', - 'november' => 'double', - 'december' => 'double', - 'type' => null, - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'filer_type' => 'filerType', - 'payment_type' => 'paymentType', - 'payment_settlement_entity_name_phone_number' => 'paymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'grossAmountPaymentCard', - 'card_not_present_transactions' => 'cardNotPresentTransactions', - 'merchant_category_code' => 'merchantCategoryCode', - 'payment_transaction_number' => 'paymentTransactionNumber', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'january' => 'january', - 'february' => 'february', - 'march' => 'march', - 'april' => 'april', - 'may' => 'may', - 'june' => 'june', - 'july' => 'july', - 'august' => 'august', - 'sept' => 'sept', - 'october' => 'october', - 'november' => 'november', - 'december' => 'december', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'filer_type' => 'setFilerType', - 'payment_type' => 'setPaymentType', - 'payment_settlement_entity_name_phone_number' => 'setPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'setGrossAmountPaymentCard', - 'card_not_present_transactions' => 'setCardNotPresentTransactions', - 'merchant_category_code' => 'setMerchantCategoryCode', - 'payment_transaction_number' => 'setPaymentTransactionNumber', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'january' => 'setJanuary', - 'february' => 'setFebruary', - 'march' => 'setMarch', - 'april' => 'setApril', - 'may' => 'setMay', - 'june' => 'setJune', - 'july' => 'setJuly', - 'august' => 'setAugust', - 'sept' => 'setSept', - 'october' => 'setOctober', - 'november' => 'setNovember', - 'december' => 'setDecember', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'filer_type' => 'getFilerType', - 'payment_type' => 'getPaymentType', - 'payment_settlement_entity_name_phone_number' => 'getPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'getGrossAmountPaymentCard', - 'card_not_present_transactions' => 'getCardNotPresentTransactions', - 'merchant_category_code' => 'getMerchantCategoryCode', - 'payment_transaction_number' => 'getPaymentTransactionNumber', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'january' => 'getJanuary', - 'february' => 'getFebruary', - 'march' => 'getMarch', - 'april' => 'getApril', - 'may' => 'getMay', - 'june' => 'getJune', - 'july' => 'getJuly', - 'august' => 'getAugust', - 'sept' => 'getSept', - 'october' => 'getOctober', - 'november' => 'getNovember', - 'december' => 'getDecember', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const FILER_TYPE_PSE = 'PSE'; - const FILER_TYPE_EPF = 'EPF'; - const FILER_TYPE_OTHER = 'Other'; - const PAYMENT_TYPE_MERCHANT_PAYMENT_CARD = 'MerchantPaymentCard'; - const PAYMENT_TYPE_THIRD_PARTY_NETWORK = 'ThirdPartyNetwork'; - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getFilerTypeAllowableValues() - { - return [ - self::FILER_TYPE_PSE, - self::FILER_TYPE_EPF, - self::FILER_TYPE_OTHER, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPaymentTypeAllowableValues() - { - return [ - self::PAYMENT_TYPE_MERCHANT_PAYMENT_CARD, - self::PAYMENT_TYPE_THIRD_PARTY_NETWORK, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['filer_type'] = $data['filer_type'] ?? null; - $this->container['payment_type'] = $data['payment_type'] ?? null; - $this->container['payment_settlement_entity_name_phone_number'] = $data['payment_settlement_entity_name_phone_number'] ?? null; - $this->container['gross_amount_payment_card'] = $data['gross_amount_payment_card'] ?? null; - $this->container['card_not_present_transactions'] = $data['card_not_present_transactions'] ?? null; - $this->container['merchant_category_code'] = $data['merchant_category_code'] ?? null; - $this->container['payment_transaction_number'] = $data['payment_transaction_number'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['january'] = $data['january'] ?? null; - $this->container['february'] = $data['february'] ?? null; - $this->container['march'] = $data['march'] ?? null; - $this->container['april'] = $data['april'] ?? null; - $this->container['may'] = $data['may'] ?? null; - $this->container['june'] = $data['june'] ?? null; - $this->container['july'] = $data['july'] ?? null; - $this->container['august'] = $data['august'] ?? null; - $this->container['sept'] = $data['sept'] ?? null; - $this->container['october'] = $data['october'] ?? null; - $this->container['november'] = $data['november'] ?? null; - $this->container['december'] = $data['december'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($this->container['filer_type']) && !in_array($this->container['filer_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'filer_type', must be one of '%s'", - $this->container['filer_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($this->container['payment_type']) && !in_array($this->container['payment_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'payment_type', must be one of '%s'", - $this->container['payment_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets filer_type - * - * @return string|null - */ - public function getFilerType() - { - return $this->container['filer_type']; - } - - /** - * Sets filer_type - * - * @param string|null $filer_type Filer type (PSE or EPF) - * - * @return self - */ - public function setFilerType($filer_type) - { - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($filer_type) && !in_array($filer_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'filer_type', must be one of '%s'", - $filer_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['filer_type'] = $filer_type; - - return $this; - } - - /** - * Gets payment_type - * - * @return string|null - */ - public function getPaymentType() - { - return $this->container['payment_type']; - } - - /** - * Sets payment_type - * - * @param string|null $payment_type Payment type (payment card or third party network) - * - * @return self - */ - public function setPaymentType($payment_type) - { - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($payment_type) && !in_array($payment_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'payment_type', must be one of '%s'", - $payment_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['payment_type'] = $payment_type; - - return $this; - } - - /** - * Gets payment_settlement_entity_name_phone_number - * - * @return string|null - */ - public function getPaymentSettlementEntityNamePhoneNumber() - { - return $this->container['payment_settlement_entity_name_phone_number']; - } - - /** - * Sets payment_settlement_entity_name_phone_number - * - * @param string|null $payment_settlement_entity_name_phone_number Payment settlement entity name and phone number - * - * @return self - */ - public function setPaymentSettlementEntityNamePhoneNumber($payment_settlement_entity_name_phone_number) - { - $this->container['payment_settlement_entity_name_phone_number'] = $payment_settlement_entity_name_phone_number; - - return $this; - } - - /** - * Gets gross_amount_payment_card - * - * @return float|null - */ - public function getGrossAmountPaymentCard() - { - return $this->container['gross_amount_payment_card']; - } - - /** - * Sets gross_amount_payment_card - * - * @param float|null $gross_amount_payment_card Gross amount of payment card/third party network transactions - * - * @return self - */ - public function setGrossAmountPaymentCard($gross_amount_payment_card) - { - $this->container['gross_amount_payment_card'] = $gross_amount_payment_card; - - return $this; - } - - /** - * Gets card_not_present_transactions - * - * @return float|null - */ - public function getCardNotPresentTransactions() - { - return $this->container['card_not_present_transactions']; - } - - /** - * Sets card_not_present_transactions - * - * @param float|null $card_not_present_transactions Card not present transactions - * - * @return self - */ - public function setCardNotPresentTransactions($card_not_present_transactions) - { - $this->container['card_not_present_transactions'] = $card_not_present_transactions; - - return $this; - } - - /** - * Gets merchant_category_code - * - * @return string|null - */ - public function getMerchantCategoryCode() - { - return $this->container['merchant_category_code']; - } - - /** - * Sets merchant_category_code - * - * @param string|null $merchant_category_code Merchant category code - * - * @return self - */ - public function setMerchantCategoryCode($merchant_category_code) - { - $this->container['merchant_category_code'] = $merchant_category_code; - - return $this; - } - - /** - * Gets payment_transaction_number - * - * @return float|null - */ - public function getPaymentTransactionNumber() - { - return $this->container['payment_transaction_number']; - } - - /** - * Sets payment_transaction_number - * - * @param float|null $payment_transaction_number Number of payment transactions - * - * @return self - */ - public function setPaymentTransactionNumber($payment_transaction_number) - { - $this->container['payment_transaction_number'] = $payment_transaction_number; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets january - * - * @return float|null - */ - public function getJanuary() - { - return $this->container['january']; - } - - /** - * Sets january - * - * @param float|null $january January gross payments - * - * @return self - */ - public function setJanuary($january) - { - $this->container['january'] = $january; - - return $this; - } - - /** - * Gets february - * - * @return float|null - */ - public function getFebruary() - { - return $this->container['february']; - } - - /** - * Sets february - * - * @param float|null $february February gross payments - * - * @return self - */ - public function setFebruary($february) - { - $this->container['february'] = $february; - - return $this; - } - - /** - * Gets march - * - * @return float|null - */ - public function getMarch() - { - return $this->container['march']; - } - - /** - * Sets march - * - * @param float|null $march March gross payments - * - * @return self - */ - public function setMarch($march) - { - $this->container['march'] = $march; - - return $this; - } - - /** - * Gets april - * - * @return float|null - */ - public function getApril() - { - return $this->container['april']; - } - - /** - * Sets april - * - * @param float|null $april April gross payments - * - * @return self - */ - public function setApril($april) - { - $this->container['april'] = $april; - - return $this; - } - - /** - * Gets may - * - * @return float|null - */ - public function getMay() - { - return $this->container['may']; - } - - /** - * Sets may - * - * @param float|null $may May gross payments - * - * @return self - */ - public function setMay($may) - { - $this->container['may'] = $may; - - return $this; - } - - /** - * Gets june - * - * @return float|null - */ - public function getJune() - { - return $this->container['june']; - } - - /** - * Sets june - * - * @param float|null $june June gross payments - * - * @return self - */ - public function setJune($june) - { - $this->container['june'] = $june; - - return $this; - } - - /** - * Gets july - * - * @return float|null - */ - public function getJuly() - { - return $this->container['july']; - } - - /** - * Sets july - * - * @param float|null $july July gross payments - * - * @return self - */ - public function setJuly($july) - { - $this->container['july'] = $july; - - return $this; - } - - /** - * Gets august - * - * @return float|null - */ - public function getAugust() - { - return $this->container['august']; - } - - /** - * Sets august - * - * @param float|null $august August gross payments - * - * @return self - */ - public function setAugust($august) - { - $this->container['august'] = $august; - - return $this; - } - - /** - * Gets sept - * - * @return float|null - */ - public function getSept() - { - return $this->container['sept']; - } - - /** - * Sets sept - * - * @param float|null $sept September gross payments - * - * @return self - */ - public function setSept($sept) - { - $this->container['sept'] = $sept; - - return $this; - } - - /** - * Gets october - * - * @return float|null - */ - public function getOctober() - { - return $this->container['october']; - } - - /** - * Sets october - * - * @param float|null $october October gross payments - * - * @return self - */ - public function setOctober($october) - { - $this->container['october'] = $october; - - return $this; - } - - /** - * Gets november - * - * @return float|null - */ - public function getNovember() - { - return $this->container['november']; - } - - /** - * Sets november - * - * @param float|null $november November gross payments - * - * @return self - */ - public function setNovember($november) - { - $this->container['november'] = $november; - - return $this; - } - - /** - * Gets december - * - * @return float|null - */ - public function getDecember() - { - return $this->container['december']; - } - - /** - * Sets december - * - * @param float|null $december December gross payments - * - * @return self - */ - public function setDecember($december) - { - $this->container['december'] = $december; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1099KRequest., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1099KRequest., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1099KRequest., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099List.php b/lib/Model/A1099/V2/Form1099List.php deleted file mode 100644 index 9648283..0000000 --- a/lib/Model/A1099/V2/Form1099List.php +++ /dev/null @@ -1,334 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099List Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099List implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099List'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'data' => '\Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'data' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'data' => 'data' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'data' => 'setData' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'data' => 'getData' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = $data['data'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets data - * - * @return \Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]|null $data data - * - * @return self - */ - public function setData($data) - { - - - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099ListDataInner.php b/lib/Model/A1099/V2/Form1099ListDataInner.php deleted file mode 100644 index 6708fba..0000000 --- a/lib/Model/A1099/V2/Form1099ListDataInner.php +++ /dev/null @@ -1,2956 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099ListDataInner Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099ListDataInner implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099List_data_inner'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'filer_type' => 'string', - 'payment_type' => 'string', - 'payment_settlement_entity_name_phone_number' => 'string', - 'gross_amount_payment_card' => 'float', - 'card_not_present_transactions' => 'float', - 'merchant_category_code' => 'string', - 'payment_transaction_number' => 'float', - 'federal_income_tax_withheld' => 'float', - 'january' => 'float', - 'february' => 'float', - 'march' => 'float', - 'april' => 'float', - 'may' => 'float', - 'june' => 'float', - 'july' => 'float', - 'august' => 'float', - 'sept' => 'float', - 'october' => 'float', - 'november' => 'float', - 'december' => 'float', - 'id' => 'string', - 'type' => 'string', - 'issuer_id' => 'int', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'reference_id' => 'string', - 'email' => 'string', - 'type_of_tin' => 'string', - 'tin' => 'string', - 'first_payee_name' => 'string', - 'second_payee_name' => 'string', - 'address' => 'string', - 'address_recipient_second' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'foreign_province' => 'string', - 'country_code' => 'string', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationError[]', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding', - 'rents' => 'float', - 'royalties' => 'float', - 'other_income' => 'float', - 'fed_income_tax_withheld' => 'float', - 'fishing_boat_proceeds' => 'float', - 'medical_and_health_care' => 'float', - 'nonemployee_compensation' => 'float', - 'substitute_payments' => 'float', - 'direct_sales_indicator' => 'bool', - 'crop_insurance_proceeds' => 'float', - 'excess_golden_parachute' => 'float', - 'gross_amount_paid_attorney' => 'float', - 'section409_a_deferrals' => 'float', - 'section409_a_income' => 'float', - 'gross_distributions' => 'float', - 'taxable_amount' => 'float', - 'taxable_amount_not_determined' => 'bool', - 'total_distribution_indicator' => 'bool', - 'capital_gain' => 'float', - 'employee_contributions' => 'float', - 'net_unrealized_appreciation' => 'float', - 'distribution_code_required' => 'string', - 'distribution_code_optional' => 'string', - 'ira_sep_simple_indicator' => 'bool', - 'total_ira_sep_simple_distribution' => 'float', - 'other' => 'float', - 'other_percent' => 'string', - 'percentage_total_distribution' => 'string', - 'total_employee_contributions' => 'float', - 'amount_allocable_to_irr' => 'float', - 'first_year_designated_roth_contrib' => 'string', - 'fatca_requirement_indicator' => 'bool', - 'date_of_payment' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'filer_type' => null, - 'payment_type' => null, - 'payment_settlement_entity_name_phone_number' => null, - 'gross_amount_payment_card' => 'double', - 'card_not_present_transactions' => 'double', - 'merchant_category_code' => null, - 'payment_transaction_number' => 'double', - 'federal_income_tax_withheld' => 'double', - 'january' => 'double', - 'february' => 'double', - 'march' => 'double', - 'april' => 'double', - 'may' => 'double', - 'june' => 'double', - 'july' => 'double', - 'august' => 'double', - 'sept' => 'double', - 'october' => 'double', - 'november' => 'double', - 'december' => 'double', - 'id' => null, - 'type' => null, - 'issuer_id' => 'int32', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, - 'reference_id' => null, - 'email' => null, - 'type_of_tin' => null, - 'tin' => null, - 'first_payee_name' => null, - 'second_payee_name' => null, - 'address' => null, - 'address_recipient_second' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'foreign_province' => null, - 'country_code' => null, - 'validation_errors' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null, - 'rents' => 'double', - 'royalties' => 'double', - 'other_income' => 'double', - 'fed_income_tax_withheld' => 'double', - 'fishing_boat_proceeds' => 'double', - 'medical_and_health_care' => 'double', - 'nonemployee_compensation' => 'double', - 'substitute_payments' => 'double', - 'direct_sales_indicator' => null, - 'crop_insurance_proceeds' => 'double', - 'excess_golden_parachute' => 'double', - 'gross_amount_paid_attorney' => 'double', - 'section409_a_deferrals' => 'double', - 'section409_a_income' => 'double', - 'gross_distributions' => 'double', - 'taxable_amount' => 'double', - 'taxable_amount_not_determined' => null, - 'total_distribution_indicator' => null, - 'capital_gain' => 'double', - 'employee_contributions' => 'double', - 'net_unrealized_appreciation' => 'double', - 'distribution_code_required' => null, - 'distribution_code_optional' => null, - 'ira_sep_simple_indicator' => null, - 'total_ira_sep_simple_distribution' => 'double', - 'other' => 'double', - 'other_percent' => null, - 'percentage_total_distribution' => null, - 'total_employee_contributions' => 'double', - 'amount_allocable_to_irr' => 'double', - 'first_year_designated_roth_contrib' => null, - 'fatca_requirement_indicator' => null, - 'date_of_payment' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'filer_type' => 'filerType', - 'payment_type' => 'paymentType', - 'payment_settlement_entity_name_phone_number' => 'paymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'grossAmountPaymentCard', - 'card_not_present_transactions' => 'cardNotPresentTransactions', - 'merchant_category_code' => 'merchantCategoryCode', - 'payment_transaction_number' => 'paymentTransactionNumber', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'january' => 'january', - 'february' => 'february', - 'march' => 'march', - 'april' => 'april', - 'may' => 'may', - 'june' => 'june', - 'july' => 'july', - 'august' => 'august', - 'sept' => 'sept', - 'october' => 'october', - 'november' => 'november', - 'december' => 'december', - 'id' => 'id', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', - 'reference_id' => 'referenceId', - 'email' => 'email', - 'type_of_tin' => 'typeOfTin', - 'tin' => 'tin', - 'first_payee_name' => 'firstPayeeName', - 'second_payee_name' => 'secondPayeeName', - 'address' => 'address', - 'address_recipient_second' => 'addressRecipientSecond', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'foreign_province' => 'foreignProvince', - 'country_code' => 'countryCode', - 'validation_errors' => 'validationErrors', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'rents' => 'rents', - 'royalties' => 'royalties', - 'other_income' => 'otherIncome', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'fishingBoatProceeds', - 'medical_and_health_care' => 'medicalAndHealthCare', - 'nonemployee_compensation' => 'nonemployeeCompensation', - 'substitute_payments' => 'substitutePayments', - 'direct_sales_indicator' => 'directSalesIndicator', - 'crop_insurance_proceeds' => 'cropInsuranceProceeds', - 'excess_golden_parachute' => 'excessGoldenParachute', - 'gross_amount_paid_attorney' => 'grossAmountPaidAttorney', - 'section409_a_deferrals' => 'section409ADeferrals', - 'section409_a_income' => 'section409AIncome', - 'gross_distributions' => 'grossDistributions', - 'taxable_amount' => 'taxableAmount', - 'taxable_amount_not_determined' => 'taxableAmountNotDetermined', - 'total_distribution_indicator' => 'totalDistributionIndicator', - 'capital_gain' => 'capitalGain', - 'employee_contributions' => 'employeeContributions', - 'net_unrealized_appreciation' => 'netUnrealizedAppreciation', - 'distribution_code_required' => 'distributionCodeRequired', - 'distribution_code_optional' => 'distributionCodeOptional', - 'ira_sep_simple_indicator' => 'iraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'totalIraSepSimpleDistribution', - 'other' => 'other', - 'other_percent' => 'otherPercent', - 'percentage_total_distribution' => 'percentageTotalDistribution', - 'total_employee_contributions' => 'totalEmployeeContributions', - 'amount_allocable_to_irr' => 'amountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'firstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'fatcaRequirementIndicator', - 'date_of_payment' => 'dateOfPayment' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'filer_type' => 'setFilerType', - 'payment_type' => 'setPaymentType', - 'payment_settlement_entity_name_phone_number' => 'setPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'setGrossAmountPaymentCard', - 'card_not_present_transactions' => 'setCardNotPresentTransactions', - 'merchant_category_code' => 'setMerchantCategoryCode', - 'payment_transaction_number' => 'setPaymentTransactionNumber', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'january' => 'setJanuary', - 'february' => 'setFebruary', - 'march' => 'setMarch', - 'april' => 'setApril', - 'may' => 'setMay', - 'june' => 'setJune', - 'july' => 'setJuly', - 'august' => 'setAugust', - 'sept' => 'setSept', - 'october' => 'setOctober', - 'november' => 'setNovember', - 'december' => 'setDecember', - 'id' => 'setId', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', - 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'type_of_tin' => 'setTypeOfTin', - 'tin' => 'setTin', - 'first_payee_name' => 'setFirstPayeeName', - 'second_payee_name' => 'setSecondPayeeName', - 'address' => 'setAddress', - 'address_recipient_second' => 'setAddressRecipientSecond', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'foreign_province' => 'setForeignProvince', - 'country_code' => 'setCountryCode', - 'validation_errors' => 'setValidationErrors', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'rents' => 'setRents', - 'royalties' => 'setRoyalties', - 'other_income' => 'setOtherIncome', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'setFishingBoatProceeds', - 'medical_and_health_care' => 'setMedicalAndHealthCare', - 'nonemployee_compensation' => 'setNonemployeeCompensation', - 'substitute_payments' => 'setSubstitutePayments', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'crop_insurance_proceeds' => 'setCropInsuranceProceeds', - 'excess_golden_parachute' => 'setExcessGoldenParachute', - 'gross_amount_paid_attorney' => 'setGrossAmountPaidAttorney', - 'section409_a_deferrals' => 'setSection409ADeferrals', - 'section409_a_income' => 'setSection409AIncome', - 'gross_distributions' => 'setGrossDistributions', - 'taxable_amount' => 'setTaxableAmount', - 'taxable_amount_not_determined' => 'setTaxableAmountNotDetermined', - 'total_distribution_indicator' => 'setTotalDistributionIndicator', - 'capital_gain' => 'setCapitalGain', - 'employee_contributions' => 'setEmployeeContributions', - 'net_unrealized_appreciation' => 'setNetUnrealizedAppreciation', - 'distribution_code_required' => 'setDistributionCodeRequired', - 'distribution_code_optional' => 'setDistributionCodeOptional', - 'ira_sep_simple_indicator' => 'setIraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'setTotalIraSepSimpleDistribution', - 'other' => 'setOther', - 'other_percent' => 'setOtherPercent', - 'percentage_total_distribution' => 'setPercentageTotalDistribution', - 'total_employee_contributions' => 'setTotalEmployeeContributions', - 'amount_allocable_to_irr' => 'setAmountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'setFirstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'setFatcaRequirementIndicator', - 'date_of_payment' => 'setDateOfPayment' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'filer_type' => 'getFilerType', - 'payment_type' => 'getPaymentType', - 'payment_settlement_entity_name_phone_number' => 'getPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'getGrossAmountPaymentCard', - 'card_not_present_transactions' => 'getCardNotPresentTransactions', - 'merchant_category_code' => 'getMerchantCategoryCode', - 'payment_transaction_number' => 'getPaymentTransactionNumber', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'january' => 'getJanuary', - 'february' => 'getFebruary', - 'march' => 'getMarch', - 'april' => 'getApril', - 'may' => 'getMay', - 'june' => 'getJune', - 'july' => 'getJuly', - 'august' => 'getAugust', - 'sept' => 'getSept', - 'october' => 'getOctober', - 'november' => 'getNovember', - 'december' => 'getDecember', - 'id' => 'getId', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', - 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'type_of_tin' => 'getTypeOfTin', - 'tin' => 'getTin', - 'first_payee_name' => 'getFirstPayeeName', - 'second_payee_name' => 'getSecondPayeeName', - 'address' => 'getAddress', - 'address_recipient_second' => 'getAddressRecipientSecond', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'foreign_province' => 'getForeignProvince', - 'country_code' => 'getCountryCode', - 'validation_errors' => 'getValidationErrors', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'rents' => 'getRents', - 'royalties' => 'getRoyalties', - 'other_income' => 'getOtherIncome', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'getFishingBoatProceeds', - 'medical_and_health_care' => 'getMedicalAndHealthCare', - 'nonemployee_compensation' => 'getNonemployeeCompensation', - 'substitute_payments' => 'getSubstitutePayments', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'crop_insurance_proceeds' => 'getCropInsuranceProceeds', - 'excess_golden_parachute' => 'getExcessGoldenParachute', - 'gross_amount_paid_attorney' => 'getGrossAmountPaidAttorney', - 'section409_a_deferrals' => 'getSection409ADeferrals', - 'section409_a_income' => 'getSection409AIncome', - 'gross_distributions' => 'getGrossDistributions', - 'taxable_amount' => 'getTaxableAmount', - 'taxable_amount_not_determined' => 'getTaxableAmountNotDetermined', - 'total_distribution_indicator' => 'getTotalDistributionIndicator', - 'capital_gain' => 'getCapitalGain', - 'employee_contributions' => 'getEmployeeContributions', - 'net_unrealized_appreciation' => 'getNetUnrealizedAppreciation', - 'distribution_code_required' => 'getDistributionCodeRequired', - 'distribution_code_optional' => 'getDistributionCodeOptional', - 'ira_sep_simple_indicator' => 'getIraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'getTotalIraSepSimpleDistribution', - 'other' => 'getOther', - 'other_percent' => 'getOtherPercent', - 'percentage_total_distribution' => 'getPercentageTotalDistribution', - 'total_employee_contributions' => 'getTotalEmployeeContributions', - 'amount_allocable_to_irr' => 'getAmountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'getFirstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'getFatcaRequirementIndicator', - 'date_of_payment' => 'getDateOfPayment' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const FILER_TYPE_PSE = 'PSE'; - const FILER_TYPE_EPF = 'EPF'; - const FILER_TYPE_OTHER = 'Other'; - const PAYMENT_TYPE_MERCHANT_PAYMENT_CARD = 'MerchantPaymentCard'; - const PAYMENT_TYPE_THIRD_PARTY_NETWORK = 'ThirdPartyNetwork'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getFilerTypeAllowableValues() - { - return [ - self::FILER_TYPE_PSE, - self::FILER_TYPE_EPF, - self::FILER_TYPE_OTHER, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPaymentTypeAllowableValues() - { - return [ - self::PAYMENT_TYPE_MERCHANT_PAYMENT_CARD, - self::PAYMENT_TYPE_THIRD_PARTY_NETWORK, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['filer_type'] = $data['filer_type'] ?? null; - $this->container['payment_type'] = $data['payment_type'] ?? null; - $this->container['payment_settlement_entity_name_phone_number'] = $data['payment_settlement_entity_name_phone_number'] ?? null; - $this->container['gross_amount_payment_card'] = $data['gross_amount_payment_card'] ?? null; - $this->container['card_not_present_transactions'] = $data['card_not_present_transactions'] ?? null; - $this->container['merchant_category_code'] = $data['merchant_category_code'] ?? null; - $this->container['payment_transaction_number'] = $data['payment_transaction_number'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['january'] = $data['january'] ?? null; - $this->container['february'] = $data['february'] ?? null; - $this->container['march'] = $data['march'] ?? null; - $this->container['april'] = $data['april'] ?? null; - $this->container['may'] = $data['may'] ?? null; - $this->container['june'] = $data['june'] ?? null; - $this->container['july'] = $data['july'] ?? null; - $this->container['august'] = $data['august'] ?? null; - $this->container['sept'] = $data['sept'] ?? null; - $this->container['october'] = $data['october'] ?? null; - $this->container['november'] = $data['november'] ?? null; - $this->container['december'] = $data['december'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['type_of_tin'] = $data['type_of_tin'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['first_payee_name'] = $data['first_payee_name'] ?? null; - $this->container['second_payee_name'] = $data['second_payee_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address_recipient_second'] = $data['address_recipient_second'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['foreign_province'] = $data['foreign_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['rents'] = $data['rents'] ?? null; - $this->container['royalties'] = $data['royalties'] ?? null; - $this->container['other_income'] = $data['other_income'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; - $this->container['fishing_boat_proceeds'] = $data['fishing_boat_proceeds'] ?? null; - $this->container['medical_and_health_care'] = $data['medical_and_health_care'] ?? null; - $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['crop_insurance_proceeds'] = $data['crop_insurance_proceeds'] ?? null; - $this->container['excess_golden_parachute'] = $data['excess_golden_parachute'] ?? null; - $this->container['gross_amount_paid_attorney'] = $data['gross_amount_paid_attorney'] ?? null; - $this->container['section409_a_deferrals'] = $data['section409_a_deferrals'] ?? null; - $this->container['section409_a_income'] = $data['section409_a_income'] ?? null; - $this->container['gross_distributions'] = $data['gross_distributions'] ?? null; - $this->container['taxable_amount'] = $data['taxable_amount'] ?? null; - $this->container['taxable_amount_not_determined'] = $data['taxable_amount_not_determined'] ?? null; - $this->container['total_distribution_indicator'] = $data['total_distribution_indicator'] ?? null; - $this->container['capital_gain'] = $data['capital_gain'] ?? null; - $this->container['employee_contributions'] = $data['employee_contributions'] ?? null; - $this->container['net_unrealized_appreciation'] = $data['net_unrealized_appreciation'] ?? null; - $this->container['distribution_code_required'] = $data['distribution_code_required'] ?? null; - $this->container['distribution_code_optional'] = $data['distribution_code_optional'] ?? null; - $this->container['ira_sep_simple_indicator'] = $data['ira_sep_simple_indicator'] ?? null; - $this->container['total_ira_sep_simple_distribution'] = $data['total_ira_sep_simple_distribution'] ?? null; - $this->container['other'] = $data['other'] ?? null; - $this->container['other_percent'] = $data['other_percent'] ?? null; - $this->container['percentage_total_distribution'] = $data['percentage_total_distribution'] ?? null; - $this->container['total_employee_contributions'] = $data['total_employee_contributions'] ?? null; - $this->container['amount_allocable_to_irr'] = $data['amount_allocable_to_irr'] ?? null; - $this->container['first_year_designated_roth_contrib'] = $data['first_year_designated_roth_contrib'] ?? null; - $this->container['fatca_requirement_indicator'] = $data['fatca_requirement_indicator'] ?? null; - $this->container['date_of_payment'] = $data['date_of_payment'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($this->container['filer_type']) && !in_array($this->container['filer_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'filer_type', must be one of '%s'", - $this->container['filer_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($this->container['payment_type']) && !in_array($this->container['payment_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'payment_type', must be one of '%s'", - $this->container['payment_type'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets filer_type - * - * @return string|null - */ - public function getFilerType() - { - return $this->container['filer_type']; - } - - /** - * Sets filer_type - * - * @param string|null $filer_type filer_type - * - * @return self - */ - public function setFilerType($filer_type) - { - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($filer_type) && !in_array($filer_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'filer_type', must be one of '%s'", - $filer_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['filer_type'] = $filer_type; - - return $this; - } - - /** - * Gets payment_type - * - * @return string|null - */ - public function getPaymentType() - { - return $this->container['payment_type']; - } - - /** - * Sets payment_type - * - * @param string|null $payment_type payment_type - * - * @return self - */ - public function setPaymentType($payment_type) - { - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($payment_type) && !in_array($payment_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'payment_type', must be one of '%s'", - $payment_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['payment_type'] = $payment_type; - - return $this; - } - - /** - * Gets payment_settlement_entity_name_phone_number - * - * @return string|null - */ - public function getPaymentSettlementEntityNamePhoneNumber() - { - return $this->container['payment_settlement_entity_name_phone_number']; - } - - /** - * Sets payment_settlement_entity_name_phone_number - * - * @param string|null $payment_settlement_entity_name_phone_number payment_settlement_entity_name_phone_number - * - * @return self - */ - public function setPaymentSettlementEntityNamePhoneNumber($payment_settlement_entity_name_phone_number) - { - $this->container['payment_settlement_entity_name_phone_number'] = $payment_settlement_entity_name_phone_number; - - return $this; - } - - /** - * Gets gross_amount_payment_card - * - * @return float|null - */ - public function getGrossAmountPaymentCard() - { - return $this->container['gross_amount_payment_card']; - } - - /** - * Sets gross_amount_payment_card - * - * @param float|null $gross_amount_payment_card gross_amount_payment_card - * - * @return self - */ - public function setGrossAmountPaymentCard($gross_amount_payment_card) - { - $this->container['gross_amount_payment_card'] = $gross_amount_payment_card; - - return $this; - } - - /** - * Gets card_not_present_transactions - * - * @return float|null - */ - public function getCardNotPresentTransactions() - { - return $this->container['card_not_present_transactions']; - } - - /** - * Sets card_not_present_transactions - * - * @param float|null $card_not_present_transactions card_not_present_transactions - * - * @return self - */ - public function setCardNotPresentTransactions($card_not_present_transactions) - { - $this->container['card_not_present_transactions'] = $card_not_present_transactions; - - return $this; - } - - /** - * Gets merchant_category_code - * - * @return string|null - */ - public function getMerchantCategoryCode() - { - return $this->container['merchant_category_code']; - } - - /** - * Sets merchant_category_code - * - * @param string|null $merchant_category_code merchant_category_code - * - * @return self - */ - public function setMerchantCategoryCode($merchant_category_code) - { - $this->container['merchant_category_code'] = $merchant_category_code; - - return $this; - } - - /** - * Gets payment_transaction_number - * - * @return float|null - */ - public function getPaymentTransactionNumber() - { - return $this->container['payment_transaction_number']; - } - - /** - * Sets payment_transaction_number - * - * @param float|null $payment_transaction_number payment_transaction_number - * - * @return self - */ - public function setPaymentTransactionNumber($payment_transaction_number) - { - $this->container['payment_transaction_number'] = $payment_transaction_number; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld federal_income_tax_withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets january - * - * @return float|null - */ - public function getJanuary() - { - return $this->container['january']; - } - - /** - * Sets january - * - * @param float|null $january january - * - * @return self - */ - public function setJanuary($january) - { - $this->container['january'] = $january; - - return $this; - } - - /** - * Gets february - * - * @return float|null - */ - public function getFebruary() - { - return $this->container['february']; - } - - /** - * Sets february - * - * @param float|null $february february - * - * @return self - */ - public function setFebruary($february) - { - $this->container['february'] = $february; - - return $this; - } - - /** - * Gets march - * - * @return float|null - */ - public function getMarch() - { - return $this->container['march']; - } - - /** - * Sets march - * - * @param float|null $march march - * - * @return self - */ - public function setMarch($march) - { - $this->container['march'] = $march; - - return $this; - } - - /** - * Gets april - * - * @return float|null - */ - public function getApril() - { - return $this->container['april']; - } - - /** - * Sets april - * - * @param float|null $april april - * - * @return self - */ - public function setApril($april) - { - $this->container['april'] = $april; - - return $this; - } - - /** - * Gets may - * - * @return float|null - */ - public function getMay() - { - return $this->container['may']; - } - - /** - * Sets may - * - * @param float|null $may may - * - * @return self - */ - public function setMay($may) - { - $this->container['may'] = $may; - - return $this; - } - - /** - * Gets june - * - * @return float|null - */ - public function getJune() - { - return $this->container['june']; - } - - /** - * Sets june - * - * @param float|null $june june - * - * @return self - */ - public function setJune($june) - { - $this->container['june'] = $june; - - return $this; - } - - /** - * Gets july - * - * @return float|null - */ - public function getJuly() - { - return $this->container['july']; - } - - /** - * Sets july - * - * @param float|null $july july - * - * @return self - */ - public function setJuly($july) - { - $this->container['july'] = $july; - - return $this; - } - - /** - * Gets august - * - * @return float|null - */ - public function getAugust() - { - return $this->container['august']; - } - - /** - * Sets august - * - * @param float|null $august august - * - * @return self - */ - public function setAugust($august) - { - $this->container['august'] = $august; - - return $this; - } - - /** - * Gets sept - * - * @return float|null - */ - public function getSept() - { - return $this->container['sept']; - } - - /** - * Sets sept - * - * @param float|null $sept sept - * - * @return self - */ - public function setSept($sept) - { - $this->container['sept'] = $sept; - - return $this; - } - - /** - * Gets october - * - * @return float|null - */ - public function getOctober() - { - return $this->container['october']; - } - - /** - * Sets october - * - * @param float|null $october october - * - * @return self - */ - public function setOctober($october) - { - $this->container['october'] = $october; - - return $this; - } - - /** - * Gets november - * - * @return float|null - */ - public function getNovember() - { - return $this->container['november']; - } - - /** - * Sets november - * - * @param float|null $november november - * - * @return self - */ - public function setNovember($november) - { - $this->container['november'] = $november; - - return $this; - } - - /** - * Gets december - * - * @return float|null - */ - public function getDecember() - { - return $this->container['december']; - } - - /** - * Sets december - * - * @param float|null $december december - * - * @return self - */ - public function setDecember($december) - { - $this->container['december'] = $december; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return int|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param int|null $issuer_id issuer_id - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id issuer_reference_id - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin issuer_tin - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year tax_year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets federal_efile - * - * @return bool|null - */ - public function getFederalEfile() - { - return $this->container['federal_efile']; - } - - /** - * Sets federal_efile - * - * @param bool|null $federal_efile federal_efile - * - * @return self - */ - public function setFederalEfile($federal_efile) - { - $this->container['federal_efile'] = $federal_efile; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status federal_efile_status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets state_efile - * - * @return bool|null - */ - public function getStateEfile() - { - return $this->container['state_efile']; - } - - /** - * Sets state_efile - * - * @param bool|null $state_efile state_efile - * - * @return self - */ - public function setStateEfile($state_efile) - { - $this->container['state_efile'] = $state_efile; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status state_efile_status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail postal_mail - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status postal_mail_status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match tin_match - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status tin_match_status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification address_verification - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status address_verification_status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id reference_id - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email email - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets type_of_tin - * - * @return string|null - */ - public function getTypeOfTin() - { - return $this->container['type_of_tin']; - } - - /** - * Sets type_of_tin - * - * @param string|null $type_of_tin type_of_tin - * - * @return self - */ - public function setTypeOfTin($type_of_tin) - { - $this->container['type_of_tin'] = $type_of_tin; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin tin - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets first_payee_name - * - * @return string|null - */ - public function getFirstPayeeName() - { - return $this->container['first_payee_name']; - } - - /** - * Sets first_payee_name - * - * @param string|null $first_payee_name first_payee_name - * - * @return self - */ - public function setFirstPayeeName($first_payee_name) - { - $this->container['first_payee_name'] = $first_payee_name; - - return $this; - } - - /** - * Gets second_payee_name - * - * @return string|null - */ - public function getSecondPayeeName() - { - return $this->container['second_payee_name']; - } - - /** - * Sets second_payee_name - * - * @param string|null $second_payee_name second_payee_name - * - * @return self - */ - public function setSecondPayeeName($second_payee_name) - { - $this->container['second_payee_name'] = $second_payee_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address_recipient_second - * - * @return string|null - */ - public function getAddressRecipientSecond() - { - return $this->container['address_recipient_second']; - } - - /** - * Sets address_recipient_second - * - * @param string|null $address_recipient_second address_recipient_second - * - * @return self - */ - public function setAddressRecipientSecond($address_recipient_second) - { - $this->container['address_recipient_second'] = $address_recipient_second; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city city - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip zip - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets foreign_province - * - * @return string|null - */ - public function getForeignProvince() - { - return $this->container['foreign_province']; - } - - /** - * Sets foreign_province - * - * @param string|null $foreign_province foreign_province - * - * @return self - */ - public function setForeignProvince($foreign_province) - { - $this->container['foreign_province'] = $foreign_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code country_code - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationError[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors validation_errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at created_at - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at updated_at - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets rents - * - * @return float|null - */ - public function getRents() - { - return $this->container['rents']; - } - - /** - * Sets rents - * - * @param float|null $rents rents - * - * @return self - */ - public function setRents($rents) - { - $this->container['rents'] = $rents; - - return $this; - } - - /** - * Gets royalties - * - * @return float|null - */ - public function getRoyalties() - { - return $this->container['royalties']; - } - - /** - * Sets royalties - * - * @param float|null $royalties royalties - * - * @return self - */ - public function setRoyalties($royalties) - { - $this->container['royalties'] = $royalties; - - return $this; - } - - /** - * Gets other_income - * - * @return float|null - */ - public function getOtherIncome() - { - return $this->container['other_income']; - } - - /** - * Sets other_income - * - * @param float|null $other_income other_income - * - * @return self - */ - public function setOtherIncome($other_income) - { - $this->container['other_income'] = $other_income; - - return $this; - } - - /** - * Gets fed_income_tax_withheld - * - * @return float|null - */ - public function getFedIncomeTaxWithheld() - { - return $this->container['fed_income_tax_withheld']; - } - - /** - * Sets fed_income_tax_withheld - * - * @param float|null $fed_income_tax_withheld fed_income_tax_withheld - * - * @return self - */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) - { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; - - return $this; - } - - /** - * Gets fishing_boat_proceeds - * - * @return float|null - */ - public function getFishingBoatProceeds() - { - return $this->container['fishing_boat_proceeds']; - } - - /** - * Sets fishing_boat_proceeds - * - * @param float|null $fishing_boat_proceeds fishing_boat_proceeds - * - * @return self - */ - public function setFishingBoatProceeds($fishing_boat_proceeds) - { - $this->container['fishing_boat_proceeds'] = $fishing_boat_proceeds; - - return $this; - } - - /** - * Gets medical_and_health_care - * - * @return float|null - */ - public function getMedicalAndHealthCare() - { - return $this->container['medical_and_health_care']; - } - - /** - * Sets medical_and_health_care - * - * @param float|null $medical_and_health_care medical_and_health_care - * - * @return self - */ - public function setMedicalAndHealthCare($medical_and_health_care) - { - $this->container['medical_and_health_care'] = $medical_and_health_care; - - return $this; - } - - /** - * Gets nonemployee_compensation - * - * @return float|null - */ - public function getNonemployeeCompensation() - { - return $this->container['nonemployee_compensation']; - } - - /** - * Sets nonemployee_compensation - * - * @param float|null $nonemployee_compensation nonemployee_compensation - * - * @return self - */ - public function setNonemployeeCompensation($nonemployee_compensation) - { - $this->container['nonemployee_compensation'] = $nonemployee_compensation; - - return $this; - } - - /** - * Gets substitute_payments - * - * @return float|null - */ - public function getSubstitutePayments() - { - return $this->container['substitute_payments']; - } - - /** - * Sets substitute_payments - * - * @param float|null $substitute_payments substitute_payments - * - * @return self - */ - public function setSubstitutePayments($substitute_payments) - { - $this->container['substitute_payments'] = $substitute_payments; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator direct_sales_indicator - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets crop_insurance_proceeds - * - * @return float|null - */ - public function getCropInsuranceProceeds() - { - return $this->container['crop_insurance_proceeds']; - } - - /** - * Sets crop_insurance_proceeds - * - * @param float|null $crop_insurance_proceeds crop_insurance_proceeds - * - * @return self - */ - public function setCropInsuranceProceeds($crop_insurance_proceeds) - { - $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; - - return $this; - } - - /** - * Gets excess_golden_parachute - * - * @return float|null - */ - public function getExcessGoldenParachute() - { - return $this->container['excess_golden_parachute']; - } - - /** - * Sets excess_golden_parachute - * - * @param float|null $excess_golden_parachute excess_golden_parachute - * - * @return self - */ - public function setExcessGoldenParachute($excess_golden_parachute) - { - $this->container['excess_golden_parachute'] = $excess_golden_parachute; - - return $this; - } - - /** - * Gets gross_amount_paid_attorney - * - * @return float|null - */ - public function getGrossAmountPaidAttorney() - { - return $this->container['gross_amount_paid_attorney']; - } - - /** - * Sets gross_amount_paid_attorney - * - * @param float|null $gross_amount_paid_attorney gross_amount_paid_attorney - * - * @return self - */ - public function setGrossAmountPaidAttorney($gross_amount_paid_attorney) - { - $this->container['gross_amount_paid_attorney'] = $gross_amount_paid_attorney; - - return $this; - } - - /** - * Gets section409_a_deferrals - * - * @return float|null - */ - public function getSection409ADeferrals() - { - return $this->container['section409_a_deferrals']; - } - - /** - * Sets section409_a_deferrals - * - * @param float|null $section409_a_deferrals section409_a_deferrals - * - * @return self - */ - public function setSection409ADeferrals($section409_a_deferrals) - { - $this->container['section409_a_deferrals'] = $section409_a_deferrals; - - return $this; - } - - /** - * Gets section409_a_income - * - * @return float|null - */ - public function getSection409AIncome() - { - return $this->container['section409_a_income']; - } - - /** - * Sets section409_a_income - * - * @param float|null $section409_a_income section409_a_income - * - * @return self - */ - public function setSection409AIncome($section409_a_income) - { - $this->container['section409_a_income'] = $section409_a_income; - - return $this; - } - - /** - * Gets gross_distributions - * - * @return float|null - */ - public function getGrossDistributions() - { - return $this->container['gross_distributions']; - } - - /** - * Sets gross_distributions - * - * @param float|null $gross_distributions gross_distributions - * - * @return self - */ - public function setGrossDistributions($gross_distributions) - { - $this->container['gross_distributions'] = $gross_distributions; - - return $this; - } - - /** - * Gets taxable_amount - * - * @return float|null - */ - public function getTaxableAmount() - { - return $this->container['taxable_amount']; - } - - /** - * Sets taxable_amount - * - * @param float|null $taxable_amount taxable_amount - * - * @return self - */ - public function setTaxableAmount($taxable_amount) - { - $this->container['taxable_amount'] = $taxable_amount; - - return $this; - } - - /** - * Gets taxable_amount_not_determined - * - * @return bool|null - */ - public function getTaxableAmountNotDetermined() - { - return $this->container['taxable_amount_not_determined']; - } - - /** - * Sets taxable_amount_not_determined - * - * @param bool|null $taxable_amount_not_determined taxable_amount_not_determined - * - * @return self - */ - public function setTaxableAmountNotDetermined($taxable_amount_not_determined) - { - $this->container['taxable_amount_not_determined'] = $taxable_amount_not_determined; - - return $this; - } - - /** - * Gets total_distribution_indicator - * - * @return bool|null - */ - public function getTotalDistributionIndicator() - { - return $this->container['total_distribution_indicator']; - } - - /** - * Sets total_distribution_indicator - * - * @param bool|null $total_distribution_indicator total_distribution_indicator - * - * @return self - */ - public function setTotalDistributionIndicator($total_distribution_indicator) - { - $this->container['total_distribution_indicator'] = $total_distribution_indicator; - - return $this; - } - - /** - * Gets capital_gain - * - * @return float|null - */ - public function getCapitalGain() - { - return $this->container['capital_gain']; - } - - /** - * Sets capital_gain - * - * @param float|null $capital_gain capital_gain - * - * @return self - */ - public function setCapitalGain($capital_gain) - { - $this->container['capital_gain'] = $capital_gain; - - return $this; - } - - /** - * Gets employee_contributions - * - * @return float|null - */ - public function getEmployeeContributions() - { - return $this->container['employee_contributions']; - } - - /** - * Sets employee_contributions - * - * @param float|null $employee_contributions employee_contributions - * - * @return self - */ - public function setEmployeeContributions($employee_contributions) - { - $this->container['employee_contributions'] = $employee_contributions; - - return $this; - } - - /** - * Gets net_unrealized_appreciation - * - * @return float|null - */ - public function getNetUnrealizedAppreciation() - { - return $this->container['net_unrealized_appreciation']; - } - - /** - * Sets net_unrealized_appreciation - * - * @param float|null $net_unrealized_appreciation net_unrealized_appreciation - * - * @return self - */ - public function setNetUnrealizedAppreciation($net_unrealized_appreciation) - { - $this->container['net_unrealized_appreciation'] = $net_unrealized_appreciation; - - return $this; - } - - /** - * Gets distribution_code_required - * - * @return string|null - */ - public function getDistributionCodeRequired() - { - return $this->container['distribution_code_required']; - } - - /** - * Sets distribution_code_required - * - * @param string|null $distribution_code_required distribution_code_required - * - * @return self - */ - public function setDistributionCodeRequired($distribution_code_required) - { - $this->container['distribution_code_required'] = $distribution_code_required; - - return $this; - } - - /** - * Gets distribution_code_optional - * - * @return string|null - */ - public function getDistributionCodeOptional() - { - return $this->container['distribution_code_optional']; - } - - /** - * Sets distribution_code_optional - * - * @param string|null $distribution_code_optional distribution_code_optional - * - * @return self - */ - public function setDistributionCodeOptional($distribution_code_optional) - { - $this->container['distribution_code_optional'] = $distribution_code_optional; - - return $this; - } - - /** - * Gets ira_sep_simple_indicator - * - * @return bool|null - */ - public function getIraSepSimpleIndicator() - { - return $this->container['ira_sep_simple_indicator']; - } - - /** - * Sets ira_sep_simple_indicator - * - * @param bool|null $ira_sep_simple_indicator ira_sep_simple_indicator - * - * @return self - */ - public function setIraSepSimpleIndicator($ira_sep_simple_indicator) - { - $this->container['ira_sep_simple_indicator'] = $ira_sep_simple_indicator; - - return $this; - } - - /** - * Gets total_ira_sep_simple_distribution - * - * @return float|null - */ - public function getTotalIraSepSimpleDistribution() - { - return $this->container['total_ira_sep_simple_distribution']; - } - - /** - * Sets total_ira_sep_simple_distribution - * - * @param float|null $total_ira_sep_simple_distribution total_ira_sep_simple_distribution - * - * @return self - */ - public function setTotalIraSepSimpleDistribution($total_ira_sep_simple_distribution) - { - $this->container['total_ira_sep_simple_distribution'] = $total_ira_sep_simple_distribution; - - return $this; - } - - /** - * Gets other - * - * @return float|null - */ - public function getOther() - { - return $this->container['other']; - } - - /** - * Sets other - * - * @param float|null $other other - * - * @return self - */ - public function setOther($other) - { - $this->container['other'] = $other; - - return $this; - } - - /** - * Gets other_percent - * - * @return string|null - */ - public function getOtherPercent() - { - return $this->container['other_percent']; - } - - /** - * Sets other_percent - * - * @param string|null $other_percent other_percent - * - * @return self - */ - public function setOtherPercent($other_percent) - { - $this->container['other_percent'] = $other_percent; - - return $this; - } - - /** - * Gets percentage_total_distribution - * - * @return string|null - */ - public function getPercentageTotalDistribution() - { - return $this->container['percentage_total_distribution']; - } - - /** - * Sets percentage_total_distribution - * - * @param string|null $percentage_total_distribution percentage_total_distribution - * - * @return self - */ - public function setPercentageTotalDistribution($percentage_total_distribution) - { - $this->container['percentage_total_distribution'] = $percentage_total_distribution; - - return $this; - } - - /** - * Gets total_employee_contributions - * - * @return float|null - */ - public function getTotalEmployeeContributions() - { - return $this->container['total_employee_contributions']; - } - - /** - * Sets total_employee_contributions - * - * @param float|null $total_employee_contributions total_employee_contributions - * - * @return self - */ - public function setTotalEmployeeContributions($total_employee_contributions) - { - $this->container['total_employee_contributions'] = $total_employee_contributions; - - return $this; - } - - /** - * Gets amount_allocable_to_irr - * - * @return float|null - */ - public function getAmountAllocableToIrr() - { - return $this->container['amount_allocable_to_irr']; - } - - /** - * Sets amount_allocable_to_irr - * - * @param float|null $amount_allocable_to_irr amount_allocable_to_irr - * - * @return self - */ - public function setAmountAllocableToIrr($amount_allocable_to_irr) - { - $this->container['amount_allocable_to_irr'] = $amount_allocable_to_irr; - - return $this; - } - - /** - * Gets first_year_designated_roth_contrib - * - * @return string|null - */ - public function getFirstYearDesignatedRothContrib() - { - return $this->container['first_year_designated_roth_contrib']; - } - - /** - * Sets first_year_designated_roth_contrib - * - * @param string|null $first_year_designated_roth_contrib first_year_designated_roth_contrib - * - * @return self - */ - public function setFirstYearDesignatedRothContrib($first_year_designated_roth_contrib) - { - $this->container['first_year_designated_roth_contrib'] = $first_year_designated_roth_contrib; - - return $this; - } - - /** - * Gets fatca_requirement_indicator - * - * @return bool|null - */ - public function getFatcaRequirementIndicator() - { - return $this->container['fatca_requirement_indicator']; - } - - /** - * Sets fatca_requirement_indicator - * - * @param bool|null $fatca_requirement_indicator fatca_requirement_indicator - * - * @return self - */ - public function setFatcaRequirementIndicator($fatca_requirement_indicator) - { - $this->container['fatca_requirement_indicator'] = $fatca_requirement_indicator; - - return $this; - } - - /** - * Gets date_of_payment - * - * @return string|null - */ - public function getDateOfPayment() - { - return $this->container['date_of_payment']; - } - - /** - * Sets date_of_payment - * - * @param string|null $date_of_payment date_of_payment - * - * @return self - */ - public function setDateOfPayment($date_of_payment) - { - $this->container['date_of_payment'] = $date_of_payment; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Data.php b/lib/Model/A1099/V2/Form1099ListRequest.php similarity index 77% rename from lib/Model/A1099/V2/Data.php rename to lib/Model/A1099/V2/Form1099ListRequest.php index f9e3096..a41e6f4 100644 --- a/lib/Model/A1099/V2/Data.php +++ b/lib/Model/A1099/V2/Form1099ListRequest.php @@ -1,6 +1,6 @@ 'string', 'type' => 'string', - 'attributes' => '\Avalara\SDK\Model\A1099\V2\Attribute', - 'links' => '\Avalara\SDK\Model\A1099\V2\Link' + 'forms' => '\Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]' ]; /** @@ -85,10 +83,8 @@ class Data implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'type' => null, - 'attributes' => null, - 'links' => null + 'forms' => null ]; /** @@ -118,10 +114,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'type' => 'type', - 'attributes' => 'attributes', - 'links' => 'links' + 'forms' => 'forms' ]; /** @@ -130,10 +124,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'type' => 'setType', - 'attributes' => 'setAttributes', - 'links' => 'setLinks' + 'forms' => 'setForms' ]; /** @@ -142,10 +134,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'type' => 'getType', - 'attributes' => 'getAttributes', - 'links' => 'getLinks' + 'forms' => 'getForms' ]; /** @@ -189,6 +179,35 @@ public function getModelName() return self::$openAPIModelName; } + const TYPE__1099_NEC = '1099-NEC'; + const TYPE__1099_MISC = '1099-MISC'; + const TYPE__1099_DIV = '1099-DIV'; + const TYPE__1099_R = '1099-R'; + const TYPE__1099_K = '1099-K'; + const TYPE__1095_B = '1095-B'; + const TYPE__1042_S = '1042-S'; + const TYPE__1095_C = '1095-C'; + const TYPE__1099_INT = '1099-INT'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE__1099_NEC, + self::TYPE__1099_MISC, + self::TYPE__1099_DIV, + self::TYPE__1099_R, + self::TYPE__1099_K, + self::TYPE__1095_B, + self::TYPE__1042_S, + self::TYPE__1095_C, + self::TYPE__1099_INT, + ]; + } /** * Associative array for storing property values @@ -205,10 +224,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; $this->container['type'] = $data['type'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['links'] = $data['links'] ?? null; + $this->container['forms'] = $data['forms'] ?? null; } /** @@ -220,6 +237,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -235,30 +261,6 @@ public function valid() } - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** * Gets type * @@ -278,55 +280,43 @@ public function getType() */ public function setType($type) { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } $this->container['type'] = $type; return $this; } /** - * Gets attributes + * Gets forms * - * @return \Avalara\SDK\Model\A1099\V2\Attribute|null + * @return \Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]|null */ - public function getAttributes() + public function getForms() { - return $this->container['attributes']; + return $this->container['forms']; } /** - * Sets attributes + * Sets forms * - * @param \Avalara\SDK\Model\A1099\V2\Attribute|null $attributes attributes + * @param \Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]|null $forms forms * * @return self */ - public function setAttributes($attributes) + public function setForms($forms) { - $this->container['attributes'] = $attributes; - return $this; - } - - /** - * Gets links - * - * @return \Avalara\SDK\Model\A1099\V2\Link|null - */ - public function getLinks() - { - return $this->container['links']; - } - /** - * Sets links - * - * @param \Avalara\SDK\Model\A1099\V2\Link|null $links links - * - * @return self - */ - public function setLinks($links) - { - $this->container['links'] = $links; + $this->container['forms'] = $forms; return $this; } diff --git a/lib/Model/A1099/V2/Form1099ListResponse.php b/lib/Model/A1099/V2/Form1099ListResponse.php deleted file mode 100644 index 4f2e18c..0000000 --- a/lib/Model/A1099/V2/Form1099ListResponse.php +++ /dev/null @@ -1,334 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099ListResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099ListResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099ListResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'value' => '\Avalara\SDK\Model\A1099\V2\Form1099ListResponseValueInner[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'value' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'value' => 'value' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'value' => 'setValue' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'value' => 'getValue' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['value'] = $data['value'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets value - * - * @return \Avalara\SDK\Model\A1099\V2\Form1099ListResponseValueInner[]|null - */ - public function getValue() - { - return $this->container['value']; - } - - /** - * Sets value - * - * @param \Avalara\SDK\Model\A1099\V2\Form1099ListResponseValueInner[]|null $value List of Form 1099 responses - * - * @return self - */ - public function setValue($value) - { - - - $this->container['value'] = $value; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099ListResponseValueInner.php b/lib/Model/A1099/V2/Form1099ListResponseValueInner.php deleted file mode 100644 index d7d7580..0000000 --- a/lib/Model/A1099/V2/Form1099ListResponseValueInner.php +++ /dev/null @@ -1,4470 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099ListResponseValueInner Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099ListResponseValueInner implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099ListResponse_value_inner'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'id' => 'string', - 'type' => 'string', - 'issuer_id' => 'int', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', - 'tin' => 'string', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'recipient_name' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'fatca_filing_requirement' => 'bool', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse', - 'unique_form_id' => 'string', - 'recipient_date_of_birth' => '\DateTime', - 'recipient_giin' => 'string', - 'recipient_foreign_tin' => 'string', - 'lob_code' => 'string', - 'income_code' => 'string', - 'gross_income' => 'float', - 'withholding_indicator' => 'string', - 'tax_country_code' => 'string', - 'exemption_code_chap3' => 'string', - 'exemption_code_chap4' => 'string', - 'tax_rate_chap3' => 'string', - 'withholding_allowance' => 'float', - 'federal_tax_withheld' => 'float', - 'tax_not_deposited_indicator' => 'bool', - 'academic_indicator' => 'bool', - 'tax_withheld_other_agents' => 'float', - 'amount_repaid' => 'float', - 'tax_paid_agent' => 'float', - 'chap3_status_code' => 'string', - 'chap4_status_code' => 'string', - 'primary_withholding_agent' => '\Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentResponse', - 'intermediary_or_flow_through' => '\Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughResponse', - 'origin_of_health_coverage_code' => 'string', - 'covered_individuals' => '\Avalara\SDK\Model\A1099\V2\CoveredIndividualReferenceResponse[]', - 'total_ordinary_dividends' => 'string', - 'qualified_dividends' => 'string', - 'total_capital_gain_distributions' => 'string', - 'unrecaptured_section1250_gain' => 'string', - 'section1202_gain' => 'string', - 'collectibles_gain' => 'string', - 'section897_ordinary_dividends' => 'string', - 'section897_capital_gain' => 'string', - 'nondividend_distributions' => 'string', - 'federal_income_tax_withheld' => 'float', - 'section199_a_dividends' => 'string', - 'investment_expenses' => 'string', - 'foreign_tax_paid' => 'string', - 'foreign_country_or_us_possession' => 'string', - 'cash_liquidation_distributions' => 'string', - 'noncash_liquidation_distributions' => 'string', - 'exempt_interest_dividends' => 'string', - 'specified_private_activity_bond_interest_dividends' => 'string', - 'filer_type' => 'string', - 'payment_type' => 'string', - 'payment_settlement_entity_name_phone_number' => 'string', - 'gross_amount_payment_card' => 'float', - 'card_not_present_transactions' => 'float', - 'merchant_category_code' => 'string', - 'payment_transaction_number' => 'float', - 'january' => 'float', - 'february' => 'float', - 'march' => 'float', - 'april' => 'float', - 'may' => 'float', - 'june' => 'float', - 'july' => 'float', - 'august' => 'float', - 'sept' => 'float', - 'october' => 'float', - 'november' => 'float', - 'december' => 'float', - 'rents' => 'float', - 'royalties' => 'float', - 'other_income' => 'float', - 'fed_income_tax_withheld' => 'float', - 'fishing_boat_proceeds' => 'float', - 'medical_and_health_care_payments' => 'float', - 'substitute_payments' => 'float', - 'direct_sales_indicator' => 'bool', - 'crop_insurance_proceeds' => 'float', - 'excess_golden_parachute_payments' => 'float', - 'gross_proceeds_paid_to_attorney' => 'float', - 'fish_purchased_for_resale' => 'float', - 'section409_a_deferrals' => 'float', - 'nonqualified_deferred_compensation' => 'float', - 'nonemployee_compensation' => 'float', - 'gross_distributions' => 'float', - 'taxable_amount' => 'float', - 'taxable_amount_not_determined' => 'bool', - 'total_distribution_indicator' => 'bool', - 'capital_gain' => 'float', - 'employee_contributions' => 'float', - 'net_unrealized_appreciation' => 'float', - 'distribution_code_required' => 'string', - 'distribution_code_optional' => 'string', - 'ira_sep_simple_indicator' => 'bool', - 'total_ira_sep_simple_distribution' => 'float', - 'other' => 'float', - 'other_percent' => 'string', - 'percentage_total_distribution' => 'string', - 'total_employee_contributions' => 'float', - 'amount_allocable_to_irr' => 'float', - 'first_year_designated_roth_contrib' => 'string', - 'fatca_requirement_indicator' => 'bool', - 'date_of_payment' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'id' => null, - 'type' => null, - 'issuer_id' => 'int32', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, - 'e_delivery_status' => null, - 'reference_id' => null, - 'email' => null, - 'tin_type' => null, - 'tin' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'recipient_name' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'non_us_province' => null, - 'country_code' => null, - 'account_number' => null, - 'office_code' => null, - 'fatca_filing_requirement' => null, - 'validation_errors' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null, - 'unique_form_id' => null, - 'recipient_date_of_birth' => 'date-time', - 'recipient_giin' => null, - 'recipient_foreign_tin' => null, - 'lob_code' => null, - 'income_code' => null, - 'gross_income' => 'double', - 'withholding_indicator' => null, - 'tax_country_code' => null, - 'exemption_code_chap3' => null, - 'exemption_code_chap4' => null, - 'tax_rate_chap3' => null, - 'withholding_allowance' => 'double', - 'federal_tax_withheld' => 'double', - 'tax_not_deposited_indicator' => null, - 'academic_indicator' => null, - 'tax_withheld_other_agents' => 'double', - 'amount_repaid' => 'double', - 'tax_paid_agent' => 'double', - 'chap3_status_code' => null, - 'chap4_status_code' => null, - 'primary_withholding_agent' => null, - 'intermediary_or_flow_through' => null, - 'origin_of_health_coverage_code' => null, - 'covered_individuals' => null, - 'total_ordinary_dividends' => null, - 'qualified_dividends' => null, - 'total_capital_gain_distributions' => null, - 'unrecaptured_section1250_gain' => null, - 'section1202_gain' => null, - 'collectibles_gain' => null, - 'section897_ordinary_dividends' => null, - 'section897_capital_gain' => null, - 'nondividend_distributions' => null, - 'federal_income_tax_withheld' => 'double', - 'section199_a_dividends' => null, - 'investment_expenses' => null, - 'foreign_tax_paid' => null, - 'foreign_country_or_us_possession' => null, - 'cash_liquidation_distributions' => null, - 'noncash_liquidation_distributions' => null, - 'exempt_interest_dividends' => null, - 'specified_private_activity_bond_interest_dividends' => null, - 'filer_type' => null, - 'payment_type' => null, - 'payment_settlement_entity_name_phone_number' => null, - 'gross_amount_payment_card' => 'double', - 'card_not_present_transactions' => 'double', - 'merchant_category_code' => null, - 'payment_transaction_number' => 'double', - 'january' => 'double', - 'february' => 'double', - 'march' => 'double', - 'april' => 'double', - 'may' => 'double', - 'june' => 'double', - 'july' => 'double', - 'august' => 'double', - 'sept' => 'double', - 'october' => 'double', - 'november' => 'double', - 'december' => 'double', - 'rents' => 'double', - 'royalties' => 'double', - 'other_income' => 'double', - 'fed_income_tax_withheld' => 'double', - 'fishing_boat_proceeds' => 'double', - 'medical_and_health_care_payments' => 'double', - 'substitute_payments' => 'double', - 'direct_sales_indicator' => null, - 'crop_insurance_proceeds' => 'double', - 'excess_golden_parachute_payments' => 'double', - 'gross_proceeds_paid_to_attorney' => 'double', - 'fish_purchased_for_resale' => 'double', - 'section409_a_deferrals' => 'double', - 'nonqualified_deferred_compensation' => 'double', - 'nonemployee_compensation' => 'double', - 'gross_distributions' => 'double', - 'taxable_amount' => 'double', - 'taxable_amount_not_determined' => null, - 'total_distribution_indicator' => null, - 'capital_gain' => 'double', - 'employee_contributions' => 'double', - 'net_unrealized_appreciation' => 'double', - 'distribution_code_required' => null, - 'distribution_code_optional' => null, - 'ira_sep_simple_indicator' => null, - 'total_ira_sep_simple_distribution' => 'double', - 'other' => 'double', - 'other_percent' => null, - 'percentage_total_distribution' => null, - 'total_employee_contributions' => 'double', - 'amount_allocable_to_irr' => 'double', - 'first_year_designated_roth_contrib' => null, - 'fatca_requirement_indicator' => null, - 'date_of_payment' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', - 'tin' => 'tin', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'recipient_name' => 'recipientName', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'validation_errors' => 'validationErrors', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'unique_form_id' => 'uniqueFormId', - 'recipient_date_of_birth' => 'recipientDateOfBirth', - 'recipient_giin' => 'recipientGiin', - 'recipient_foreign_tin' => 'recipientForeignTin', - 'lob_code' => 'lobCode', - 'income_code' => 'incomeCode', - 'gross_income' => 'grossIncome', - 'withholding_indicator' => 'withholdingIndicator', - 'tax_country_code' => 'taxCountryCode', - 'exemption_code_chap3' => 'exemptionCodeChap3', - 'exemption_code_chap4' => 'exemptionCodeChap4', - 'tax_rate_chap3' => 'taxRateChap3', - 'withholding_allowance' => 'withholdingAllowance', - 'federal_tax_withheld' => 'federalTaxWithheld', - 'tax_not_deposited_indicator' => 'taxNotDepositedIndicator', - 'academic_indicator' => 'academicIndicator', - 'tax_withheld_other_agents' => 'taxWithheldOtherAgents', - 'amount_repaid' => 'amountRepaid', - 'tax_paid_agent' => 'taxPaidAgent', - 'chap3_status_code' => 'chap3StatusCode', - 'chap4_status_code' => 'chap4StatusCode', - 'primary_withholding_agent' => 'primaryWithholdingAgent', - 'intermediary_or_flow_through' => 'intermediaryOrFlowThrough', - 'origin_of_health_coverage_code' => 'originOfHealthCoverageCode', - 'covered_individuals' => 'coveredIndividuals', - 'total_ordinary_dividends' => 'totalOrdinaryDividends', - 'qualified_dividends' => 'qualifiedDividends', - 'total_capital_gain_distributions' => 'totalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'unrecapturedSection1250Gain', - 'section1202_gain' => 'section1202Gain', - 'collectibles_gain' => 'collectiblesGain', - 'section897_ordinary_dividends' => 'section897OrdinaryDividends', - 'section897_capital_gain' => 'section897CapitalGain', - 'nondividend_distributions' => 'nondividendDistributions', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'section199_a_dividends' => 'section199ADividends', - 'investment_expenses' => 'investmentExpenses', - 'foreign_tax_paid' => 'foreignTaxPaid', - 'foreign_country_or_us_possession' => 'foreignCountryOrUSPossession', - 'cash_liquidation_distributions' => 'cashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'noncashLiquidationDistributions', - 'exempt_interest_dividends' => 'exemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'specifiedPrivateActivityBondInterestDividends', - 'filer_type' => 'filerType', - 'payment_type' => 'paymentType', - 'payment_settlement_entity_name_phone_number' => 'paymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'grossAmountPaymentCard', - 'card_not_present_transactions' => 'cardNotPresentTransactions', - 'merchant_category_code' => 'merchantCategoryCode', - 'payment_transaction_number' => 'paymentTransactionNumber', - 'january' => 'january', - 'february' => 'february', - 'march' => 'march', - 'april' => 'april', - 'may' => 'may', - 'june' => 'june', - 'july' => 'july', - 'august' => 'august', - 'sept' => 'sept', - 'october' => 'october', - 'november' => 'november', - 'december' => 'december', - 'rents' => 'rents', - 'royalties' => 'royalties', - 'other_income' => 'otherIncome', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'fishingBoatProceeds', - 'medical_and_health_care_payments' => 'medicalAndHealthCarePayments', - 'substitute_payments' => 'substitutePayments', - 'direct_sales_indicator' => 'directSalesIndicator', - 'crop_insurance_proceeds' => 'cropInsuranceProceeds', - 'excess_golden_parachute_payments' => 'excessGoldenParachutePayments', - 'gross_proceeds_paid_to_attorney' => 'grossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'fishPurchasedForResale', - 'section409_a_deferrals' => 'section409ADeferrals', - 'nonqualified_deferred_compensation' => 'nonqualifiedDeferredCompensation', - 'nonemployee_compensation' => 'nonemployeeCompensation', - 'gross_distributions' => 'grossDistributions', - 'taxable_amount' => 'taxableAmount', - 'taxable_amount_not_determined' => 'taxableAmountNotDetermined', - 'total_distribution_indicator' => 'totalDistributionIndicator', - 'capital_gain' => 'capitalGain', - 'employee_contributions' => 'employeeContributions', - 'net_unrealized_appreciation' => 'netUnrealizedAppreciation', - 'distribution_code_required' => 'distributionCodeRequired', - 'distribution_code_optional' => 'distributionCodeOptional', - 'ira_sep_simple_indicator' => 'iraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'totalIraSepSimpleDistribution', - 'other' => 'other', - 'other_percent' => 'otherPercent', - 'percentage_total_distribution' => 'percentageTotalDistribution', - 'total_employee_contributions' => 'totalEmployeeContributions', - 'amount_allocable_to_irr' => 'amountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'firstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'fatcaRequirementIndicator', - 'date_of_payment' => 'dateOfPayment' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', - 'tin' => 'setTin', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'recipient_name' => 'setRecipientName', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'validation_errors' => 'setValidationErrors', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'unique_form_id' => 'setUniqueFormId', - 'recipient_date_of_birth' => 'setRecipientDateOfBirth', - 'recipient_giin' => 'setRecipientGiin', - 'recipient_foreign_tin' => 'setRecipientForeignTin', - 'lob_code' => 'setLobCode', - 'income_code' => 'setIncomeCode', - 'gross_income' => 'setGrossIncome', - 'withholding_indicator' => 'setWithholdingIndicator', - 'tax_country_code' => 'setTaxCountryCode', - 'exemption_code_chap3' => 'setExemptionCodeChap3', - 'exemption_code_chap4' => 'setExemptionCodeChap4', - 'tax_rate_chap3' => 'setTaxRateChap3', - 'withholding_allowance' => 'setWithholdingAllowance', - 'federal_tax_withheld' => 'setFederalTaxWithheld', - 'tax_not_deposited_indicator' => 'setTaxNotDepositedIndicator', - 'academic_indicator' => 'setAcademicIndicator', - 'tax_withheld_other_agents' => 'setTaxWithheldOtherAgents', - 'amount_repaid' => 'setAmountRepaid', - 'tax_paid_agent' => 'setTaxPaidAgent', - 'chap3_status_code' => 'setChap3StatusCode', - 'chap4_status_code' => 'setChap4StatusCode', - 'primary_withholding_agent' => 'setPrimaryWithholdingAgent', - 'intermediary_or_flow_through' => 'setIntermediaryOrFlowThrough', - 'origin_of_health_coverage_code' => 'setOriginOfHealthCoverageCode', - 'covered_individuals' => 'setCoveredIndividuals', - 'total_ordinary_dividends' => 'setTotalOrdinaryDividends', - 'qualified_dividends' => 'setQualifiedDividends', - 'total_capital_gain_distributions' => 'setTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'setUnrecapturedSection1250Gain', - 'section1202_gain' => 'setSection1202Gain', - 'collectibles_gain' => 'setCollectiblesGain', - 'section897_ordinary_dividends' => 'setSection897OrdinaryDividends', - 'section897_capital_gain' => 'setSection897CapitalGain', - 'nondividend_distributions' => 'setNondividendDistributions', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'section199_a_dividends' => 'setSection199ADividends', - 'investment_expenses' => 'setInvestmentExpenses', - 'foreign_tax_paid' => 'setForeignTaxPaid', - 'foreign_country_or_us_possession' => 'setForeignCountryOrUsPossession', - 'cash_liquidation_distributions' => 'setCashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'setNoncashLiquidationDistributions', - 'exempt_interest_dividends' => 'setExemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'setSpecifiedPrivateActivityBondInterestDividends', - 'filer_type' => 'setFilerType', - 'payment_type' => 'setPaymentType', - 'payment_settlement_entity_name_phone_number' => 'setPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'setGrossAmountPaymentCard', - 'card_not_present_transactions' => 'setCardNotPresentTransactions', - 'merchant_category_code' => 'setMerchantCategoryCode', - 'payment_transaction_number' => 'setPaymentTransactionNumber', - 'january' => 'setJanuary', - 'february' => 'setFebruary', - 'march' => 'setMarch', - 'april' => 'setApril', - 'may' => 'setMay', - 'june' => 'setJune', - 'july' => 'setJuly', - 'august' => 'setAugust', - 'sept' => 'setSept', - 'october' => 'setOctober', - 'november' => 'setNovember', - 'december' => 'setDecember', - 'rents' => 'setRents', - 'royalties' => 'setRoyalties', - 'other_income' => 'setOtherIncome', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'setFishingBoatProceeds', - 'medical_and_health_care_payments' => 'setMedicalAndHealthCarePayments', - 'substitute_payments' => 'setSubstitutePayments', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'crop_insurance_proceeds' => 'setCropInsuranceProceeds', - 'excess_golden_parachute_payments' => 'setExcessGoldenParachutePayments', - 'gross_proceeds_paid_to_attorney' => 'setGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'setFishPurchasedForResale', - 'section409_a_deferrals' => 'setSection409ADeferrals', - 'nonqualified_deferred_compensation' => 'setNonqualifiedDeferredCompensation', - 'nonemployee_compensation' => 'setNonemployeeCompensation', - 'gross_distributions' => 'setGrossDistributions', - 'taxable_amount' => 'setTaxableAmount', - 'taxable_amount_not_determined' => 'setTaxableAmountNotDetermined', - 'total_distribution_indicator' => 'setTotalDistributionIndicator', - 'capital_gain' => 'setCapitalGain', - 'employee_contributions' => 'setEmployeeContributions', - 'net_unrealized_appreciation' => 'setNetUnrealizedAppreciation', - 'distribution_code_required' => 'setDistributionCodeRequired', - 'distribution_code_optional' => 'setDistributionCodeOptional', - 'ira_sep_simple_indicator' => 'setIraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'setTotalIraSepSimpleDistribution', - 'other' => 'setOther', - 'other_percent' => 'setOtherPercent', - 'percentage_total_distribution' => 'setPercentageTotalDistribution', - 'total_employee_contributions' => 'setTotalEmployeeContributions', - 'amount_allocable_to_irr' => 'setAmountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'setFirstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'setFatcaRequirementIndicator', - 'date_of_payment' => 'setDateOfPayment' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', - 'tin' => 'getTin', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'recipient_name' => 'getRecipientName', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'validation_errors' => 'getValidationErrors', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'unique_form_id' => 'getUniqueFormId', - 'recipient_date_of_birth' => 'getRecipientDateOfBirth', - 'recipient_giin' => 'getRecipientGiin', - 'recipient_foreign_tin' => 'getRecipientForeignTin', - 'lob_code' => 'getLobCode', - 'income_code' => 'getIncomeCode', - 'gross_income' => 'getGrossIncome', - 'withholding_indicator' => 'getWithholdingIndicator', - 'tax_country_code' => 'getTaxCountryCode', - 'exemption_code_chap3' => 'getExemptionCodeChap3', - 'exemption_code_chap4' => 'getExemptionCodeChap4', - 'tax_rate_chap3' => 'getTaxRateChap3', - 'withholding_allowance' => 'getWithholdingAllowance', - 'federal_tax_withheld' => 'getFederalTaxWithheld', - 'tax_not_deposited_indicator' => 'getTaxNotDepositedIndicator', - 'academic_indicator' => 'getAcademicIndicator', - 'tax_withheld_other_agents' => 'getTaxWithheldOtherAgents', - 'amount_repaid' => 'getAmountRepaid', - 'tax_paid_agent' => 'getTaxPaidAgent', - 'chap3_status_code' => 'getChap3StatusCode', - 'chap4_status_code' => 'getChap4StatusCode', - 'primary_withholding_agent' => 'getPrimaryWithholdingAgent', - 'intermediary_or_flow_through' => 'getIntermediaryOrFlowThrough', - 'origin_of_health_coverage_code' => 'getOriginOfHealthCoverageCode', - 'covered_individuals' => 'getCoveredIndividuals', - 'total_ordinary_dividends' => 'getTotalOrdinaryDividends', - 'qualified_dividends' => 'getQualifiedDividends', - 'total_capital_gain_distributions' => 'getTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'getUnrecapturedSection1250Gain', - 'section1202_gain' => 'getSection1202Gain', - 'collectibles_gain' => 'getCollectiblesGain', - 'section897_ordinary_dividends' => 'getSection897OrdinaryDividends', - 'section897_capital_gain' => 'getSection897CapitalGain', - 'nondividend_distributions' => 'getNondividendDistributions', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'section199_a_dividends' => 'getSection199ADividends', - 'investment_expenses' => 'getInvestmentExpenses', - 'foreign_tax_paid' => 'getForeignTaxPaid', - 'foreign_country_or_us_possession' => 'getForeignCountryOrUsPossession', - 'cash_liquidation_distributions' => 'getCashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'getNoncashLiquidationDistributions', - 'exempt_interest_dividends' => 'getExemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'getSpecifiedPrivateActivityBondInterestDividends', - 'filer_type' => 'getFilerType', - 'payment_type' => 'getPaymentType', - 'payment_settlement_entity_name_phone_number' => 'getPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'getGrossAmountPaymentCard', - 'card_not_present_transactions' => 'getCardNotPresentTransactions', - 'merchant_category_code' => 'getMerchantCategoryCode', - 'payment_transaction_number' => 'getPaymentTransactionNumber', - 'january' => 'getJanuary', - 'february' => 'getFebruary', - 'march' => 'getMarch', - 'april' => 'getApril', - 'may' => 'getMay', - 'june' => 'getJune', - 'july' => 'getJuly', - 'august' => 'getAugust', - 'sept' => 'getSept', - 'october' => 'getOctober', - 'november' => 'getNovember', - 'december' => 'getDecember', - 'rents' => 'getRents', - 'royalties' => 'getRoyalties', - 'other_income' => 'getOtherIncome', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'getFishingBoatProceeds', - 'medical_and_health_care_payments' => 'getMedicalAndHealthCarePayments', - 'substitute_payments' => 'getSubstitutePayments', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'crop_insurance_proceeds' => 'getCropInsuranceProceeds', - 'excess_golden_parachute_payments' => 'getExcessGoldenParachutePayments', - 'gross_proceeds_paid_to_attorney' => 'getGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'getFishPurchasedForResale', - 'section409_a_deferrals' => 'getSection409ADeferrals', - 'nonqualified_deferred_compensation' => 'getNonqualifiedDeferredCompensation', - 'nonemployee_compensation' => 'getNonemployeeCompensation', - 'gross_distributions' => 'getGrossDistributions', - 'taxable_amount' => 'getTaxableAmount', - 'taxable_amount_not_determined' => 'getTaxableAmountNotDetermined', - 'total_distribution_indicator' => 'getTotalDistributionIndicator', - 'capital_gain' => 'getCapitalGain', - 'employee_contributions' => 'getEmployeeContributions', - 'net_unrealized_appreciation' => 'getNetUnrealizedAppreciation', - 'distribution_code_required' => 'getDistributionCodeRequired', - 'distribution_code_optional' => 'getDistributionCodeOptional', - 'ira_sep_simple_indicator' => 'getIraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'getTotalIraSepSimpleDistribution', - 'other' => 'getOther', - 'other_percent' => 'getOtherPercent', - 'percentage_total_distribution' => 'getPercentageTotalDistribution', - 'total_employee_contributions' => 'getTotalEmployeeContributions', - 'amount_allocable_to_irr' => 'getAmountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'getFirstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'getFatcaRequirementIndicator', - 'date_of_payment' => 'getDateOfPayment' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const FILER_TYPE_PSE = 'PSE'; - const FILER_TYPE_EPF = 'EPF'; - const FILER_TYPE_OTHER = 'Other'; - const PAYMENT_TYPE_MERCHANT_PAYMENT_CARD = 'MerchantPaymentCard'; - const PAYMENT_TYPE_THIRD_PARTY_NETWORK = 'ThirdPartyNetwork'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getFilerTypeAllowableValues() - { - return [ - self::FILER_TYPE_PSE, - self::FILER_TYPE_EPF, - self::FILER_TYPE_OTHER, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPaymentTypeAllowableValues() - { - return [ - self::PAYMENT_TYPE_MERCHANT_PAYMENT_CARD, - self::PAYMENT_TYPE_THIRD_PARTY_NETWORK, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['unique_form_id'] = $data['unique_form_id'] ?? null; - $this->container['recipient_date_of_birth'] = $data['recipient_date_of_birth'] ?? null; - $this->container['recipient_giin'] = $data['recipient_giin'] ?? null; - $this->container['recipient_foreign_tin'] = $data['recipient_foreign_tin'] ?? null; - $this->container['lob_code'] = $data['lob_code'] ?? null; - $this->container['income_code'] = $data['income_code'] ?? null; - $this->container['gross_income'] = $data['gross_income'] ?? null; - $this->container['withholding_indicator'] = $data['withholding_indicator'] ?? null; - $this->container['tax_country_code'] = $data['tax_country_code'] ?? null; - $this->container['exemption_code_chap3'] = $data['exemption_code_chap3'] ?? null; - $this->container['exemption_code_chap4'] = $data['exemption_code_chap4'] ?? null; - $this->container['tax_rate_chap3'] = $data['tax_rate_chap3'] ?? null; - $this->container['withholding_allowance'] = $data['withholding_allowance'] ?? null; - $this->container['federal_tax_withheld'] = $data['federal_tax_withheld'] ?? null; - $this->container['tax_not_deposited_indicator'] = $data['tax_not_deposited_indicator'] ?? null; - $this->container['academic_indicator'] = $data['academic_indicator'] ?? null; - $this->container['tax_withheld_other_agents'] = $data['tax_withheld_other_agents'] ?? null; - $this->container['amount_repaid'] = $data['amount_repaid'] ?? null; - $this->container['tax_paid_agent'] = $data['tax_paid_agent'] ?? null; - $this->container['chap3_status_code'] = $data['chap3_status_code'] ?? null; - $this->container['chap4_status_code'] = $data['chap4_status_code'] ?? null; - $this->container['primary_withholding_agent'] = $data['primary_withholding_agent'] ?? null; - $this->container['intermediary_or_flow_through'] = $data['intermediary_or_flow_through'] ?? null; - $this->container['origin_of_health_coverage_code'] = $data['origin_of_health_coverage_code'] ?? null; - $this->container['covered_individuals'] = $data['covered_individuals'] ?? null; - $this->container['total_ordinary_dividends'] = $data['total_ordinary_dividends'] ?? null; - $this->container['qualified_dividends'] = $data['qualified_dividends'] ?? null; - $this->container['total_capital_gain_distributions'] = $data['total_capital_gain_distributions'] ?? null; - $this->container['unrecaptured_section1250_gain'] = $data['unrecaptured_section1250_gain'] ?? null; - $this->container['section1202_gain'] = $data['section1202_gain'] ?? null; - $this->container['collectibles_gain'] = $data['collectibles_gain'] ?? null; - $this->container['section897_ordinary_dividends'] = $data['section897_ordinary_dividends'] ?? null; - $this->container['section897_capital_gain'] = $data['section897_capital_gain'] ?? null; - $this->container['nondividend_distributions'] = $data['nondividend_distributions'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['section199_a_dividends'] = $data['section199_a_dividends'] ?? null; - $this->container['investment_expenses'] = $data['investment_expenses'] ?? null; - $this->container['foreign_tax_paid'] = $data['foreign_tax_paid'] ?? null; - $this->container['foreign_country_or_us_possession'] = $data['foreign_country_or_us_possession'] ?? null; - $this->container['cash_liquidation_distributions'] = $data['cash_liquidation_distributions'] ?? null; - $this->container['noncash_liquidation_distributions'] = $data['noncash_liquidation_distributions'] ?? null; - $this->container['exempt_interest_dividends'] = $data['exempt_interest_dividends'] ?? null; - $this->container['specified_private_activity_bond_interest_dividends'] = $data['specified_private_activity_bond_interest_dividends'] ?? null; - $this->container['filer_type'] = $data['filer_type'] ?? null; - $this->container['payment_type'] = $data['payment_type'] ?? null; - $this->container['payment_settlement_entity_name_phone_number'] = $data['payment_settlement_entity_name_phone_number'] ?? null; - $this->container['gross_amount_payment_card'] = $data['gross_amount_payment_card'] ?? null; - $this->container['card_not_present_transactions'] = $data['card_not_present_transactions'] ?? null; - $this->container['merchant_category_code'] = $data['merchant_category_code'] ?? null; - $this->container['payment_transaction_number'] = $data['payment_transaction_number'] ?? null; - $this->container['january'] = $data['january'] ?? null; - $this->container['february'] = $data['february'] ?? null; - $this->container['march'] = $data['march'] ?? null; - $this->container['april'] = $data['april'] ?? null; - $this->container['may'] = $data['may'] ?? null; - $this->container['june'] = $data['june'] ?? null; - $this->container['july'] = $data['july'] ?? null; - $this->container['august'] = $data['august'] ?? null; - $this->container['sept'] = $data['sept'] ?? null; - $this->container['october'] = $data['october'] ?? null; - $this->container['november'] = $data['november'] ?? null; - $this->container['december'] = $data['december'] ?? null; - $this->container['rents'] = $data['rents'] ?? null; - $this->container['royalties'] = $data['royalties'] ?? null; - $this->container['other_income'] = $data['other_income'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; - $this->container['fishing_boat_proceeds'] = $data['fishing_boat_proceeds'] ?? null; - $this->container['medical_and_health_care_payments'] = $data['medical_and_health_care_payments'] ?? null; - $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['crop_insurance_proceeds'] = $data['crop_insurance_proceeds'] ?? null; - $this->container['excess_golden_parachute_payments'] = $data['excess_golden_parachute_payments'] ?? null; - $this->container['gross_proceeds_paid_to_attorney'] = $data['gross_proceeds_paid_to_attorney'] ?? null; - $this->container['fish_purchased_for_resale'] = $data['fish_purchased_for_resale'] ?? null; - $this->container['section409_a_deferrals'] = $data['section409_a_deferrals'] ?? null; - $this->container['nonqualified_deferred_compensation'] = $data['nonqualified_deferred_compensation'] ?? null; - $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - $this->container['gross_distributions'] = $data['gross_distributions'] ?? null; - $this->container['taxable_amount'] = $data['taxable_amount'] ?? null; - $this->container['taxable_amount_not_determined'] = $data['taxable_amount_not_determined'] ?? null; - $this->container['total_distribution_indicator'] = $data['total_distribution_indicator'] ?? null; - $this->container['capital_gain'] = $data['capital_gain'] ?? null; - $this->container['employee_contributions'] = $data['employee_contributions'] ?? null; - $this->container['net_unrealized_appreciation'] = $data['net_unrealized_appreciation'] ?? null; - $this->container['distribution_code_required'] = $data['distribution_code_required'] ?? null; - $this->container['distribution_code_optional'] = $data['distribution_code_optional'] ?? null; - $this->container['ira_sep_simple_indicator'] = $data['ira_sep_simple_indicator'] ?? null; - $this->container['total_ira_sep_simple_distribution'] = $data['total_ira_sep_simple_distribution'] ?? null; - $this->container['other'] = $data['other'] ?? null; - $this->container['other_percent'] = $data['other_percent'] ?? null; - $this->container['percentage_total_distribution'] = $data['percentage_total_distribution'] ?? null; - $this->container['total_employee_contributions'] = $data['total_employee_contributions'] ?? null; - $this->container['amount_allocable_to_irr'] = $data['amount_allocable_to_irr'] ?? null; - $this->container['first_year_designated_roth_contrib'] = $data['first_year_designated_roth_contrib'] ?? null; - $this->container['fatca_requirement_indicator'] = $data['fatca_requirement_indicator'] ?? null; - $this->container['date_of_payment'] = $data['date_of_payment'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ((mb_strlen($this->container['id']) < 1)) { - $invalidProperties[] = "invalid value for 'id', the character length must be bigger than or equal to 1."; - } - - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ((mb_strlen($this->container['type']) < 1)) { - $invalidProperties[] = "invalid value for 'type', the character length must be bigger than or equal to 1."; - } - - if ($this->container['issuer_id'] === null) { - $invalidProperties[] = "'issuer_id' can't be null"; - } - if ($this->container['federal_efile'] === null) { - $invalidProperties[] = "'federal_efile' can't be null"; - } - if ($this->container['state_efile'] === null) { - $invalidProperties[] = "'state_efile' can't be null"; - } - if ($this->container['postal_mail'] === null) { - $invalidProperties[] = "'postal_mail' can't be null"; - } - if ($this->container['tin_match'] === null) { - $invalidProperties[] = "'tin_match' can't be null"; - } - if ($this->container['address_verification'] === null) { - $invalidProperties[] = "'address_verification' can't be null"; - } - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($this->container['filer_type']) && !in_array($this->container['filer_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'filer_type', must be one of '%s'", - $this->container['filer_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($this->container['payment_type']) && !in_array($this->container['payment_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'payment_type', must be one of '%s'", - $this->container['payment_type'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID of the form - * - * @return self - */ - public function setId($id) - { - - if ((mb_strlen($id) < 1)) { - throw new \InvalidArgumentException('invalid length for $id when calling Form1099ListResponseValueInner., must be bigger than or equal to 1.'); - } - - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * - * @return self - */ - public function setType($type) - { - - if ((mb_strlen($type) < 1)) { - throw new \InvalidArgumentException('invalid length for $type when calling Form1099ListResponseValueInner., must be bigger than or equal to 1.'); - } - - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return int - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param int $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets federal_efile - * - * @return bool - */ - public function getFederalEfile() - { - return $this->container['federal_efile']; - } - - /** - * Sets federal_efile - * - * @param bool $federal_efile Boolean indicating that federal e-filing has been scheduled for this form - * - * @return self - */ - public function setFederalEfile($federal_efile) - { - $this->container['federal_efile'] = $federal_efile; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status Federal e-file status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets state_efile - * - * @return bool - */ - public function getStateEfile() - { - return $this->container['state_efile']; - } - - /** - * Sets state_efile - * - * @param bool $state_efile Boolean indicating that state e-filing has been scheduled for this form - * - * @return self - */ - public function setStateEfile($state_efile) - { - $this->container['state_efile'] = $state_efile; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status State e-file status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool $postal_mail Boolean indicating that postal mailing to the recipient has been scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status Postal mail to recipient status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool $tin_match Boolean indicating that TIN Matching has been scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status TIN Match status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool $address_verification Boolean indicating that address verification has been scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status Address verification status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status EDelivery status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin Recipient Tax ID Number - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second Tin Notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address Address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city City - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account Number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office Code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors Validation errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Creation time - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Update time - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets unique_form_id - * - * @return string|null - */ - public function getUniqueFormId() - { - return $this->container['unique_form_id']; - } - - /** - * Sets unique_form_id - * - * @param string|null $unique_form_id Unique form identifier - * - * @return self - */ - public function setUniqueFormId($unique_form_id) - { - $this->container['unique_form_id'] = $unique_form_id; - - return $this; - } - - /** - * Gets recipient_date_of_birth - * - * @return \DateTime|null - */ - public function getRecipientDateOfBirth() - { - return $this->container['recipient_date_of_birth']; - } - - /** - * Sets recipient_date_of_birth - * - * @param \DateTime|null $recipient_date_of_birth Recipient's date of birth - * - * @return self - */ - public function setRecipientDateOfBirth($recipient_date_of_birth) - { - $this->container['recipient_date_of_birth'] = $recipient_date_of_birth; - - return $this; - } - - /** - * Gets recipient_giin - * - * @return string|null - */ - public function getRecipientGiin() - { - return $this->container['recipient_giin']; - } - - /** - * Sets recipient_giin - * - * @param string|null $recipient_giin Recipient's GIIN (Global Intermediary Identification Number) - * - * @return self - */ - public function setRecipientGiin($recipient_giin) - { - $this->container['recipient_giin'] = $recipient_giin; - - return $this; - } - - /** - * Gets recipient_foreign_tin - * - * @return string|null - */ - public function getRecipientForeignTin() - { - return $this->container['recipient_foreign_tin']; - } - - /** - * Sets recipient_foreign_tin - * - * @param string|null $recipient_foreign_tin Recipient's foreign TIN - * - * @return self - */ - public function setRecipientForeignTin($recipient_foreign_tin) - { - $this->container['recipient_foreign_tin'] = $recipient_foreign_tin; - - return $this; - } - - /** - * Gets lob_code - * - * @return string|null - */ - public function getLobCode() - { - return $this->container['lob_code']; - } - - /** - * Sets lob_code - * - * @param string|null $lob_code Limitation on benefits code - * - * @return self - */ - public function setLobCode($lob_code) - { - $this->container['lob_code'] = $lob_code; - - return $this; - } - - /** - * Gets income_code - * - * @return string|null - */ - public function getIncomeCode() - { - return $this->container['income_code']; - } - - /** - * Sets income_code - * - * @param string|null $income_code Income code - * - * @return self - */ - public function setIncomeCode($income_code) - { - $this->container['income_code'] = $income_code; - - return $this; - } - - /** - * Gets gross_income - * - * @return float|null - */ - public function getGrossIncome() - { - return $this->container['gross_income']; - } - - /** - * Sets gross_income - * - * @param float|null $gross_income Gross income - * - * @return self - */ - public function setGrossIncome($gross_income) - { - $this->container['gross_income'] = $gross_income; - - return $this; - } - - /** - * Gets withholding_indicator - * - * @return string|null - */ - public function getWithholdingIndicator() - { - return $this->container['withholding_indicator']; - } - - /** - * Sets withholding_indicator - * - * @param string|null $withholding_indicator Withholding indicator - * - * @return self - */ - public function setWithholdingIndicator($withholding_indicator) - { - $this->container['withholding_indicator'] = $withholding_indicator; - - return $this; - } - - /** - * Gets tax_country_code - * - * @return string|null - */ - public function getTaxCountryCode() - { - return $this->container['tax_country_code']; - } - - /** - * Sets tax_country_code - * - * @param string|null $tax_country_code Country code - * - * @return self - */ - public function setTaxCountryCode($tax_country_code) - { - $this->container['tax_country_code'] = $tax_country_code; - - return $this; - } - - /** - * Gets exemption_code_chap3 - * - * @return string|null - */ - public function getExemptionCodeChap3() - { - return $this->container['exemption_code_chap3']; - } - - /** - * Sets exemption_code_chap3 - * - * @param string|null $exemption_code_chap3 Exemption code (Chapter 3) - * - * @return self - */ - public function setExemptionCodeChap3($exemption_code_chap3) - { - $this->container['exemption_code_chap3'] = $exemption_code_chap3; - - return $this; - } - - /** - * Gets exemption_code_chap4 - * - * @return string|null - */ - public function getExemptionCodeChap4() - { - return $this->container['exemption_code_chap4']; - } - - /** - * Sets exemption_code_chap4 - * - * @param string|null $exemption_code_chap4 Exemption code (Chapter 4) - * - * @return self - */ - public function setExemptionCodeChap4($exemption_code_chap4) - { - $this->container['exemption_code_chap4'] = $exemption_code_chap4; - - return $this; - } - - /** - * Gets tax_rate_chap3 - * - * @return string|null - */ - public function getTaxRateChap3() - { - return $this->container['tax_rate_chap3']; - } - - /** - * Sets tax_rate_chap3 - * - * @param string|null $tax_rate_chap3 Tax rate (Chapter 3) - * - * @return self - */ - public function setTaxRateChap3($tax_rate_chap3) - { - $this->container['tax_rate_chap3'] = $tax_rate_chap3; - - return $this; - } - - /** - * Gets withholding_allowance - * - * @return float|null - */ - public function getWithholdingAllowance() - { - return $this->container['withholding_allowance']; - } - - /** - * Sets withholding_allowance - * - * @param float|null $withholding_allowance Withholding allowance - * - * @return self - */ - public function setWithholdingAllowance($withholding_allowance) - { - $this->container['withholding_allowance'] = $withholding_allowance; - - return $this; - } - - /** - * Gets federal_tax_withheld - * - * @return float|null - */ - public function getFederalTaxWithheld() - { - return $this->container['federal_tax_withheld']; - } - - /** - * Sets federal_tax_withheld - * - * @param float|null $federal_tax_withheld Federal tax withheld - * - * @return self - */ - public function setFederalTaxWithheld($federal_tax_withheld) - { - $this->container['federal_tax_withheld'] = $federal_tax_withheld; - - return $this; - } - - /** - * Gets tax_not_deposited_indicator - * - * @return bool|null - */ - public function getTaxNotDepositedIndicator() - { - return $this->container['tax_not_deposited_indicator']; - } - - /** - * Sets tax_not_deposited_indicator - * - * @param bool|null $tax_not_deposited_indicator Tax not deposited indicator - * - * @return self - */ - public function setTaxNotDepositedIndicator($tax_not_deposited_indicator) - { - $this->container['tax_not_deposited_indicator'] = $tax_not_deposited_indicator; - - return $this; - } - - /** - * Gets academic_indicator - * - * @return bool|null - */ - public function getAcademicIndicator() - { - return $this->container['academic_indicator']; - } - - /** - * Sets academic_indicator - * - * @param bool|null $academic_indicator Academic indicator - * - * @return self - */ - public function setAcademicIndicator($academic_indicator) - { - $this->container['academic_indicator'] = $academic_indicator; - - return $this; - } - - /** - * Gets tax_withheld_other_agents - * - * @return float|null - */ - public function getTaxWithheldOtherAgents() - { - return $this->container['tax_withheld_other_agents']; - } - - /** - * Sets tax_withheld_other_agents - * - * @param float|null $tax_withheld_other_agents Tax withheld by other agents - * - * @return self - */ - public function setTaxWithheldOtherAgents($tax_withheld_other_agents) - { - $this->container['tax_withheld_other_agents'] = $tax_withheld_other_agents; - - return $this; - } - - /** - * Gets amount_repaid - * - * @return float|null - */ - public function getAmountRepaid() - { - return $this->container['amount_repaid']; - } - - /** - * Sets amount_repaid - * - * @param float|null $amount_repaid Amount repaid to recipient - * - * @return self - */ - public function setAmountRepaid($amount_repaid) - { - $this->container['amount_repaid'] = $amount_repaid; - - return $this; - } - - /** - * Gets tax_paid_agent - * - * @return float|null - */ - public function getTaxPaidAgent() - { - return $this->container['tax_paid_agent']; - } - - /** - * Sets tax_paid_agent - * - * @param float|null $tax_paid_agent Tax paid by withholding agent - * - * @return self - */ - public function setTaxPaidAgent($tax_paid_agent) - { - $this->container['tax_paid_agent'] = $tax_paid_agent; - - return $this; - } - - /** - * Gets chap3_status_code - * - * @return string|null - */ - public function getChap3StatusCode() - { - return $this->container['chap3_status_code']; - } - - /** - * Sets chap3_status_code - * - * @param string|null $chap3_status_code Chapter 3 status code - * - * @return self - */ - public function setChap3StatusCode($chap3_status_code) - { - $this->container['chap3_status_code'] = $chap3_status_code; - - return $this; - } - - /** - * Gets chap4_status_code - * - * @return string|null - */ - public function getChap4StatusCode() - { - return $this->container['chap4_status_code']; - } - - /** - * Sets chap4_status_code - * - * @param string|null $chap4_status_code Chapter 4 status code - * - * @return self - */ - public function setChap4StatusCode($chap4_status_code) - { - $this->container['chap4_status_code'] = $chap4_status_code; - - return $this; - } - - /** - * Gets primary_withholding_agent - * - * @return \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentResponse|null - */ - public function getPrimaryWithholdingAgent() - { - return $this->container['primary_withholding_agent']; - } - - /** - * Sets primary_withholding_agent - * - * @param \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentResponse|null $primary_withholding_agent Primary withholding agent information - * - * @return self - */ - public function setPrimaryWithholdingAgent($primary_withholding_agent) - { - $this->container['primary_withholding_agent'] = $primary_withholding_agent; - - return $this; - } - - /** - * Gets intermediary_or_flow_through - * - * @return \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughResponse|null - */ - public function getIntermediaryOrFlowThrough() - { - return $this->container['intermediary_or_flow_through']; - } - - /** - * Sets intermediary_or_flow_through - * - * @param \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughResponse|null $intermediary_or_flow_through Intermediary or flow-through entity information - * - * @return self - */ - public function setIntermediaryOrFlowThrough($intermediary_or_flow_through) - { - $this->container['intermediary_or_flow_through'] = $intermediary_or_flow_through; - - return $this; - } - - /** - * Gets origin_of_health_coverage_code - * - * @return string|null - */ - public function getOriginOfHealthCoverageCode() - { - return $this->container['origin_of_health_coverage_code']; - } - - /** - * Sets origin_of_health_coverage_code - * - * @param string|null $origin_of_health_coverage_code Origin of health coverage code - * - * @return self - */ - public function setOriginOfHealthCoverageCode($origin_of_health_coverage_code) - { - $this->container['origin_of_health_coverage_code'] = $origin_of_health_coverage_code; - - return $this; - } - - /** - * Gets covered_individuals - * - * @return \Avalara\SDK\Model\A1099\V2\CoveredIndividualReferenceResponse[]|null - */ - public function getCoveredIndividuals() - { - return $this->container['covered_individuals']; - } - - /** - * Sets covered_individuals - * - * @param \Avalara\SDK\Model\A1099\V2\CoveredIndividualReferenceResponse[]|null $covered_individuals Covered individuals information - * - * @return self - */ - public function setCoveredIndividuals($covered_individuals) - { - - - $this->container['covered_individuals'] = $covered_individuals; - - return $this; - } - - /** - * Gets total_ordinary_dividends - * - * @return string|null - */ - public function getTotalOrdinaryDividends() - { - return $this->container['total_ordinary_dividends']; - } - - /** - * Sets total_ordinary_dividends - * - * @param string|null $total_ordinary_dividends Total ordinary dividends - * - * @return self - */ - public function setTotalOrdinaryDividends($total_ordinary_dividends) - { - $this->container['total_ordinary_dividends'] = $total_ordinary_dividends; - - return $this; - } - - /** - * Gets qualified_dividends - * - * @return string|null - */ - public function getQualifiedDividends() - { - return $this->container['qualified_dividends']; - } - - /** - * Sets qualified_dividends - * - * @param string|null $qualified_dividends Qualified dividends - * - * @return self - */ - public function setQualifiedDividends($qualified_dividends) - { - $this->container['qualified_dividends'] = $qualified_dividends; - - return $this; - } - - /** - * Gets total_capital_gain_distributions - * - * @return string|null - */ - public function getTotalCapitalGainDistributions() - { - return $this->container['total_capital_gain_distributions']; - } - - /** - * Sets total_capital_gain_distributions - * - * @param string|null $total_capital_gain_distributions Total capital gain distributions - * - * @return self - */ - public function setTotalCapitalGainDistributions($total_capital_gain_distributions) - { - $this->container['total_capital_gain_distributions'] = $total_capital_gain_distributions; - - return $this; - } - - /** - * Gets unrecaptured_section1250_gain - * - * @return string|null - */ - public function getUnrecapturedSection1250Gain() - { - return $this->container['unrecaptured_section1250_gain']; - } - - /** - * Sets unrecaptured_section1250_gain - * - * @param string|null $unrecaptured_section1250_gain Unrecaptured Section 1250 gain - * - * @return self - */ - public function setUnrecapturedSection1250Gain($unrecaptured_section1250_gain) - { - $this->container['unrecaptured_section1250_gain'] = $unrecaptured_section1250_gain; - - return $this; - } - - /** - * Gets section1202_gain - * - * @return string|null - */ - public function getSection1202Gain() - { - return $this->container['section1202_gain']; - } - - /** - * Sets section1202_gain - * - * @param string|null $section1202_gain Section 1202 gain - * - * @return self - */ - public function setSection1202Gain($section1202_gain) - { - $this->container['section1202_gain'] = $section1202_gain; - - return $this; - } - - /** - * Gets collectibles_gain - * - * @return string|null - */ - public function getCollectiblesGain() - { - return $this->container['collectibles_gain']; - } - - /** - * Sets collectibles_gain - * - * @param string|null $collectibles_gain Collectibles (28%) gain - * - * @return self - */ - public function setCollectiblesGain($collectibles_gain) - { - $this->container['collectibles_gain'] = $collectibles_gain; - - return $this; - } - - /** - * Gets section897_ordinary_dividends - * - * @return string|null - */ - public function getSection897OrdinaryDividends() - { - return $this->container['section897_ordinary_dividends']; - } - - /** - * Sets section897_ordinary_dividends - * - * @param string|null $section897_ordinary_dividends Section 897 ordinary dividends - * - * @return self - */ - public function setSection897OrdinaryDividends($section897_ordinary_dividends) - { - $this->container['section897_ordinary_dividends'] = $section897_ordinary_dividends; - - return $this; - } - - /** - * Gets section897_capital_gain - * - * @return string|null - */ - public function getSection897CapitalGain() - { - return $this->container['section897_capital_gain']; - } - - /** - * Sets section897_capital_gain - * - * @param string|null $section897_capital_gain Section 897 capital gain - * - * @return self - */ - public function setSection897CapitalGain($section897_capital_gain) - { - $this->container['section897_capital_gain'] = $section897_capital_gain; - - return $this; - } - - /** - * Gets nondividend_distributions - * - * @return string|null - */ - public function getNondividendDistributions() - { - return $this->container['nondividend_distributions']; - } - - /** - * Sets nondividend_distributions - * - * @param string|null $nondividend_distributions Nondividend distributions - * - * @return self - */ - public function setNondividendDistributions($nondividend_distributions) - { - $this->container['nondividend_distributions'] = $nondividend_distributions; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets section199_a_dividends - * - * @return string|null - */ - public function getSection199ADividends() - { - return $this->container['section199_a_dividends']; - } - - /** - * Sets section199_a_dividends - * - * @param string|null $section199_a_dividends Section 199A dividends - * - * @return self - */ - public function setSection199ADividends($section199_a_dividends) - { - $this->container['section199_a_dividends'] = $section199_a_dividends; - - return $this; - } - - /** - * Gets investment_expenses - * - * @return string|null - */ - public function getInvestmentExpenses() - { - return $this->container['investment_expenses']; - } - - /** - * Sets investment_expenses - * - * @param string|null $investment_expenses Investment expenses - * - * @return self - */ - public function setInvestmentExpenses($investment_expenses) - { - $this->container['investment_expenses'] = $investment_expenses; - - return $this; - } - - /** - * Gets foreign_tax_paid - * - * @return string|null - */ - public function getForeignTaxPaid() - { - return $this->container['foreign_tax_paid']; - } - - /** - * Sets foreign_tax_paid - * - * @param string|null $foreign_tax_paid Foreign tax paid - * - * @return self - */ - public function setForeignTaxPaid($foreign_tax_paid) - { - $this->container['foreign_tax_paid'] = $foreign_tax_paid; - - return $this; - } - - /** - * Gets foreign_country_or_us_possession - * - * @return string|null - */ - public function getForeignCountryOrUsPossession() - { - return $this->container['foreign_country_or_us_possession']; - } - - /** - * Sets foreign_country_or_us_possession - * - * @param string|null $foreign_country_or_us_possession Foreign country or U.S. possession - * - * @return self - */ - public function setForeignCountryOrUsPossession($foreign_country_or_us_possession) - { - $this->container['foreign_country_or_us_possession'] = $foreign_country_or_us_possession; - - return $this; - } - - /** - * Gets cash_liquidation_distributions - * - * @return string|null - */ - public function getCashLiquidationDistributions() - { - return $this->container['cash_liquidation_distributions']; - } - - /** - * Sets cash_liquidation_distributions - * - * @param string|null $cash_liquidation_distributions Cash liquidation distributions - * - * @return self - */ - public function setCashLiquidationDistributions($cash_liquidation_distributions) - { - $this->container['cash_liquidation_distributions'] = $cash_liquidation_distributions; - - return $this; - } - - /** - * Gets noncash_liquidation_distributions - * - * @return string|null - */ - public function getNoncashLiquidationDistributions() - { - return $this->container['noncash_liquidation_distributions']; - } - - /** - * Sets noncash_liquidation_distributions - * - * @param string|null $noncash_liquidation_distributions Noncash liquidation distributions - * - * @return self - */ - public function setNoncashLiquidationDistributions($noncash_liquidation_distributions) - { - $this->container['noncash_liquidation_distributions'] = $noncash_liquidation_distributions; - - return $this; - } - - /** - * Gets exempt_interest_dividends - * - * @return string|null - */ - public function getExemptInterestDividends() - { - return $this->container['exempt_interest_dividends']; - } - - /** - * Sets exempt_interest_dividends - * - * @param string|null $exempt_interest_dividends Exempt-interest dividends - * - * @return self - */ - public function setExemptInterestDividends($exempt_interest_dividends) - { - $this->container['exempt_interest_dividends'] = $exempt_interest_dividends; - - return $this; - } - - /** - * Gets specified_private_activity_bond_interest_dividends - * - * @return string|null - */ - public function getSpecifiedPrivateActivityBondInterestDividends() - { - return $this->container['specified_private_activity_bond_interest_dividends']; - } - - /** - * Sets specified_private_activity_bond_interest_dividends - * - * @param string|null $specified_private_activity_bond_interest_dividends Specified private activity bond interest dividends - * - * @return self - */ - public function setSpecifiedPrivateActivityBondInterestDividends($specified_private_activity_bond_interest_dividends) - { - $this->container['specified_private_activity_bond_interest_dividends'] = $specified_private_activity_bond_interest_dividends; - - return $this; - } - - /** - * Gets filer_type - * - * @return string|null - */ - public function getFilerType() - { - return $this->container['filer_type']; - } - - /** - * Sets filer_type - * - * @param string|null $filer_type Filer type (PSE or EPF) - * - * @return self - */ - public function setFilerType($filer_type) - { - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($filer_type) && !in_array($filer_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'filer_type', must be one of '%s'", - $filer_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['filer_type'] = $filer_type; - - return $this; - } - - /** - * Gets payment_type - * - * @return string|null - */ - public function getPaymentType() - { - return $this->container['payment_type']; - } - - /** - * Sets payment_type - * - * @param string|null $payment_type Payment type (payment card or third party network) - * - * @return self - */ - public function setPaymentType($payment_type) - { - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($payment_type) && !in_array($payment_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'payment_type', must be one of '%s'", - $payment_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['payment_type'] = $payment_type; - - return $this; - } - - /** - * Gets payment_settlement_entity_name_phone_number - * - * @return string|null - */ - public function getPaymentSettlementEntityNamePhoneNumber() - { - return $this->container['payment_settlement_entity_name_phone_number']; - } - - /** - * Sets payment_settlement_entity_name_phone_number - * - * @param string|null $payment_settlement_entity_name_phone_number Payment settlement entity name and phone number - * - * @return self - */ - public function setPaymentSettlementEntityNamePhoneNumber($payment_settlement_entity_name_phone_number) - { - $this->container['payment_settlement_entity_name_phone_number'] = $payment_settlement_entity_name_phone_number; - - return $this; - } - - /** - * Gets gross_amount_payment_card - * - * @return float|null - */ - public function getGrossAmountPaymentCard() - { - return $this->container['gross_amount_payment_card']; - } - - /** - * Sets gross_amount_payment_card - * - * @param float|null $gross_amount_payment_card Gross amount of payment card/third party network transactions - * - * @return self - */ - public function setGrossAmountPaymentCard($gross_amount_payment_card) - { - $this->container['gross_amount_payment_card'] = $gross_amount_payment_card; - - return $this; - } - - /** - * Gets card_not_present_transactions - * - * @return float|null - */ - public function getCardNotPresentTransactions() - { - return $this->container['card_not_present_transactions']; - } - - /** - * Sets card_not_present_transactions - * - * @param float|null $card_not_present_transactions Card not present transactions - * - * @return self - */ - public function setCardNotPresentTransactions($card_not_present_transactions) - { - $this->container['card_not_present_transactions'] = $card_not_present_transactions; - - return $this; - } - - /** - * Gets merchant_category_code - * - * @return string|null - */ - public function getMerchantCategoryCode() - { - return $this->container['merchant_category_code']; - } - - /** - * Sets merchant_category_code - * - * @param string|null $merchant_category_code Merchant category code - * - * @return self - */ - public function setMerchantCategoryCode($merchant_category_code) - { - $this->container['merchant_category_code'] = $merchant_category_code; - - return $this; - } - - /** - * Gets payment_transaction_number - * - * @return float|null - */ - public function getPaymentTransactionNumber() - { - return $this->container['payment_transaction_number']; - } - - /** - * Sets payment_transaction_number - * - * @param float|null $payment_transaction_number Number of payment transactions - * - * @return self - */ - public function setPaymentTransactionNumber($payment_transaction_number) - { - $this->container['payment_transaction_number'] = $payment_transaction_number; - - return $this; - } - - /** - * Gets january - * - * @return float|null - */ - public function getJanuary() - { - return $this->container['january']; - } - - /** - * Sets january - * - * @param float|null $january January gross payments - * - * @return self - */ - public function setJanuary($january) - { - $this->container['january'] = $january; - - return $this; - } - - /** - * Gets february - * - * @return float|null - */ - public function getFebruary() - { - return $this->container['february']; - } - - /** - * Sets february - * - * @param float|null $february February gross payments - * - * @return self - */ - public function setFebruary($february) - { - $this->container['february'] = $february; - - return $this; - } - - /** - * Gets march - * - * @return float|null - */ - public function getMarch() - { - return $this->container['march']; - } - - /** - * Sets march - * - * @param float|null $march March gross payments - * - * @return self - */ - public function setMarch($march) - { - $this->container['march'] = $march; - - return $this; - } - - /** - * Gets april - * - * @return float|null - */ - public function getApril() - { - return $this->container['april']; - } - - /** - * Sets april - * - * @param float|null $april April gross payments - * - * @return self - */ - public function setApril($april) - { - $this->container['april'] = $april; - - return $this; - } - - /** - * Gets may - * - * @return float|null - */ - public function getMay() - { - return $this->container['may']; - } - - /** - * Sets may - * - * @param float|null $may May gross payments - * - * @return self - */ - public function setMay($may) - { - $this->container['may'] = $may; - - return $this; - } - - /** - * Gets june - * - * @return float|null - */ - public function getJune() - { - return $this->container['june']; - } - - /** - * Sets june - * - * @param float|null $june June gross payments - * - * @return self - */ - public function setJune($june) - { - $this->container['june'] = $june; - - return $this; - } - - /** - * Gets july - * - * @return float|null - */ - public function getJuly() - { - return $this->container['july']; - } - - /** - * Sets july - * - * @param float|null $july July gross payments - * - * @return self - */ - public function setJuly($july) - { - $this->container['july'] = $july; - - return $this; - } - - /** - * Gets august - * - * @return float|null - */ - public function getAugust() - { - return $this->container['august']; - } - - /** - * Sets august - * - * @param float|null $august August gross payments - * - * @return self - */ - public function setAugust($august) - { - $this->container['august'] = $august; - - return $this; - } - - /** - * Gets sept - * - * @return float|null - */ - public function getSept() - { - return $this->container['sept']; - } - - /** - * Sets sept - * - * @param float|null $sept September gross payments - * - * @return self - */ - public function setSept($sept) - { - $this->container['sept'] = $sept; - - return $this; - } - - /** - * Gets october - * - * @return float|null - */ - public function getOctober() - { - return $this->container['october']; - } - - /** - * Sets october - * - * @param float|null $october October gross payments - * - * @return self - */ - public function setOctober($october) - { - $this->container['october'] = $october; - - return $this; - } - - /** - * Gets november - * - * @return float|null - */ - public function getNovember() - { - return $this->container['november']; - } - - /** - * Sets november - * - * @param float|null $november November gross payments - * - * @return self - */ - public function setNovember($november) - { - $this->container['november'] = $november; - - return $this; - } - - /** - * Gets december - * - * @return float|null - */ - public function getDecember() - { - return $this->container['december']; - } - - /** - * Sets december - * - * @param float|null $december December gross payments - * - * @return self - */ - public function setDecember($december) - { - $this->container['december'] = $december; - - return $this; - } - - /** - * Gets rents - * - * @return float|null - */ - public function getRents() - { - return $this->container['rents']; - } - - /** - * Sets rents - * - * @param float|null $rents Rents - * - * @return self - */ - public function setRents($rents) - { - $this->container['rents'] = $rents; - - return $this; - } - - /** - * Gets royalties - * - * @return float|null - */ - public function getRoyalties() - { - return $this->container['royalties']; - } - - /** - * Sets royalties - * - * @param float|null $royalties Royalties - * - * @return self - */ - public function setRoyalties($royalties) - { - $this->container['royalties'] = $royalties; - - return $this; - } - - /** - * Gets other_income - * - * @return float|null - */ - public function getOtherIncome() - { - return $this->container['other_income']; - } - - /** - * Sets other_income - * - * @param float|null $other_income Other income - * - * @return self - */ - public function setOtherIncome($other_income) - { - $this->container['other_income'] = $other_income; - - return $this; - } - - /** - * Gets fed_income_tax_withheld - * - * @return float|null - */ - public function getFedIncomeTaxWithheld() - { - return $this->container['fed_income_tax_withheld']; - } - - /** - * Sets fed_income_tax_withheld - * - * @param float|null $fed_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) - { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; - - return $this; - } - - /** - * Gets fishing_boat_proceeds - * - * @return float|null - */ - public function getFishingBoatProceeds() - { - return $this->container['fishing_boat_proceeds']; - } - - /** - * Sets fishing_boat_proceeds - * - * @param float|null $fishing_boat_proceeds Fishing boat proceeds - * - * @return self - */ - public function setFishingBoatProceeds($fishing_boat_proceeds) - { - $this->container['fishing_boat_proceeds'] = $fishing_boat_proceeds; - - return $this; - } - - /** - * Gets medical_and_health_care_payments - * - * @return float|null - */ - public function getMedicalAndHealthCarePayments() - { - return $this->container['medical_and_health_care_payments']; - } - - /** - * Sets medical_and_health_care_payments - * - * @param float|null $medical_and_health_care_payments Medical and health care payments - * - * @return self - */ - public function setMedicalAndHealthCarePayments($medical_and_health_care_payments) - { - $this->container['medical_and_health_care_payments'] = $medical_and_health_care_payments; - - return $this; - } - - /** - * Gets substitute_payments - * - * @return float|null - */ - public function getSubstitutePayments() - { - return $this->container['substitute_payments']; - } - - /** - * Sets substitute_payments - * - * @param float|null $substitute_payments Substitute payments in lieu of dividends or interest - * - * @return self - */ - public function setSubstitutePayments($substitute_payments) - { - $this->container['substitute_payments'] = $substitute_payments; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets crop_insurance_proceeds - * - * @return float|null - */ - public function getCropInsuranceProceeds() - { - return $this->container['crop_insurance_proceeds']; - } - - /** - * Sets crop_insurance_proceeds - * - * @param float|null $crop_insurance_proceeds Crop insurance proceeds - * - * @return self - */ - public function setCropInsuranceProceeds($crop_insurance_proceeds) - { - $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; - - return $this; - } - - /** - * Gets excess_golden_parachute_payments - * - * @return float|null - */ - public function getExcessGoldenParachutePayments() - { - return $this->container['excess_golden_parachute_payments']; - } - - /** - * Sets excess_golden_parachute_payments - * - * @param float|null $excess_golden_parachute_payments (Legacy field) Excess golden parachute payments - * - * @return self - */ - public function setExcessGoldenParachutePayments($excess_golden_parachute_payments) - { - $this->container['excess_golden_parachute_payments'] = $excess_golden_parachute_payments; - - return $this; - } - - /** - * Gets gross_proceeds_paid_to_attorney - * - * @return float|null - */ - public function getGrossProceedsPaidToAttorney() - { - return $this->container['gross_proceeds_paid_to_attorney']; - } - - /** - * Sets gross_proceeds_paid_to_attorney - * - * @param float|null $gross_proceeds_paid_to_attorney Gross proceeds paid to an attorney - * - * @return self - */ - public function setGrossProceedsPaidToAttorney($gross_proceeds_paid_to_attorney) - { - $this->container['gross_proceeds_paid_to_attorney'] = $gross_proceeds_paid_to_attorney; - - return $this; - } - - /** - * Gets fish_purchased_for_resale - * - * @return float|null - */ - public function getFishPurchasedForResale() - { - return $this->container['fish_purchased_for_resale']; - } - - /** - * Sets fish_purchased_for_resale - * - * @param float|null $fish_purchased_for_resale Fish purchased for resale - * - * @return self - */ - public function setFishPurchasedForResale($fish_purchased_for_resale) - { - $this->container['fish_purchased_for_resale'] = $fish_purchased_for_resale; - - return $this; - } - - /** - * Gets section409_a_deferrals - * - * @return float|null - */ - public function getSection409ADeferrals() - { - return $this->container['section409_a_deferrals']; - } - - /** - * Sets section409_a_deferrals - * - * @param float|null $section409_a_deferrals Section 409A deferrals - * - * @return self - */ - public function setSection409ADeferrals($section409_a_deferrals) - { - $this->container['section409_a_deferrals'] = $section409_a_deferrals; - - return $this; - } - - /** - * Gets nonqualified_deferred_compensation - * - * @return float|null - */ - public function getNonqualifiedDeferredCompensation() - { - return $this->container['nonqualified_deferred_compensation']; - } - - /** - * Sets nonqualified_deferred_compensation - * - * @param float|null $nonqualified_deferred_compensation Nonqualified deferred compensation - * - * @return self - */ - public function setNonqualifiedDeferredCompensation($nonqualified_deferred_compensation) - { - $this->container['nonqualified_deferred_compensation'] = $nonqualified_deferred_compensation; - - return $this; - } - - /** - * Gets nonemployee_compensation - * - * @return float|null - */ - public function getNonemployeeCompensation() - { - return $this->container['nonemployee_compensation']; - } - - /** - * Sets nonemployee_compensation - * - * @param float|null $nonemployee_compensation Nonemployee compensation - * - * @return self - */ - public function setNonemployeeCompensation($nonemployee_compensation) - { - $this->container['nonemployee_compensation'] = $nonemployee_compensation; - - return $this; - } - - /** - * Gets gross_distributions - * - * @return float|null - */ - public function getGrossDistributions() - { - return $this->container['gross_distributions']; - } - - /** - * Sets gross_distributions - * - * @param float|null $gross_distributions Gross distribution - * - * @return self - */ - public function setGrossDistributions($gross_distributions) - { - $this->container['gross_distributions'] = $gross_distributions; - - return $this; - } - - /** - * Gets taxable_amount - * - * @return float|null - */ - public function getTaxableAmount() - { - return $this->container['taxable_amount']; - } - - /** - * Sets taxable_amount - * - * @param float|null $taxable_amount Taxable amount - * - * @return self - */ - public function setTaxableAmount($taxable_amount) - { - $this->container['taxable_amount'] = $taxable_amount; - - return $this; - } - - /** - * Gets taxable_amount_not_determined - * - * @return bool|null - */ - public function getTaxableAmountNotDetermined() - { - return $this->container['taxable_amount_not_determined']; - } - - /** - * Sets taxable_amount_not_determined - * - * @param bool|null $taxable_amount_not_determined Taxable amount not determined - * - * @return self - */ - public function setTaxableAmountNotDetermined($taxable_amount_not_determined) - { - $this->container['taxable_amount_not_determined'] = $taxable_amount_not_determined; - - return $this; - } - - /** - * Gets total_distribution_indicator - * - * @return bool|null - */ - public function getTotalDistributionIndicator() - { - return $this->container['total_distribution_indicator']; - } - - /** - * Sets total_distribution_indicator - * - * @param bool|null $total_distribution_indicator Total distribution - * - * @return self - */ - public function setTotalDistributionIndicator($total_distribution_indicator) - { - $this->container['total_distribution_indicator'] = $total_distribution_indicator; - - return $this; - } - - /** - * Gets capital_gain - * - * @return float|null - */ - public function getCapitalGain() - { - return $this->container['capital_gain']; - } - - /** - * Sets capital_gain - * - * @param float|null $capital_gain Capital gain (included in Box 2a) - * - * @return self - */ - public function setCapitalGain($capital_gain) - { - $this->container['capital_gain'] = $capital_gain; - - return $this; - } - - /** - * Gets employee_contributions - * - * @return float|null - */ - public function getEmployeeContributions() - { - return $this->container['employee_contributions']; - } - - /** - * Sets employee_contributions - * - * @param float|null $employee_contributions Employee contributions/Designated Roth contributions or insurance premiums - * - * @return self - */ - public function setEmployeeContributions($employee_contributions) - { - $this->container['employee_contributions'] = $employee_contributions; - - return $this; - } - - /** - * Gets net_unrealized_appreciation - * - * @return float|null - */ - public function getNetUnrealizedAppreciation() - { - return $this->container['net_unrealized_appreciation']; - } - - /** - * Sets net_unrealized_appreciation - * - * @param float|null $net_unrealized_appreciation Net unrealized appreciation in employer's securities - * - * @return self - */ - public function setNetUnrealizedAppreciation($net_unrealized_appreciation) - { - $this->container['net_unrealized_appreciation'] = $net_unrealized_appreciation; - - return $this; - } - - /** - * Gets distribution_code_required - * - * @return string|null - */ - public function getDistributionCodeRequired() - { - return $this->container['distribution_code_required']; - } - - /** - * Sets distribution_code_required - * - * @param string|null $distribution_code_required Distribution code - * - * @return self - */ - public function setDistributionCodeRequired($distribution_code_required) - { - $this->container['distribution_code_required'] = $distribution_code_required; - - return $this; - } - - /** - * Gets distribution_code_optional - * - * @return string|null - */ - public function getDistributionCodeOptional() - { - return $this->container['distribution_code_optional']; - } - - /** - * Sets distribution_code_optional - * - * @param string|null $distribution_code_optional Second distribution code - * - * @return self - */ - public function setDistributionCodeOptional($distribution_code_optional) - { - $this->container['distribution_code_optional'] = $distribution_code_optional; - - return $this; - } - - /** - * Gets ira_sep_simple_indicator - * - * @return bool|null - */ - public function getIraSepSimpleIndicator() - { - return $this->container['ira_sep_simple_indicator']; - } - - /** - * Sets ira_sep_simple_indicator - * - * @param bool|null $ira_sep_simple_indicator IRA/SEP/SIMPLE - * - * @return self - */ - public function setIraSepSimpleIndicator($ira_sep_simple_indicator) - { - $this->container['ira_sep_simple_indicator'] = $ira_sep_simple_indicator; - - return $this; - } - - /** - * Gets total_ira_sep_simple_distribution - * - * @return float|null - */ - public function getTotalIraSepSimpleDistribution() - { - return $this->container['total_ira_sep_simple_distribution']; - } - - /** - * Sets total_ira_sep_simple_distribution - * - * @param float|null $total_ira_sep_simple_distribution Traditional IRA/SEP/SIMPLE or Roth conversion amount - * - * @return self - */ - public function setTotalIraSepSimpleDistribution($total_ira_sep_simple_distribution) - { - $this->container['total_ira_sep_simple_distribution'] = $total_ira_sep_simple_distribution; - - return $this; - } - - /** - * Gets other - * - * @return float|null - */ - public function getOther() - { - return $this->container['other']; - } - - /** - * Sets other - * - * @param float|null $other Other amount - * - * @return self - */ - public function setOther($other) - { - $this->container['other'] = $other; - - return $this; - } - - /** - * Gets other_percent - * - * @return string|null - */ - public function getOtherPercent() - { - return $this->container['other_percent']; - } - - /** - * Sets other_percent - * - * @param string|null $other_percent Other percentage - * - * @return self - */ - public function setOtherPercent($other_percent) - { - $this->container['other_percent'] = $other_percent; - - return $this; - } - - /** - * Gets percentage_total_distribution - * - * @return string|null - */ - public function getPercentageTotalDistribution() - { - return $this->container['percentage_total_distribution']; - } - - /** - * Sets percentage_total_distribution - * - * @param string|null $percentage_total_distribution Total distribution percentage - * - * @return self - */ - public function setPercentageTotalDistribution($percentage_total_distribution) - { - $this->container['percentage_total_distribution'] = $percentage_total_distribution; - - return $this; - } - - /** - * Gets total_employee_contributions - * - * @return float|null - */ - public function getTotalEmployeeContributions() - { - return $this->container['total_employee_contributions']; - } - - /** - * Sets total_employee_contributions - * - * @param float|null $total_employee_contributions Total employee contributions - * - * @return self - */ - public function setTotalEmployeeContributions($total_employee_contributions) - { - $this->container['total_employee_contributions'] = $total_employee_contributions; - - return $this; - } - - /** - * Gets amount_allocable_to_irr - * - * @return float|null - */ - public function getAmountAllocableToIrr() - { - return $this->container['amount_allocable_to_irr']; - } - - /** - * Sets amount_allocable_to_irr - * - * @param float|null $amount_allocable_to_irr Amount allocable to IRR within 5 years - * - * @return self - */ - public function setAmountAllocableToIrr($amount_allocable_to_irr) - { - $this->container['amount_allocable_to_irr'] = $amount_allocable_to_irr; - - return $this; - } - - /** - * Gets first_year_designated_roth_contrib - * - * @return string|null - */ - public function getFirstYearDesignatedRothContrib() - { - return $this->container['first_year_designated_roth_contrib']; - } - - /** - * Sets first_year_designated_roth_contrib - * - * @param string|null $first_year_designated_roth_contrib First year of designated Roth contribution - * - * @return self - */ - public function setFirstYearDesignatedRothContrib($first_year_designated_roth_contrib) - { - $this->container['first_year_designated_roth_contrib'] = $first_year_designated_roth_contrib; - - return $this; - } - - /** - * Gets fatca_requirement_indicator - * - * @return bool|null - */ - public function getFatcaRequirementIndicator() - { - return $this->container['fatca_requirement_indicator']; - } - - /** - * Sets fatca_requirement_indicator - * - * @param bool|null $fatca_requirement_indicator FATCA filing requirement - * - * @return self - */ - public function setFatcaRequirementIndicator($fatca_requirement_indicator) - { - $this->container['fatca_requirement_indicator'] = $fatca_requirement_indicator; - - return $this; - } - - /** - * Gets date_of_payment - * - * @return string|null - */ - public function getDateOfPayment() - { - return $this->container['date_of_payment']; - } - - /** - * Sets date_of_payment - * - * @param string|null $date_of_payment Date of payment - * - * @return self - */ - public function setDateOfPayment($date_of_payment) - { - $this->container['date_of_payment'] = $date_of_payment; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099Misc.php b/lib/Model/A1099/V2/Form1099Misc.php index e164b7c..c696c99 100644 --- a/lib/Model/A1099/V2/Form1099Misc.php +++ b/lib/Model/A1099/V2/Form1099Misc.php @@ -20,7 +20,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) * * @category Avalara client libraries * @package Avalara\SDK\API\A1099\V2 @@ -47,6 +47,7 @@ * Form1099Misc Class Doc Comment * * @category Class + * @description Form 1099-MISC: Miscellaneous Income * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -74,50 +75,57 @@ class Form1099Misc implements ModelInterface, ArrayAccess, \JsonSerializable 'rents' => 'float', 'royalties' => 'float', 'other_income' => 'float', - 'fed_income_tax_withheld' => 'float', + 'federal_income_tax_withheld' => 'float', 'fishing_boat_proceeds' => 'float', - 'medical_and_health_care' => 'float', - 'nonemployee_compensation' => 'float', - 'substitute_payments' => 'float', + 'medical_and_health_care_payments' => 'float', 'direct_sales_indicator' => 'bool', + 'substitute_payments' => 'float', 'crop_insurance_proceeds' => 'float', - 'excess_golden_parachute' => 'float', - 'gross_amount_paid_attorney' => 'float', + 'gross_proceeds_paid_to_attorney' => 'float', + 'fish_purchased_for_resale' => 'float', 'section409_a_deferrals' => 'float', - 'section409_a_income' => 'float', - 'id' => 'string', + 'excess_golden_parachute_payments' => 'float', + 'nonqualified_deferred_compensation' => 'float', + 'fatca_filing_requirement' => 'bool', 'type' => 'string', - 'issuer_id' => 'int', + 'id' => 'string', + 'issuer_id' => 'string', 'issuer_reference_id' => 'string', 'issuer_tin' => 'string', 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', 'tin' => 'string', 'recipient_name' => 'string', + 'tin_type' => 'string', 'recipient_second_name' => 'string', 'address' => 'string', 'address2' => 'string', 'city' => 'string', 'state' => 'string', 'zip' => 'string', - 'foreign_province' => 'string', + 'email' => 'string', + 'account_number' => 'string', + 'office_code' => 'string', + 'non_us_province' => 'string', 'country_code' => 'string', + 'federal_efile_date' => '\DateTime', + 'postal_mail' => 'bool', + 'state_efile_date' => '\DateTime', + 'recipient_edelivery_date' => '\DateTime', + 'tin_match' => 'bool', + 'no_tin' => 'bool', + 'address_verification' => 'bool', + 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding', + 'second_tin_notice' => 'bool', + 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', + 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationError[]', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding' + 'updated_at' => '\DateTime' ]; /** @@ -131,50 +139,57 @@ class Form1099Misc implements ModelInterface, ArrayAccess, \JsonSerializable 'rents' => 'double', 'royalties' => 'double', 'other_income' => 'double', - 'fed_income_tax_withheld' => 'double', + 'federal_income_tax_withheld' => 'double', 'fishing_boat_proceeds' => 'double', - 'medical_and_health_care' => 'double', - 'nonemployee_compensation' => 'double', - 'substitute_payments' => 'double', + 'medical_and_health_care_payments' => 'double', 'direct_sales_indicator' => null, + 'substitute_payments' => 'double', 'crop_insurance_proceeds' => 'double', - 'excess_golden_parachute' => 'double', - 'gross_amount_paid_attorney' => 'double', + 'gross_proceeds_paid_to_attorney' => 'double', + 'fish_purchased_for_resale' => 'double', 'section409_a_deferrals' => 'double', - 'section409_a_income' => 'double', - 'id' => null, + 'excess_golden_parachute_payments' => 'double', + 'nonqualified_deferred_compensation' => 'double', + 'fatca_filing_requirement' => null, 'type' => null, - 'issuer_id' => 'int32', + 'id' => null, + 'issuer_id' => null, 'issuer_reference_id' => null, 'issuer_tin' => null, 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, 'reference_id' => null, - 'email' => null, - 'tin_type' => null, 'tin' => null, 'recipient_name' => null, + 'tin_type' => null, 'recipient_second_name' => null, 'address' => null, 'address2' => null, 'city' => null, 'state' => null, 'zip' => null, - 'foreign_province' => null, + 'email' => null, + 'account_number' => null, + 'office_code' => null, + 'non_us_province' => null, 'country_code' => null, + 'federal_efile_date' => 'date', + 'postal_mail' => null, + 'state_efile_date' => 'date', + 'recipient_edelivery_date' => 'date', + 'tin_match' => null, + 'no_tin' => null, + 'address_verification' => null, + 'state_and_local_withholding' => null, + 'second_tin_notice' => null, + 'federal_efile_status' => null, + 'state_efile_status' => null, + 'postal_mail_status' => null, + 'tin_match_status' => null, + 'address_verification_status' => null, + 'e_delivery_status' => null, 'validation_errors' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null + 'updated_at' => 'date-time' ]; /** @@ -207,50 +222,57 @@ public static function openAPIFormats() 'rents' => 'rents', 'royalties' => 'royalties', 'other_income' => 'otherIncome', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', + 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', 'fishing_boat_proceeds' => 'fishingBoatProceeds', - 'medical_and_health_care' => 'medicalAndHealthCare', - 'nonemployee_compensation' => 'nonemployeeCompensation', - 'substitute_payments' => 'substitutePayments', + 'medical_and_health_care_payments' => 'medicalAndHealthCarePayments', 'direct_sales_indicator' => 'directSalesIndicator', + 'substitute_payments' => 'substitutePayments', 'crop_insurance_proceeds' => 'cropInsuranceProceeds', - 'excess_golden_parachute' => 'excessGoldenParachute', - 'gross_amount_paid_attorney' => 'grossAmountPaidAttorney', + 'gross_proceeds_paid_to_attorney' => 'grossProceedsPaidToAttorney', + 'fish_purchased_for_resale' => 'fishPurchasedForResale', 'section409_a_deferrals' => 'section409ADeferrals', - 'section409_a_income' => 'section409AIncome', - 'id' => 'id', + 'excess_golden_parachute_payments' => 'excessGoldenParachutePayments', + 'nonqualified_deferred_compensation' => 'nonqualifiedDeferredCompensation', + 'fatca_filing_requirement' => 'fatcaFilingRequirement', 'type' => 'type', + 'id' => 'id', 'issuer_id' => 'issuerId', 'issuer_reference_id' => 'issuerReferenceId', 'issuer_tin' => 'issuerTin', 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', 'tin' => 'tin', 'recipient_name' => 'recipientName', + 'tin_type' => 'tinType', 'recipient_second_name' => 'recipientSecondName', 'address' => 'address', 'address2' => 'address2', 'city' => 'city', 'state' => 'state', 'zip' => 'zip', - 'foreign_province' => 'foreignProvince', + 'email' => 'email', + 'account_number' => 'accountNumber', + 'office_code' => 'officeCode', + 'non_us_province' => 'nonUsProvince', 'country_code' => 'countryCode', + 'federal_efile_date' => 'federalEfileDate', + 'postal_mail' => 'postalMail', + 'state_efile_date' => 'stateEfileDate', + 'recipient_edelivery_date' => 'recipientEdeliveryDate', + 'tin_match' => 'tinMatch', + 'no_tin' => 'noTin', + 'address_verification' => 'addressVerification', + 'state_and_local_withholding' => 'stateAndLocalWithholding', + 'second_tin_notice' => 'secondTinNotice', + 'federal_efile_status' => 'federalEfileStatus', + 'state_efile_status' => 'stateEfileStatus', + 'postal_mail_status' => 'postalMailStatus', + 'tin_match_status' => 'tinMatchStatus', + 'address_verification_status' => 'addressVerificationStatus', + 'e_delivery_status' => 'eDeliveryStatus', 'validation_errors' => 'validationErrors', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' + 'updated_at' => 'updatedAt' ]; /** @@ -262,50 +284,57 @@ public static function openAPIFormats() 'rents' => 'setRents', 'royalties' => 'setRoyalties', 'other_income' => 'setOtherIncome', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', + 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', 'fishing_boat_proceeds' => 'setFishingBoatProceeds', - 'medical_and_health_care' => 'setMedicalAndHealthCare', - 'nonemployee_compensation' => 'setNonemployeeCompensation', - 'substitute_payments' => 'setSubstitutePayments', + 'medical_and_health_care_payments' => 'setMedicalAndHealthCarePayments', 'direct_sales_indicator' => 'setDirectSalesIndicator', + 'substitute_payments' => 'setSubstitutePayments', 'crop_insurance_proceeds' => 'setCropInsuranceProceeds', - 'excess_golden_parachute' => 'setExcessGoldenParachute', - 'gross_amount_paid_attorney' => 'setGrossAmountPaidAttorney', + 'gross_proceeds_paid_to_attorney' => 'setGrossProceedsPaidToAttorney', + 'fish_purchased_for_resale' => 'setFishPurchasedForResale', 'section409_a_deferrals' => 'setSection409ADeferrals', - 'section409_a_income' => 'setSection409AIncome', - 'id' => 'setId', + 'excess_golden_parachute_payments' => 'setExcessGoldenParachutePayments', + 'nonqualified_deferred_compensation' => 'setNonqualifiedDeferredCompensation', + 'fatca_filing_requirement' => 'setFatcaFilingRequirement', 'type' => 'setType', + 'id' => 'setId', 'issuer_id' => 'setIssuerId', 'issuer_reference_id' => 'setIssuerReferenceId', 'issuer_tin' => 'setIssuerTin', 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', 'tin' => 'setTin', 'recipient_name' => 'setRecipientName', + 'tin_type' => 'setTinType', 'recipient_second_name' => 'setRecipientSecondName', 'address' => 'setAddress', 'address2' => 'setAddress2', 'city' => 'setCity', 'state' => 'setState', 'zip' => 'setZip', - 'foreign_province' => 'setForeignProvince', + 'email' => 'setEmail', + 'account_number' => 'setAccountNumber', + 'office_code' => 'setOfficeCode', + 'non_us_province' => 'setNonUsProvince', 'country_code' => 'setCountryCode', + 'federal_efile_date' => 'setFederalEfileDate', + 'postal_mail' => 'setPostalMail', + 'state_efile_date' => 'setStateEfileDate', + 'recipient_edelivery_date' => 'setRecipientEdeliveryDate', + 'tin_match' => 'setTinMatch', + 'no_tin' => 'setNoTin', + 'address_verification' => 'setAddressVerification', + 'state_and_local_withholding' => 'setStateAndLocalWithholding', + 'second_tin_notice' => 'setSecondTinNotice', + 'federal_efile_status' => 'setFederalEfileStatus', + 'state_efile_status' => 'setStateEfileStatus', + 'postal_mail_status' => 'setPostalMailStatus', + 'tin_match_status' => 'setTinMatchStatus', + 'address_verification_status' => 'setAddressVerificationStatus', + 'e_delivery_status' => 'setEDeliveryStatus', 'validation_errors' => 'setValidationErrors', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' + 'updated_at' => 'setUpdatedAt' ]; /** @@ -317,50 +346,57 @@ public static function openAPIFormats() 'rents' => 'getRents', 'royalties' => 'getRoyalties', 'other_income' => 'getOtherIncome', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', + 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', 'fishing_boat_proceeds' => 'getFishingBoatProceeds', - 'medical_and_health_care' => 'getMedicalAndHealthCare', - 'nonemployee_compensation' => 'getNonemployeeCompensation', - 'substitute_payments' => 'getSubstitutePayments', + 'medical_and_health_care_payments' => 'getMedicalAndHealthCarePayments', 'direct_sales_indicator' => 'getDirectSalesIndicator', + 'substitute_payments' => 'getSubstitutePayments', 'crop_insurance_proceeds' => 'getCropInsuranceProceeds', - 'excess_golden_parachute' => 'getExcessGoldenParachute', - 'gross_amount_paid_attorney' => 'getGrossAmountPaidAttorney', + 'gross_proceeds_paid_to_attorney' => 'getGrossProceedsPaidToAttorney', + 'fish_purchased_for_resale' => 'getFishPurchasedForResale', 'section409_a_deferrals' => 'getSection409ADeferrals', - 'section409_a_income' => 'getSection409AIncome', - 'id' => 'getId', + 'excess_golden_parachute_payments' => 'getExcessGoldenParachutePayments', + 'nonqualified_deferred_compensation' => 'getNonqualifiedDeferredCompensation', + 'fatca_filing_requirement' => 'getFatcaFilingRequirement', 'type' => 'getType', + 'id' => 'getId', 'issuer_id' => 'getIssuerId', 'issuer_reference_id' => 'getIssuerReferenceId', 'issuer_tin' => 'getIssuerTin', 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', 'tin' => 'getTin', 'recipient_name' => 'getRecipientName', + 'tin_type' => 'getTinType', 'recipient_second_name' => 'getRecipientSecondName', 'address' => 'getAddress', 'address2' => 'getAddress2', 'city' => 'getCity', 'state' => 'getState', 'zip' => 'getZip', - 'foreign_province' => 'getForeignProvince', + 'email' => 'getEmail', + 'account_number' => 'getAccountNumber', + 'office_code' => 'getOfficeCode', + 'non_us_province' => 'getNonUsProvince', 'country_code' => 'getCountryCode', + 'federal_efile_date' => 'getFederalEfileDate', + 'postal_mail' => 'getPostalMail', + 'state_efile_date' => 'getStateEfileDate', + 'recipient_edelivery_date' => 'getRecipientEdeliveryDate', + 'tin_match' => 'getTinMatch', + 'no_tin' => 'getNoTin', + 'address_verification' => 'getAddressVerification', + 'state_and_local_withholding' => 'getStateAndLocalWithholding', + 'second_tin_notice' => 'getSecondTinNotice', + 'federal_efile_status' => 'getFederalEfileStatus', + 'state_efile_status' => 'getStateEfileStatus', + 'postal_mail_status' => 'getPostalMailStatus', + 'tin_match_status' => 'getTinMatchStatus', + 'address_verification_status' => 'getAddressVerificationStatus', + 'e_delivery_status' => 'getEDeliveryStatus', 'validation_errors' => 'getValidationErrors', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' + 'updated_at' => 'getUpdatedAt' ]; /** @@ -404,6 +440,56 @@ public function getModelName() return self::$openAPIModelName; } + const TYPE__1099_NEC = '1099-NEC'; + const TYPE__1099_MISC = '1099-MISC'; + const TYPE__1099_DIV = '1099-DIV'; + const TYPE__1099_R = '1099-R'; + const TYPE__1099_K = '1099-K'; + const TYPE__1095_B = '1095-B'; + const TYPE__1042_S = '1042-S'; + const TYPE__1095_C = '1095-C'; + const TYPE__1099_INT = '1099-INT'; + const TIN_TYPE__EMPTY = 'Empty'; + const TIN_TYPE_EIN = 'EIN'; + const TIN_TYPE_SSN = 'SSN'; + const TIN_TYPE_ITIN = 'ITIN'; + const TIN_TYPE_ATIN = 'ATIN'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE__1099_NEC, + self::TYPE__1099_MISC, + self::TYPE__1099_DIV, + self::TYPE__1099_R, + self::TYPE__1099_K, + self::TYPE__1095_B, + self::TYPE__1042_S, + self::TYPE__1095_C, + self::TYPE__1099_INT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTinTypeAllowableValues() + { + return [ + self::TIN_TYPE__EMPTY, + self::TIN_TYPE_EIN, + self::TIN_TYPE_SSN, + self::TIN_TYPE_ITIN, + self::TIN_TYPE_ATIN, + ]; + } /** * Associative array for storing property values @@ -423,50 +509,57 @@ public function __construct(array $data = null) $this->container['rents'] = $data['rents'] ?? null; $this->container['royalties'] = $data['royalties'] ?? null; $this->container['other_income'] = $data['other_income'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; + $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; $this->container['fishing_boat_proceeds'] = $data['fishing_boat_proceeds'] ?? null; - $this->container['medical_and_health_care'] = $data['medical_and_health_care'] ?? null; - $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; + $this->container['medical_and_health_care_payments'] = $data['medical_and_health_care_payments'] ?? null; $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; + $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; $this->container['crop_insurance_proceeds'] = $data['crop_insurance_proceeds'] ?? null; - $this->container['excess_golden_parachute'] = $data['excess_golden_parachute'] ?? null; - $this->container['gross_amount_paid_attorney'] = $data['gross_amount_paid_attorney'] ?? null; + $this->container['gross_proceeds_paid_to_attorney'] = $data['gross_proceeds_paid_to_attorney'] ?? null; + $this->container['fish_purchased_for_resale'] = $data['fish_purchased_for_resale'] ?? null; $this->container['section409_a_deferrals'] = $data['section409_a_deferrals'] ?? null; - $this->container['section409_a_income'] = $data['section409_a_income'] ?? null; - $this->container['id'] = $data['id'] ?? null; + $this->container['excess_golden_parachute_payments'] = $data['excess_golden_parachute_payments'] ?? null; + $this->container['nonqualified_deferred_compensation'] = $data['nonqualified_deferred_compensation'] ?? null; + $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; $this->container['issuer_id'] = $data['issuer_id'] ?? null; $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['tin'] = $data['tin'] ?? null; $this->container['recipient_name'] = $data['recipient_name'] ?? null; + $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['address2'] = $data['address2'] ?? null; $this->container['city'] = $data['city'] ?? null; $this->container['state'] = $data['state'] ?? null; $this->container['zip'] = $data['zip'] ?? null; - $this->container['foreign_province'] = $data['foreign_province'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['account_number'] = $data['account_number'] ?? null; + $this->container['office_code'] = $data['office_code'] ?? null; + $this->container['non_us_province'] = $data['non_us_province'] ?? null; $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['federal_efile_date'] = $data['federal_efile_date'] ?? null; + $this->container['postal_mail'] = $data['postal_mail'] ?? null; + $this->container['state_efile_date'] = $data['state_efile_date'] ?? null; + $this->container['recipient_edelivery_date'] = $data['recipient_edelivery_date'] ?? null; + $this->container['tin_match'] = $data['tin_match'] ?? null; + $this->container['no_tin'] = $data['no_tin'] ?? null; + $this->container['address_verification'] = $data['address_verification'] ?? null; + $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; + $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; + $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; + $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; + $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; + $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; + $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; + $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['validation_errors'] = $data['validation_errors'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; } /** @@ -478,6 +571,39 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['recipient_name'] === null) { + $invalidProperties[] = "'recipient_name' can't be null"; + } + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tin_type', must be one of '%s'", + $this->container['tin_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } return $invalidProperties; } @@ -506,7 +632,7 @@ public function getRents() /** * Sets rents * - * @param float|null $rents rents + * @param float|null $rents Rents * * @return self */ @@ -530,7 +656,7 @@ public function getRoyalties() /** * Sets royalties * - * @param float|null $royalties royalties + * @param float|null $royalties Royalties * * @return self */ @@ -554,7 +680,7 @@ public function getOtherIncome() /** * Sets other_income * - * @param float|null $other_income other_income + * @param float|null $other_income Other income * * @return self */ @@ -566,25 +692,25 @@ public function setOtherIncome($other_income) } /** - * Gets fed_income_tax_withheld + * Gets federal_income_tax_withheld * * @return float|null */ - public function getFedIncomeTaxWithheld() + public function getFederalIncomeTaxWithheld() { - return $this->container['fed_income_tax_withheld']; + return $this->container['federal_income_tax_withheld']; } /** - * Sets fed_income_tax_withheld + * Sets federal_income_tax_withheld * - * @param float|null $fed_income_tax_withheld fed_income_tax_withheld + * @param float|null $federal_income_tax_withheld Federal income tax withheld * * @return self */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) + public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; + $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; return $this; } @@ -602,7 +728,7 @@ public function getFishingBoatProceeds() /** * Sets fishing_boat_proceeds * - * @param float|null $fishing_boat_proceeds fishing_boat_proceeds + * @param float|null $fishing_boat_proceeds Fishing boat proceeds * * @return self */ @@ -614,49 +740,49 @@ public function setFishingBoatProceeds($fishing_boat_proceeds) } /** - * Gets medical_and_health_care + * Gets medical_and_health_care_payments * * @return float|null */ - public function getMedicalAndHealthCare() + public function getMedicalAndHealthCarePayments() { - return $this->container['medical_and_health_care']; + return $this->container['medical_and_health_care_payments']; } /** - * Sets medical_and_health_care + * Sets medical_and_health_care_payments * - * @param float|null $medical_and_health_care medical_and_health_care + * @param float|null $medical_and_health_care_payments Medical and health care payments * * @return self */ - public function setMedicalAndHealthCare($medical_and_health_care) + public function setMedicalAndHealthCarePayments($medical_and_health_care_payments) { - $this->container['medical_and_health_care'] = $medical_and_health_care; + $this->container['medical_and_health_care_payments'] = $medical_and_health_care_payments; return $this; } /** - * Gets nonemployee_compensation + * Gets direct_sales_indicator * - * @return float|null + * @return bool|null */ - public function getNonemployeeCompensation() + public function getDirectSalesIndicator() { - return $this->container['nonemployee_compensation']; + return $this->container['direct_sales_indicator']; } /** - * Sets nonemployee_compensation + * Sets direct_sales_indicator * - * @param float|null $nonemployee_compensation nonemployee_compensation + * @param bool|null $direct_sales_indicator Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale * * @return self */ - public function setNonemployeeCompensation($nonemployee_compensation) + public function setDirectSalesIndicator($direct_sales_indicator) { - $this->container['nonemployee_compensation'] = $nonemployee_compensation; + $this->container['direct_sales_indicator'] = $direct_sales_indicator; return $this; } @@ -674,7 +800,7 @@ public function getSubstitutePayments() /** * Sets substitute_payments * - * @param float|null $substitute_payments substitute_payments + * @param float|null $substitute_payments Substitute payments in lieu of dividends or interest * * @return self */ @@ -686,169 +812,169 @@ public function setSubstitutePayments($substitute_payments) } /** - * Gets direct_sales_indicator + * Gets crop_insurance_proceeds * - * @return bool|null + * @return float|null */ - public function getDirectSalesIndicator() + public function getCropInsuranceProceeds() { - return $this->container['direct_sales_indicator']; + return $this->container['crop_insurance_proceeds']; } /** - * Sets direct_sales_indicator + * Sets crop_insurance_proceeds * - * @param bool|null $direct_sales_indicator direct_sales_indicator + * @param float|null $crop_insurance_proceeds Crop insurance proceeds * * @return self */ - public function setDirectSalesIndicator($direct_sales_indicator) + public function setCropInsuranceProceeds($crop_insurance_proceeds) { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; + $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; return $this; } /** - * Gets crop_insurance_proceeds + * Gets gross_proceeds_paid_to_attorney * * @return float|null */ - public function getCropInsuranceProceeds() + public function getGrossProceedsPaidToAttorney() { - return $this->container['crop_insurance_proceeds']; + return $this->container['gross_proceeds_paid_to_attorney']; } /** - * Sets crop_insurance_proceeds + * Sets gross_proceeds_paid_to_attorney * - * @param float|null $crop_insurance_proceeds crop_insurance_proceeds + * @param float|null $gross_proceeds_paid_to_attorney Gross proceeds paid to an attorney * * @return self */ - public function setCropInsuranceProceeds($crop_insurance_proceeds) + public function setGrossProceedsPaidToAttorney($gross_proceeds_paid_to_attorney) { - $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; + $this->container['gross_proceeds_paid_to_attorney'] = $gross_proceeds_paid_to_attorney; return $this; } /** - * Gets excess_golden_parachute + * Gets fish_purchased_for_resale * * @return float|null */ - public function getExcessGoldenParachute() + public function getFishPurchasedForResale() { - return $this->container['excess_golden_parachute']; + return $this->container['fish_purchased_for_resale']; } /** - * Sets excess_golden_parachute + * Sets fish_purchased_for_resale * - * @param float|null $excess_golden_parachute excess_golden_parachute + * @param float|null $fish_purchased_for_resale Fish purchased for resale * * @return self */ - public function setExcessGoldenParachute($excess_golden_parachute) + public function setFishPurchasedForResale($fish_purchased_for_resale) { - $this->container['excess_golden_parachute'] = $excess_golden_parachute; + $this->container['fish_purchased_for_resale'] = $fish_purchased_for_resale; return $this; } /** - * Gets gross_amount_paid_attorney + * Gets section409_a_deferrals * * @return float|null */ - public function getGrossAmountPaidAttorney() + public function getSection409ADeferrals() { - return $this->container['gross_amount_paid_attorney']; + return $this->container['section409_a_deferrals']; } /** - * Sets gross_amount_paid_attorney + * Sets section409_a_deferrals * - * @param float|null $gross_amount_paid_attorney gross_amount_paid_attorney + * @param float|null $section409_a_deferrals Section 409A deferrals * * @return self */ - public function setGrossAmountPaidAttorney($gross_amount_paid_attorney) + public function setSection409ADeferrals($section409_a_deferrals) { - $this->container['gross_amount_paid_attorney'] = $gross_amount_paid_attorney; + $this->container['section409_a_deferrals'] = $section409_a_deferrals; return $this; } /** - * Gets section409_a_deferrals + * Gets excess_golden_parachute_payments * * @return float|null */ - public function getSection409ADeferrals() + public function getExcessGoldenParachutePayments() { - return $this->container['section409_a_deferrals']; + return $this->container['excess_golden_parachute_payments']; } /** - * Sets section409_a_deferrals + * Sets excess_golden_parachute_payments * - * @param float|null $section409_a_deferrals section409_a_deferrals + * @param float|null $excess_golden_parachute_payments (Legacy field) Excess golden parachute payments * * @return self */ - public function setSection409ADeferrals($section409_a_deferrals) + public function setExcessGoldenParachutePayments($excess_golden_parachute_payments) { - $this->container['section409_a_deferrals'] = $section409_a_deferrals; + $this->container['excess_golden_parachute_payments'] = $excess_golden_parachute_payments; return $this; } /** - * Gets section409_a_income + * Gets nonqualified_deferred_compensation * * @return float|null */ - public function getSection409AIncome() + public function getNonqualifiedDeferredCompensation() { - return $this->container['section409_a_income']; + return $this->container['nonqualified_deferred_compensation']; } /** - * Sets section409_a_income + * Sets nonqualified_deferred_compensation * - * @param float|null $section409_a_income section409_a_income + * @param float|null $nonqualified_deferred_compensation Nonqualified deferred compensation * * @return self */ - public function setSection409AIncome($section409_a_income) + public function setNonqualifiedDeferredCompensation($nonqualified_deferred_compensation) { - $this->container['section409_a_income'] = $section409_a_income; + $this->container['nonqualified_deferred_compensation'] = $nonqualified_deferred_compensation; return $this; } /** - * Gets id + * Gets fatca_filing_requirement * - * @return string|null + * @return bool|null */ - public function getId() + public function getFatcaFilingRequirement() { - return $this->container['id']; + return $this->container['fatca_filing_requirement']; } /** - * Sets id + * Sets fatca_filing_requirement * - * @param string|null $id id + * @param bool|null $fatca_filing_requirement FATCA filing requirement * * @return self */ - public function setId($id) + public function setFatcaFilingRequirement($fatca_filing_requirement) { - $this->container['id'] = $id; + $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; return $this; } @@ -856,7 +982,7 @@ public function setId($id) /** * Gets type * - * @return string|null + * @return string */ public function getType() { @@ -866,21 +992,55 @@ public function getType() /** * Sets type * - * @param string|null $type type + * @param string $type Form type * * @return self */ public function setType($type) { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } $this->container['type'] = $type; return $this; } + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Form ID. Unique identifier set when the record is created. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** * Gets issuer_id * - * @return int|null + * @return string|null */ public function getIssuerId() { @@ -890,7 +1050,7 @@ public function getIssuerId() /** * Sets issuer_id * - * @param int|null $issuer_id issuer_id + * @param string|null $issuer_id Issuer ID - only required when creating forms * * @return self */ @@ -914,7 +1074,7 @@ public function getIssuerReferenceId() /** * Sets issuer_reference_id * - * @param string|null $issuer_reference_id issuer_reference_id + * @param string|null $issuer_reference_id Issuer Reference ID - only required when creating forms * * @return self */ @@ -938,7 +1098,7 @@ public function getIssuerTin() /** * Sets issuer_tin * - * @param string|null $issuer_tin issuer_tin + * @param string|null $issuer_tin Issuer TIN - readonly * * @return self */ @@ -962,7 +1122,7 @@ public function getTaxYear() /** * Sets tax_year * - * @param int|null $tax_year tax_year + * @param int|null $tax_year Tax Year - only required when creating forms * * @return self */ @@ -974,555 +1134,733 @@ public function setTaxYear($tax_year) } /** - * Gets federal_efile + * Gets reference_id * - * @return bool|null + * @return string|null */ - public function getFederalEfile() + public function getReferenceId() { - return $this->container['federal_efile']; + return $this->container['reference_id']; } /** - * Sets federal_efile + * Sets reference_id * - * @param bool|null $federal_efile federal_efile + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ - public function setFederalEfile($federal_efile) + public function setReferenceId($reference_id) { - $this->container['federal_efile'] = $federal_efile; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets federal_efile_status + * Gets tin * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getFederalEfileStatus() + public function getTin() { - return $this->container['federal_efile_status']; + return $this->container['tin']; } /** - * Sets federal_efile_status + * Sets tin * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status federal_efile_status + * @param string|null $tin Recipient's Federal Tax Identification Number (TIN). * * @return self */ - public function setFederalEfileStatus($federal_efile_status) + public function setTin($tin) { - $this->container['federal_efile_status'] = $federal_efile_status; + $this->container['tin'] = $tin; return $this; } /** - * Gets state_efile + * Gets recipient_name * - * @return bool|null + * @return string */ - public function getStateEfile() + public function getRecipientName() { - return $this->container['state_efile']; + return $this->container['recipient_name']; } /** - * Sets state_efile + * Sets recipient_name * - * @param bool|null $state_efile state_efile + * @param string $recipient_name Recipient name * * @return self */ - public function setStateEfile($state_efile) + public function setRecipientName($recipient_name) { - $this->container['state_efile'] = $state_efile; + $this->container['recipient_name'] = $recipient_name; return $this; } /** - * Gets state_efile_status + * Gets tin_type * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null + * @return string|null */ - public function getStateEfileStatus() + public function getTinType() { - return $this->container['state_efile_status']; + return $this->container['tin_type']; } /** - * Sets state_efile_status + * Sets tin_type * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status state_efile_status + * @param string|null $tin_type Type of TIN (Tax ID Number) * * @return self */ - public function setStateEfileStatus($state_efile_status) + public function setTinType($tin_type) { + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tin_type', must be one of '%s'", + $tin_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tin_type'] = $tin_type; + return $this; + } - $this->container['state_efile_status'] = $state_efile_status; + /** + * Gets recipient_second_name + * + * @return string|null + */ + public function getRecipientSecondName() + { + return $this->container['recipient_second_name']; + } + + /** + * Sets recipient_second_name + * + * @param string|null $recipient_second_name Recipient second name + * + * @return self + */ + public function setRecipientSecondName($recipient_second_name) + { + $this->container['recipient_second_name'] = $recipient_second_name; return $this; } /** - * Gets postal_mail + * Gets address * - * @return bool|null + * @return string */ - public function getPostalMail() + public function getAddress() { - return $this->container['postal_mail']; + return $this->container['address']; } /** - * Sets postal_mail + * Sets address * - * @param bool|null $postal_mail postal_mail + * @param string $address Address. * * @return self */ - public function setPostalMail($postal_mail) + public function setAddress($address) { - $this->container['postal_mail'] = $postal_mail; + $this->container['address'] = $address; return $this; } /** - * Gets postal_mail_status + * Gets address2 * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getPostalMailStatus() + public function getAddress2() { - return $this->container['postal_mail_status']; + return $this->container['address2']; } /** - * Sets postal_mail_status + * Sets address2 * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status postal_mail_status + * @param string|null $address2 Address line 2. * * @return self */ - public function setPostalMailStatus($postal_mail_status) + public function setAddress2($address2) { - $this->container['postal_mail_status'] = $postal_mail_status; + $this->container['address2'] = $address2; return $this; } /** - * Gets tin_match + * Gets city * - * @return bool|null + * @return string */ - public function getTinMatch() + public function getCity() { - return $this->container['tin_match']; + return $this->container['city']; } /** - * Sets tin_match + * Sets city * - * @param bool|null $tin_match tin_match + * @param string $city City. * * @return self */ - public function setTinMatch($tin_match) + public function setCity($city) { - $this->container['tin_match'] = $tin_match; + $this->container['city'] = $city; return $this; } /** - * Gets tin_match_status + * Gets state * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getTinMatchStatus() + public function getState() { - return $this->container['tin_match_status']; + return $this->container['state']; } /** - * Sets tin_match_status + * Sets state * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status tin_match_status + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ - public function setTinMatchStatus($tin_match_status) + public function setState($state) { - $this->container['tin_match_status'] = $tin_match_status; + $this->container['state'] = $state; return $this; } /** - * Gets address_verification + * Gets zip * - * @return bool|null + * @return string|null */ - public function getAddressVerification() + public function getZip() { - return $this->container['address_verification']; + return $this->container['zip']; } /** - * Sets address_verification + * Sets zip * - * @param bool|null $address_verification address_verification + * @param string|null $zip ZIP/postal code. * * @return self */ - public function setAddressVerification($address_verification) + public function setZip($zip) { - $this->container['address_verification'] = $address_verification; + $this->container['zip'] = $zip; return $this; } /** - * Gets address_verification_status + * Gets email * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getAddressVerificationStatus() + public function getEmail() { - return $this->container['address_verification_status']; + return $this->container['email']; } /** - * Sets address_verification_status + * Sets email * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status address_verification_status + * @param string|null $email Recipient's Contact email address. * * @return self */ - public function setAddressVerificationStatus($address_verification_status) + public function setEmail($email) { - $this->container['address_verification_status'] = $address_verification_status; + $this->container['email'] = $email; return $this; } /** - * Gets reference_id + * Gets account_number * * @return string|null */ - public function getReferenceId() + public function getAccountNumber() { - return $this->container['reference_id']; + return $this->container['account_number']; } /** - * Sets reference_id + * Sets account_number * - * @param string|null $reference_id reference_id + * @param string|null $account_number Account number * * @return self */ - public function setReferenceId($reference_id) + public function setAccountNumber($account_number) { - $this->container['reference_id'] = $reference_id; + $this->container['account_number'] = $account_number; return $this; } /** - * Gets email + * Gets office_code * * @return string|null */ - public function getEmail() + public function getOfficeCode() { - return $this->container['email']; + return $this->container['office_code']; } /** - * Sets email + * Sets office_code * - * @param string|null $email email + * @param string|null $office_code Office code * * @return self */ - public function setEmail($email) + public function setOfficeCode($office_code) { - $this->container['email'] = $email; + $this->container['office_code'] = $office_code; return $this; } /** - * Gets tin_type + * Gets non_us_province * * @return string|null */ - public function getTinType() + public function getNonUsProvince() { - return $this->container['tin_type']; + return $this->container['non_us_province']; } /** - * Sets tin_type + * Sets non_us_province * - * @param string|null $tin_type tin_type + * @param string|null $non_us_province Province or region for non-US/CA addresses. * * @return self */ - public function setTinType($tin_type) + public function setNonUsProvince($non_us_province) { - $this->container['tin_type'] = $tin_type; + $this->container['non_us_province'] = $non_us_province; return $this; } /** - * Gets tin + * Gets country_code * - * @return string|null + * @return string */ - public function getTin() + public function getCountryCode() { - return $this->container['tin']; + return $this->container['country_code']; } /** - * Sets tin + * Sets country_code * - * @param string|null $tin tin + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ - public function setTin($tin) + public function setCountryCode($country_code) { - $this->container['tin'] = $tin; + $this->container['country_code'] = $country_code; return $this; } /** - * Gets recipient_name + * Gets federal_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getRecipientName() + public function getFederalEfileDate() { - return $this->container['recipient_name']; + return $this->container['federal_efile_date']; } /** - * Sets recipient_name + * Sets federal_efile_date * - * @param string|null $recipient_name recipient_name + * @param \DateTime|null $federal_efile_date Date when federal e-filing should be scheduled for this form * * @return self */ - public function setRecipientName($recipient_name) + public function setFederalEfileDate($federal_efile_date) { - $this->container['recipient_name'] = $recipient_name; + $this->container['federal_efile_date'] = $federal_efile_date; return $this; } /** - * Gets recipient_second_name + * Gets postal_mail * - * @return string|null + * @return bool|null */ - public function getRecipientSecondName() + public function getPostalMail() { - return $this->container['recipient_second_name']; + return $this->container['postal_mail']; } /** - * Sets recipient_second_name + * Sets postal_mail * - * @param string|null $recipient_second_name recipient_second_name + * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form * * @return self */ - public function setRecipientSecondName($recipient_second_name) + public function setPostalMail($postal_mail) { - $this->container['recipient_second_name'] = $recipient_second_name; + $this->container['postal_mail'] = $postal_mail; return $this; } /** - * Gets address + * Gets state_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getAddress() + public function getStateEfileDate() { - return $this->container['address']; + return $this->container['state_efile_date']; } /** - * Sets address + * Sets state_efile_date * - * @param string|null $address address + * @param \DateTime|null $state_efile_date Date when state e-filing should be scheduled for this form * * @return self */ - public function setAddress($address) + public function setStateEfileDate($state_efile_date) { - $this->container['address'] = $address; + $this->container['state_efile_date'] = $state_efile_date; return $this; } /** - * Gets address2 + * Gets recipient_edelivery_date * - * @return string|null + * @return \DateTime|null */ - public function getAddress2() + public function getRecipientEdeliveryDate() { - return $this->container['address2']; + return $this->container['recipient_edelivery_date']; } /** - * Sets address2 + * Sets recipient_edelivery_date * - * @param string|null $address2 address2 + * @param \DateTime|null $recipient_edelivery_date Date when recipient e-delivery should be scheduled for this form * * @return self */ - public function setAddress2($address2) + public function setRecipientEdeliveryDate($recipient_edelivery_date) { - $this->container['address2'] = $address2; + $this->container['recipient_edelivery_date'] = $recipient_edelivery_date; return $this; } /** - * Gets city + * Gets tin_match * - * @return string|null + * @return bool|null */ - public function getCity() + public function getTinMatch() { - return $this->container['city']; + return $this->container['tin_match']; } /** - * Sets city + * Sets tin_match * - * @param string|null $city city + * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form * * @return self */ - public function setCity($city) + public function setTinMatch($tin_match) { - $this->container['city'] = $city; + $this->container['tin_match'] = $tin_match; return $this; } /** - * Gets state + * Gets no_tin * - * @return string|null + * @return bool|null */ - public function getState() + public function getNoTin() { - return $this->container['state']; + return $this->container['no_tin']; } /** - * Sets state + * Sets no_tin * - * @param string|null $state state + * @param bool|null $no_tin No TIN indicator * * @return self */ - public function setState($state) + public function setNoTin($no_tin) { - $this->container['state'] = $state; + $this->container['no_tin'] = $no_tin; return $this; } /** - * Gets zip + * Gets address_verification * - * @return string|null + * @return bool|null */ - public function getZip() + public function getAddressVerification() { - return $this->container['zip']; + return $this->container['address_verification']; } /** - * Sets zip + * Sets address_verification * - * @param string|null $zip zip + * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form * * @return self */ - public function setZip($zip) + public function setAddressVerification($address_verification) { - $this->container['zip'] = $zip; + $this->container['address_verification'] = $address_verification; return $this; } /** - * Gets foreign_province + * Gets state_and_local_withholding * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null */ - public function getForeignProvince() + public function getStateAndLocalWithholding() { - return $this->container['foreign_province']; + return $this->container['state_and_local_withholding']; } /** - * Sets foreign_province + * Sets state_and_local_withholding * - * @param string|null $foreign_province foreign_province + * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding State and local withholding information * * @return self */ - public function setForeignProvince($foreign_province) + public function setStateAndLocalWithholding($state_and_local_withholding) { - $this->container['foreign_province'] = $foreign_province; + $this->container['state_and_local_withholding'] = $state_and_local_withholding; return $this; } /** - * Gets country_code + * Gets second_tin_notice * - * @return string|null + * @return bool|null */ - public function getCountryCode() + public function getSecondTinNotice() { - return $this->container['country_code']; + return $this->container['second_tin_notice']; } /** - * Sets country_code + * Sets second_tin_notice * - * @param string|null $country_code country_code + * @param bool|null $second_tin_notice Second TIN notice * * @return self */ - public function setCountryCode($country_code) + public function setSecondTinNotice($second_tin_notice) { - $this->container['country_code'] = $country_code; + $this->container['second_tin_notice'] = $second_tin_notice; + + return $this; + } + + /** + * Gets federal_efile_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getFederalEfileStatus() + { + return $this->container['federal_efile_status']; + } + + /** + * Sets federal_efile_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status Federal e-file status + * + * @return self + */ + public function setFederalEfileStatus($federal_efile_status) + { + $this->container['federal_efile_status'] = $federal_efile_status; + + return $this; + } + + /** + * Gets state_efile_status + * + * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null + */ + public function getStateEfileStatus() + { + return $this->container['state_efile_status']; + } + + /** + * Sets state_efile_status + * + * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status State e-file status + * + * @return self + */ + public function setStateEfileStatus($state_efile_status) + { + + + $this->container['state_efile_status'] = $state_efile_status; + + return $this; + } + + /** + * Gets postal_mail_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getPostalMailStatus() + { + return $this->container['postal_mail_status']; + } + + /** + * Sets postal_mail_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status Postal mail to recipient status + * + * @return self + */ + public function setPostalMailStatus($postal_mail_status) + { + $this->container['postal_mail_status'] = $postal_mail_status; + + return $this; + } + + /** + * Gets tin_match_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getTinMatchStatus() + { + return $this->container['tin_match_status']; + } + + /** + * Sets tin_match_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status TIN Match status + * + * @return self + */ + public function setTinMatchStatus($tin_match_status) + { + $this->container['tin_match_status'] = $tin_match_status; + + return $this; + } + + /** + * Gets address_verification_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getAddressVerificationStatus() + { + return $this->container['address_verification_status']; + } + + /** + * Sets address_verification_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status Address verification status + * + * @return self + */ + public function setAddressVerificationStatus($address_verification_status) + { + $this->container['address_verification_status'] = $address_verification_status; + + return $this; + } + + /** + * Gets e_delivery_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getEDeliveryStatus() + { + return $this->container['e_delivery_status']; + } + + /** + * Sets e_delivery_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $e_delivery_status EDelivery status + * + * @return self + */ + public function setEDeliveryStatus($e_delivery_status) + { + $this->container['e_delivery_status'] = $e_delivery_status; return $this; } @@ -1540,7 +1878,7 @@ public function getValidationErrors() /** * Sets validation_errors * - * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors validation_errors + * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors Validation errors * * @return self */ @@ -1566,7 +1904,7 @@ public function getCreatedAt() /** * Sets created_at * - * @param \DateTime|null $created_at created_at + * @param \DateTime|null $created_at Date time when the record was created. * * @return self */ @@ -1590,7 +1928,7 @@ public function getUpdatedAt() /** * Sets updated_at * - * @param \DateTime|null $updated_at updated_at + * @param \DateTime|null $updated_at Date time when the record was last updated. * * @return self */ @@ -1600,30 +1938,6 @@ public function setUpdatedAt($updated_at) return $this; } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/Form1099MiscList.php b/lib/Model/A1099/V2/Form1099MiscList.php deleted file mode 100644 index 9c892c0..0000000 --- a/lib/Model/A1099/V2/Form1099MiscList.php +++ /dev/null @@ -1,364 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099MiscList Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099MiscList implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099MiscList'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'forms' => '\Avalara\SDK\Model\A1099\V2\Form1099MiscListItem[]', - 'form_type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'forms' => null, - 'form_type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'forms' => 'forms', - 'form_type' => 'formType' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'forms' => 'setForms', - 'form_type' => 'setFormType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'forms' => 'getForms', - 'form_type' => 'getFormType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['forms'] = $data['forms'] ?? null; - $this->container['form_type'] = $data['form_type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets forms - * - * @return \Avalara\SDK\Model\A1099\V2\Form1099MiscListItem[]|null - */ - public function getForms() - { - return $this->container['forms']; - } - - /** - * Sets forms - * - * @param \Avalara\SDK\Model\A1099\V2\Form1099MiscListItem[]|null $forms forms - * - * @return self - */ - public function setForms($forms) - { - - - $this->container['forms'] = $forms; - - return $this; - } - - /** - * Gets form_type - * - * @return string|null - */ - public function getFormType() - { - return $this->container['form_type']; - } - - /** - * Sets form_type - * - * @param string|null $form_type form_type - * - * @return self - */ - public function setFormType($form_type) - { - $this->container['form_type'] = $form_type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099MiscListItem.php b/lib/Model/A1099/V2/Form1099MiscListItem.php deleted file mode 100644 index d538d46..0000000 --- a/lib/Model/A1099/V2/Form1099MiscListItem.php +++ /dev/null @@ -1,1639 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099MiscListItem Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099MiscListItem implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099MiscListItem'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'rents' => 'float', - 'royalties' => 'float', - 'other_income' => 'float', - 'fed_income_tax_withheld' => 'float', - 'fishing_boat_proceeds' => 'float', - 'medical_and_health_care_payments' => 'float', - 'direct_sales_indicator' => 'bool', - 'substitute_payments' => 'float', - 'crop_insurance_proceeds' => 'float', - 'gross_proceeds_paid_to_attorney' => 'float', - 'fish_purchased_for_resale' => 'float', - 'section409_a_deferrals' => 'float', - 'fatca_filing_requirement' => 'bool', - 'excess_golden_parachute_payments' => 'float', - 'nonqualified_deferred_compensation' => 'float', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'rents' => 'double', - 'royalties' => 'double', - 'other_income' => 'double', - 'fed_income_tax_withheld' => 'double', - 'fishing_boat_proceeds' => 'double', - 'medical_and_health_care_payments' => 'double', - 'direct_sales_indicator' => null, - 'substitute_payments' => 'double', - 'crop_insurance_proceeds' => 'double', - 'gross_proceeds_paid_to_attorney' => 'double', - 'fish_purchased_for_resale' => 'double', - 'section409_a_deferrals' => 'double', - 'fatca_filing_requirement' => null, - 'excess_golden_parachute_payments' => 'double', - 'nonqualified_deferred_compensation' => 'double', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'rents' => 'rents', - 'royalties' => 'royalties', - 'other_income' => 'otherIncome', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'fishingBoatProceeds', - 'medical_and_health_care_payments' => 'medicalAndHealthCarePayments', - 'direct_sales_indicator' => 'directSalesIndicator', - 'substitute_payments' => 'substitutePayments', - 'crop_insurance_proceeds' => 'cropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'grossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'fishPurchasedForResale', - 'section409_a_deferrals' => 'section409ADeferrals', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'excess_golden_parachute_payments' => 'excessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'nonqualifiedDeferredCompensation', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'rents' => 'setRents', - 'royalties' => 'setRoyalties', - 'other_income' => 'setOtherIncome', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'setFishingBoatProceeds', - 'medical_and_health_care_payments' => 'setMedicalAndHealthCarePayments', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'substitute_payments' => 'setSubstitutePayments', - 'crop_insurance_proceeds' => 'setCropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'setGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'setFishPurchasedForResale', - 'section409_a_deferrals' => 'setSection409ADeferrals', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'excess_golden_parachute_payments' => 'setExcessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'setNonqualifiedDeferredCompensation', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'rents' => 'getRents', - 'royalties' => 'getRoyalties', - 'other_income' => 'getOtherIncome', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'getFishingBoatProceeds', - 'medical_and_health_care_payments' => 'getMedicalAndHealthCarePayments', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'substitute_payments' => 'getSubstitutePayments', - 'crop_insurance_proceeds' => 'getCropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'getGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'getFishPurchasedForResale', - 'section409_a_deferrals' => 'getSection409ADeferrals', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'excess_golden_parachute_payments' => 'getExcessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'getNonqualifiedDeferredCompensation', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['rents'] = $data['rents'] ?? null; - $this->container['royalties'] = $data['royalties'] ?? null; - $this->container['other_income'] = $data['other_income'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; - $this->container['fishing_boat_proceeds'] = $data['fishing_boat_proceeds'] ?? null; - $this->container['medical_and_health_care_payments'] = $data['medical_and_health_care_payments'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; - $this->container['crop_insurance_proceeds'] = $data['crop_insurance_proceeds'] ?? null; - $this->container['gross_proceeds_paid_to_attorney'] = $data['gross_proceeds_paid_to_attorney'] ?? null; - $this->container['fish_purchased_for_resale'] = $data['fish_purchased_for_resale'] ?? null; - $this->container['section409_a_deferrals'] = $data['section409_a_deferrals'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['excess_golden_parachute_payments'] = $data['excess_golden_parachute_payments'] ?? null; - $this->container['nonqualified_deferred_compensation'] = $data['nonqualified_deferred_compensation'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['tax_year'] === null) { - $invalidProperties[] = "'tax_year' can't be null"; - } - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets rents - * - * @return float|null - */ - public function getRents() - { - return $this->container['rents']; - } - - /** - * Sets rents - * - * @param float|null $rents Rents - * - * @return self - */ - public function setRents($rents) - { - $this->container['rents'] = $rents; - - return $this; - } - - /** - * Gets royalties - * - * @return float|null - */ - public function getRoyalties() - { - return $this->container['royalties']; - } - - /** - * Sets royalties - * - * @param float|null $royalties Royalties - * - * @return self - */ - public function setRoyalties($royalties) - { - $this->container['royalties'] = $royalties; - - return $this; - } - - /** - * Gets other_income - * - * @return float|null - */ - public function getOtherIncome() - { - return $this->container['other_income']; - } - - /** - * Sets other_income - * - * @param float|null $other_income Other income - * - * @return self - */ - public function setOtherIncome($other_income) - { - $this->container['other_income'] = $other_income; - - return $this; - } - - /** - * Gets fed_income_tax_withheld - * - * @return float|null - */ - public function getFedIncomeTaxWithheld() - { - return $this->container['fed_income_tax_withheld']; - } - - /** - * Sets fed_income_tax_withheld - * - * @param float|null $fed_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) - { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; - - return $this; - } - - /** - * Gets fishing_boat_proceeds - * - * @return float|null - */ - public function getFishingBoatProceeds() - { - return $this->container['fishing_boat_proceeds']; - } - - /** - * Sets fishing_boat_proceeds - * - * @param float|null $fishing_boat_proceeds Fishing boat proceeds - * - * @return self - */ - public function setFishingBoatProceeds($fishing_boat_proceeds) - { - $this->container['fishing_boat_proceeds'] = $fishing_boat_proceeds; - - return $this; - } - - /** - * Gets medical_and_health_care_payments - * - * @return float|null - */ - public function getMedicalAndHealthCarePayments() - { - return $this->container['medical_and_health_care_payments']; - } - - /** - * Sets medical_and_health_care_payments - * - * @param float|null $medical_and_health_care_payments Medical and health care payments - * - * @return self - */ - public function setMedicalAndHealthCarePayments($medical_and_health_care_payments) - { - $this->container['medical_and_health_care_payments'] = $medical_and_health_care_payments; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets substitute_payments - * - * @return float|null - */ - public function getSubstitutePayments() - { - return $this->container['substitute_payments']; - } - - /** - * Sets substitute_payments - * - * @param float|null $substitute_payments Substitute payments in lieu of dividends or interest - * - * @return self - */ - public function setSubstitutePayments($substitute_payments) - { - $this->container['substitute_payments'] = $substitute_payments; - - return $this; - } - - /** - * Gets crop_insurance_proceeds - * - * @return float|null - */ - public function getCropInsuranceProceeds() - { - return $this->container['crop_insurance_proceeds']; - } - - /** - * Sets crop_insurance_proceeds - * - * @param float|null $crop_insurance_proceeds Crop insurance proceeds - * - * @return self - */ - public function setCropInsuranceProceeds($crop_insurance_proceeds) - { - $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; - - return $this; - } - - /** - * Gets gross_proceeds_paid_to_attorney - * - * @return float|null - */ - public function getGrossProceedsPaidToAttorney() - { - return $this->container['gross_proceeds_paid_to_attorney']; - } - - /** - * Sets gross_proceeds_paid_to_attorney - * - * @param float|null $gross_proceeds_paid_to_attorney Gross proceeds paid to an attorney - * - * @return self - */ - public function setGrossProceedsPaidToAttorney($gross_proceeds_paid_to_attorney) - { - $this->container['gross_proceeds_paid_to_attorney'] = $gross_proceeds_paid_to_attorney; - - return $this; - } - - /** - * Gets fish_purchased_for_resale - * - * @return float|null - */ - public function getFishPurchasedForResale() - { - return $this->container['fish_purchased_for_resale']; - } - - /** - * Sets fish_purchased_for_resale - * - * @param float|null $fish_purchased_for_resale Fish purchased for resale - * - * @return self - */ - public function setFishPurchasedForResale($fish_purchased_for_resale) - { - $this->container['fish_purchased_for_resale'] = $fish_purchased_for_resale; - - return $this; - } - - /** - * Gets section409_a_deferrals - * - * @return float|null - */ - public function getSection409ADeferrals() - { - return $this->container['section409_a_deferrals']; - } - - /** - * Sets section409_a_deferrals - * - * @param float|null $section409_a_deferrals Section 409A deferrals - * - * @return self - */ - public function setSection409ADeferrals($section409_a_deferrals) - { - $this->container['section409_a_deferrals'] = $section409_a_deferrals; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets excess_golden_parachute_payments - * - * @return float|null - */ - public function getExcessGoldenParachutePayments() - { - return $this->container['excess_golden_parachute_payments']; - } - - /** - * Sets excess_golden_parachute_payments - * - * @param float|null $excess_golden_parachute_payments (Legacy field) Excess golden parachute payments - * - * @return self - */ - public function setExcessGoldenParachutePayments($excess_golden_parachute_payments) - { - $this->container['excess_golden_parachute_payments'] = $excess_golden_parachute_payments; - - return $this; - } - - /** - * Gets nonqualified_deferred_compensation - * - * @return float|null - */ - public function getNonqualifiedDeferredCompensation() - { - return $this->container['nonqualified_deferred_compensation']; - } - - /** - * Sets nonqualified_deferred_compensation - * - * @param float|null $nonqualified_deferred_compensation Nonqualified deferred compensation - * - * @return self - */ - public function setNonqualifiedDeferredCompensation($nonqualified_deferred_compensation) - { - $this->container['nonqualified_deferred_compensation'] = $nonqualified_deferred_compensation; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1099MiscListItem., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1099MiscListItem., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1099MiscListItem., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099MiscListItemResponse.php b/lib/Model/A1099/V2/Form1099MiscListItemResponse.php deleted file mode 100644 index c550037..0000000 --- a/lib/Model/A1099/V2/Form1099MiscListItemResponse.php +++ /dev/null @@ -1,1938 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099MiscListItemResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099MiscListItemResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099MiscListItemResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'rents' => 'float', - 'royalties' => 'float', - 'other_income' => 'float', - 'fed_income_tax_withheld' => 'float', - 'fishing_boat_proceeds' => 'float', - 'medical_and_health_care_payments' => 'float', - 'substitute_payments' => 'float', - 'direct_sales_indicator' => 'bool', - 'crop_insurance_proceeds' => 'float', - 'excess_golden_parachute_payments' => 'float', - 'gross_proceeds_paid_to_attorney' => 'float', - 'fish_purchased_for_resale' => 'float', - 'section409_a_deferrals' => 'float', - 'nonqualified_deferred_compensation' => 'float', - 'id' => 'string', - 'type' => 'string', - 'issuer_id' => 'int', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', - 'tin' => 'string', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'recipient_name' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'fatca_filing_requirement' => 'bool', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'rents' => 'double', - 'royalties' => 'double', - 'other_income' => 'double', - 'fed_income_tax_withheld' => 'double', - 'fishing_boat_proceeds' => 'double', - 'medical_and_health_care_payments' => 'double', - 'substitute_payments' => 'double', - 'direct_sales_indicator' => null, - 'crop_insurance_proceeds' => 'double', - 'excess_golden_parachute_payments' => 'double', - 'gross_proceeds_paid_to_attorney' => 'double', - 'fish_purchased_for_resale' => 'double', - 'section409_a_deferrals' => 'double', - 'nonqualified_deferred_compensation' => 'double', - 'id' => null, - 'type' => null, - 'issuer_id' => 'int32', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, - 'e_delivery_status' => null, - 'reference_id' => null, - 'email' => null, - 'tin_type' => null, - 'tin' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'recipient_name' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'non_us_province' => null, - 'country_code' => null, - 'account_number' => null, - 'office_code' => null, - 'fatca_filing_requirement' => null, - 'validation_errors' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'rents' => 'rents', - 'royalties' => 'royalties', - 'other_income' => 'otherIncome', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'fishingBoatProceeds', - 'medical_and_health_care_payments' => 'medicalAndHealthCarePayments', - 'substitute_payments' => 'substitutePayments', - 'direct_sales_indicator' => 'directSalesIndicator', - 'crop_insurance_proceeds' => 'cropInsuranceProceeds', - 'excess_golden_parachute_payments' => 'excessGoldenParachutePayments', - 'gross_proceeds_paid_to_attorney' => 'grossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'fishPurchasedForResale', - 'section409_a_deferrals' => 'section409ADeferrals', - 'nonqualified_deferred_compensation' => 'nonqualifiedDeferredCompensation', - 'id' => 'id', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', - 'tin' => 'tin', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'recipient_name' => 'recipientName', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'validation_errors' => 'validationErrors', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'rents' => 'setRents', - 'royalties' => 'setRoyalties', - 'other_income' => 'setOtherIncome', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'setFishingBoatProceeds', - 'medical_and_health_care_payments' => 'setMedicalAndHealthCarePayments', - 'substitute_payments' => 'setSubstitutePayments', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'crop_insurance_proceeds' => 'setCropInsuranceProceeds', - 'excess_golden_parachute_payments' => 'setExcessGoldenParachutePayments', - 'gross_proceeds_paid_to_attorney' => 'setGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'setFishPurchasedForResale', - 'section409_a_deferrals' => 'setSection409ADeferrals', - 'nonqualified_deferred_compensation' => 'setNonqualifiedDeferredCompensation', - 'id' => 'setId', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', - 'tin' => 'setTin', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'recipient_name' => 'setRecipientName', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'validation_errors' => 'setValidationErrors', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'rents' => 'getRents', - 'royalties' => 'getRoyalties', - 'other_income' => 'getOtherIncome', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'getFishingBoatProceeds', - 'medical_and_health_care_payments' => 'getMedicalAndHealthCarePayments', - 'substitute_payments' => 'getSubstitutePayments', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'crop_insurance_proceeds' => 'getCropInsuranceProceeds', - 'excess_golden_parachute_payments' => 'getExcessGoldenParachutePayments', - 'gross_proceeds_paid_to_attorney' => 'getGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'getFishPurchasedForResale', - 'section409_a_deferrals' => 'getSection409ADeferrals', - 'nonqualified_deferred_compensation' => 'getNonqualifiedDeferredCompensation', - 'id' => 'getId', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', - 'tin' => 'getTin', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'recipient_name' => 'getRecipientName', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'validation_errors' => 'getValidationErrors', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['rents'] = $data['rents'] ?? null; - $this->container['royalties'] = $data['royalties'] ?? null; - $this->container['other_income'] = $data['other_income'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; - $this->container['fishing_boat_proceeds'] = $data['fishing_boat_proceeds'] ?? null; - $this->container['medical_and_health_care_payments'] = $data['medical_and_health_care_payments'] ?? null; - $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['crop_insurance_proceeds'] = $data['crop_insurance_proceeds'] ?? null; - $this->container['excess_golden_parachute_payments'] = $data['excess_golden_parachute_payments'] ?? null; - $this->container['gross_proceeds_paid_to_attorney'] = $data['gross_proceeds_paid_to_attorney'] ?? null; - $this->container['fish_purchased_for_resale'] = $data['fish_purchased_for_resale'] ?? null; - $this->container['section409_a_deferrals'] = $data['section409_a_deferrals'] ?? null; - $this->container['nonqualified_deferred_compensation'] = $data['nonqualified_deferred_compensation'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ((mb_strlen($this->container['id']) < 1)) { - $invalidProperties[] = "invalid value for 'id', the character length must be bigger than or equal to 1."; - } - - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ((mb_strlen($this->container['type']) < 1)) { - $invalidProperties[] = "invalid value for 'type', the character length must be bigger than or equal to 1."; - } - - if ($this->container['issuer_id'] === null) { - $invalidProperties[] = "'issuer_id' can't be null"; - } - if ($this->container['federal_efile'] === null) { - $invalidProperties[] = "'federal_efile' can't be null"; - } - if ($this->container['state_efile'] === null) { - $invalidProperties[] = "'state_efile' can't be null"; - } - if ($this->container['postal_mail'] === null) { - $invalidProperties[] = "'postal_mail' can't be null"; - } - if ($this->container['tin_match'] === null) { - $invalidProperties[] = "'tin_match' can't be null"; - } - if ($this->container['address_verification'] === null) { - $invalidProperties[] = "'address_verification' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets rents - * - * @return float|null - */ - public function getRents() - { - return $this->container['rents']; - } - - /** - * Sets rents - * - * @param float|null $rents Rents - * - * @return self - */ - public function setRents($rents) - { - $this->container['rents'] = $rents; - - return $this; - } - - /** - * Gets royalties - * - * @return float|null - */ - public function getRoyalties() - { - return $this->container['royalties']; - } - - /** - * Sets royalties - * - * @param float|null $royalties Royalties - * - * @return self - */ - public function setRoyalties($royalties) - { - $this->container['royalties'] = $royalties; - - return $this; - } - - /** - * Gets other_income - * - * @return float|null - */ - public function getOtherIncome() - { - return $this->container['other_income']; - } - - /** - * Sets other_income - * - * @param float|null $other_income Other income - * - * @return self - */ - public function setOtherIncome($other_income) - { - $this->container['other_income'] = $other_income; - - return $this; - } - - /** - * Gets fed_income_tax_withheld - * - * @return float|null - */ - public function getFedIncomeTaxWithheld() - { - return $this->container['fed_income_tax_withheld']; - } - - /** - * Sets fed_income_tax_withheld - * - * @param float|null $fed_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) - { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; - - return $this; - } - - /** - * Gets fishing_boat_proceeds - * - * @return float|null - */ - public function getFishingBoatProceeds() - { - return $this->container['fishing_boat_proceeds']; - } - - /** - * Sets fishing_boat_proceeds - * - * @param float|null $fishing_boat_proceeds Fishing boat proceeds - * - * @return self - */ - public function setFishingBoatProceeds($fishing_boat_proceeds) - { - $this->container['fishing_boat_proceeds'] = $fishing_boat_proceeds; - - return $this; - } - - /** - * Gets medical_and_health_care_payments - * - * @return float|null - */ - public function getMedicalAndHealthCarePayments() - { - return $this->container['medical_and_health_care_payments']; - } - - /** - * Sets medical_and_health_care_payments - * - * @param float|null $medical_and_health_care_payments Medical and health care payments - * - * @return self - */ - public function setMedicalAndHealthCarePayments($medical_and_health_care_payments) - { - $this->container['medical_and_health_care_payments'] = $medical_and_health_care_payments; - - return $this; - } - - /** - * Gets substitute_payments - * - * @return float|null - */ - public function getSubstitutePayments() - { - return $this->container['substitute_payments']; - } - - /** - * Sets substitute_payments - * - * @param float|null $substitute_payments Substitute payments in lieu of dividends or interest - * - * @return self - */ - public function setSubstitutePayments($substitute_payments) - { - $this->container['substitute_payments'] = $substitute_payments; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets crop_insurance_proceeds - * - * @return float|null - */ - public function getCropInsuranceProceeds() - { - return $this->container['crop_insurance_proceeds']; - } - - /** - * Sets crop_insurance_proceeds - * - * @param float|null $crop_insurance_proceeds Crop insurance proceeds - * - * @return self - */ - public function setCropInsuranceProceeds($crop_insurance_proceeds) - { - $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; - - return $this; - } - - /** - * Gets excess_golden_parachute_payments - * - * @return float|null - */ - public function getExcessGoldenParachutePayments() - { - return $this->container['excess_golden_parachute_payments']; - } - - /** - * Sets excess_golden_parachute_payments - * - * @param float|null $excess_golden_parachute_payments (Legacy field) Excess golden parachute payments - * - * @return self - */ - public function setExcessGoldenParachutePayments($excess_golden_parachute_payments) - { - $this->container['excess_golden_parachute_payments'] = $excess_golden_parachute_payments; - - return $this; - } - - /** - * Gets gross_proceeds_paid_to_attorney - * - * @return float|null - */ - public function getGrossProceedsPaidToAttorney() - { - return $this->container['gross_proceeds_paid_to_attorney']; - } - - /** - * Sets gross_proceeds_paid_to_attorney - * - * @param float|null $gross_proceeds_paid_to_attorney Gross proceeds paid to an attorney - * - * @return self - */ - public function setGrossProceedsPaidToAttorney($gross_proceeds_paid_to_attorney) - { - $this->container['gross_proceeds_paid_to_attorney'] = $gross_proceeds_paid_to_attorney; - - return $this; - } - - /** - * Gets fish_purchased_for_resale - * - * @return float|null - */ - public function getFishPurchasedForResale() - { - return $this->container['fish_purchased_for_resale']; - } - - /** - * Sets fish_purchased_for_resale - * - * @param float|null $fish_purchased_for_resale Fish purchased for resale - * - * @return self - */ - public function setFishPurchasedForResale($fish_purchased_for_resale) - { - $this->container['fish_purchased_for_resale'] = $fish_purchased_for_resale; - - return $this; - } - - /** - * Gets section409_a_deferrals - * - * @return float|null - */ - public function getSection409ADeferrals() - { - return $this->container['section409_a_deferrals']; - } - - /** - * Sets section409_a_deferrals - * - * @param float|null $section409_a_deferrals Section 409A deferrals - * - * @return self - */ - public function setSection409ADeferrals($section409_a_deferrals) - { - $this->container['section409_a_deferrals'] = $section409_a_deferrals; - - return $this; - } - - /** - * Gets nonqualified_deferred_compensation - * - * @return float|null - */ - public function getNonqualifiedDeferredCompensation() - { - return $this->container['nonqualified_deferred_compensation']; - } - - /** - * Sets nonqualified_deferred_compensation - * - * @param float|null $nonqualified_deferred_compensation Nonqualified deferred compensation - * - * @return self - */ - public function setNonqualifiedDeferredCompensation($nonqualified_deferred_compensation) - { - $this->container['nonqualified_deferred_compensation'] = $nonqualified_deferred_compensation; - - return $this; - } - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID of the form - * - * @return self - */ - public function setId($id) - { - - if ((mb_strlen($id) < 1)) { - throw new \InvalidArgumentException('invalid length for $id when calling Form1099MiscListItemResponse., must be bigger than or equal to 1.'); - } - - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * - * @return self - */ - public function setType($type) - { - - if ((mb_strlen($type) < 1)) { - throw new \InvalidArgumentException('invalid length for $type when calling Form1099MiscListItemResponse., must be bigger than or equal to 1.'); - } - - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return int - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param int $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets federal_efile - * - * @return bool - */ - public function getFederalEfile() - { - return $this->container['federal_efile']; - } - - /** - * Sets federal_efile - * - * @param bool $federal_efile Boolean indicating that federal e-filing has been scheduled for this form - * - * @return self - */ - public function setFederalEfile($federal_efile) - { - $this->container['federal_efile'] = $federal_efile; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status Federal e-file status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets state_efile - * - * @return bool - */ - public function getStateEfile() - { - return $this->container['state_efile']; - } - - /** - * Sets state_efile - * - * @param bool $state_efile Boolean indicating that state e-filing has been scheduled for this form - * - * @return self - */ - public function setStateEfile($state_efile) - { - $this->container['state_efile'] = $state_efile; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status State e-file status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool $postal_mail Boolean indicating that postal mailing to the recipient has been scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status Postal mail to recipient status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool $tin_match Boolean indicating that TIN Matching has been scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status TIN Match status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool $address_verification Boolean indicating that address verification has been scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status Address verification status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status EDelivery status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin Recipient Tax ID Number - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second Tin Notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address Address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city City - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account Number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office Code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors Validation errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Creation time - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Update time - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099MiscRequest.php b/lib/Model/A1099/V2/Form1099MiscRequest.php deleted file mode 100644 index e7b69b1..0000000 --- a/lib/Model/A1099/V2/Form1099MiscRequest.php +++ /dev/null @@ -1,1622 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099MiscRequest Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099MiscRequest implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099MiscRequest'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'rents' => 'float', - 'royalties' => 'float', - 'other_income' => 'float', - 'fed_income_tax_withheld' => 'float', - 'fishing_boat_proceeds' => 'float', - 'medical_and_health_care_payments' => 'float', - 'direct_sales_indicator' => 'bool', - 'substitute_payments' => 'float', - 'crop_insurance_proceeds' => 'float', - 'gross_proceeds_paid_to_attorney' => 'float', - 'fish_purchased_for_resale' => 'float', - 'section409_a_deferrals' => 'float', - 'fatca_filing_requirement' => 'bool', - 'excess_golden_parachute_payments' => 'float', - 'nonqualified_deferred_compensation' => 'float', - 'type' => 'string', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'rents' => 'double', - 'royalties' => 'double', - 'other_income' => 'double', - 'fed_income_tax_withheld' => 'double', - 'fishing_boat_proceeds' => 'double', - 'medical_and_health_care_payments' => 'double', - 'direct_sales_indicator' => null, - 'substitute_payments' => 'double', - 'crop_insurance_proceeds' => 'double', - 'gross_proceeds_paid_to_attorney' => 'double', - 'fish_purchased_for_resale' => 'double', - 'section409_a_deferrals' => 'double', - 'fatca_filing_requirement' => null, - 'excess_golden_parachute_payments' => 'double', - 'nonqualified_deferred_compensation' => 'double', - 'type' => null, - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'rents' => 'rents', - 'royalties' => 'royalties', - 'other_income' => 'otherIncome', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'fishingBoatProceeds', - 'medical_and_health_care_payments' => 'medicalAndHealthCarePayments', - 'direct_sales_indicator' => 'directSalesIndicator', - 'substitute_payments' => 'substitutePayments', - 'crop_insurance_proceeds' => 'cropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'grossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'fishPurchasedForResale', - 'section409_a_deferrals' => 'section409ADeferrals', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'excess_golden_parachute_payments' => 'excessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'nonqualifiedDeferredCompensation', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'rents' => 'setRents', - 'royalties' => 'setRoyalties', - 'other_income' => 'setOtherIncome', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'setFishingBoatProceeds', - 'medical_and_health_care_payments' => 'setMedicalAndHealthCarePayments', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'substitute_payments' => 'setSubstitutePayments', - 'crop_insurance_proceeds' => 'setCropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'setGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'setFishPurchasedForResale', - 'section409_a_deferrals' => 'setSection409ADeferrals', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'excess_golden_parachute_payments' => 'setExcessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'setNonqualifiedDeferredCompensation', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'rents' => 'getRents', - 'royalties' => 'getRoyalties', - 'other_income' => 'getOtherIncome', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'getFishingBoatProceeds', - 'medical_and_health_care_payments' => 'getMedicalAndHealthCarePayments', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'substitute_payments' => 'getSubstitutePayments', - 'crop_insurance_proceeds' => 'getCropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'getGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'getFishPurchasedForResale', - 'section409_a_deferrals' => 'getSection409ADeferrals', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'excess_golden_parachute_payments' => 'getExcessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'getNonqualifiedDeferredCompensation', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['rents'] = $data['rents'] ?? null; - $this->container['royalties'] = $data['royalties'] ?? null; - $this->container['other_income'] = $data['other_income'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; - $this->container['fishing_boat_proceeds'] = $data['fishing_boat_proceeds'] ?? null; - $this->container['medical_and_health_care_payments'] = $data['medical_and_health_care_payments'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; - $this->container['crop_insurance_proceeds'] = $data['crop_insurance_proceeds'] ?? null; - $this->container['gross_proceeds_paid_to_attorney'] = $data['gross_proceeds_paid_to_attorney'] ?? null; - $this->container['fish_purchased_for_resale'] = $data['fish_purchased_for_resale'] ?? null; - $this->container['section409_a_deferrals'] = $data['section409_a_deferrals'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['excess_golden_parachute_payments'] = $data['excess_golden_parachute_payments'] ?? null; - $this->container['nonqualified_deferred_compensation'] = $data['nonqualified_deferred_compensation'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets rents - * - * @return float|null - */ - public function getRents() - { - return $this->container['rents']; - } - - /** - * Sets rents - * - * @param float|null $rents Rents - * - * @return self - */ - public function setRents($rents) - { - $this->container['rents'] = $rents; - - return $this; - } - - /** - * Gets royalties - * - * @return float|null - */ - public function getRoyalties() - { - return $this->container['royalties']; - } - - /** - * Sets royalties - * - * @param float|null $royalties Royalties - * - * @return self - */ - public function setRoyalties($royalties) - { - $this->container['royalties'] = $royalties; - - return $this; - } - - /** - * Gets other_income - * - * @return float|null - */ - public function getOtherIncome() - { - return $this->container['other_income']; - } - - /** - * Sets other_income - * - * @param float|null $other_income Other income - * - * @return self - */ - public function setOtherIncome($other_income) - { - $this->container['other_income'] = $other_income; - - return $this; - } - - /** - * Gets fed_income_tax_withheld - * - * @return float|null - */ - public function getFedIncomeTaxWithheld() - { - return $this->container['fed_income_tax_withheld']; - } - - /** - * Sets fed_income_tax_withheld - * - * @param float|null $fed_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) - { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; - - return $this; - } - - /** - * Gets fishing_boat_proceeds - * - * @return float|null - */ - public function getFishingBoatProceeds() - { - return $this->container['fishing_boat_proceeds']; - } - - /** - * Sets fishing_boat_proceeds - * - * @param float|null $fishing_boat_proceeds Fishing boat proceeds - * - * @return self - */ - public function setFishingBoatProceeds($fishing_boat_proceeds) - { - $this->container['fishing_boat_proceeds'] = $fishing_boat_proceeds; - - return $this; - } - - /** - * Gets medical_and_health_care_payments - * - * @return float|null - */ - public function getMedicalAndHealthCarePayments() - { - return $this->container['medical_and_health_care_payments']; - } - - /** - * Sets medical_and_health_care_payments - * - * @param float|null $medical_and_health_care_payments Medical and health care payments - * - * @return self - */ - public function setMedicalAndHealthCarePayments($medical_and_health_care_payments) - { - $this->container['medical_and_health_care_payments'] = $medical_and_health_care_payments; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets substitute_payments - * - * @return float|null - */ - public function getSubstitutePayments() - { - return $this->container['substitute_payments']; - } - - /** - * Sets substitute_payments - * - * @param float|null $substitute_payments Substitute payments in lieu of dividends or interest - * - * @return self - */ - public function setSubstitutePayments($substitute_payments) - { - $this->container['substitute_payments'] = $substitute_payments; - - return $this; - } - - /** - * Gets crop_insurance_proceeds - * - * @return float|null - */ - public function getCropInsuranceProceeds() - { - return $this->container['crop_insurance_proceeds']; - } - - /** - * Sets crop_insurance_proceeds - * - * @param float|null $crop_insurance_proceeds Crop insurance proceeds - * - * @return self - */ - public function setCropInsuranceProceeds($crop_insurance_proceeds) - { - $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; - - return $this; - } - - /** - * Gets gross_proceeds_paid_to_attorney - * - * @return float|null - */ - public function getGrossProceedsPaidToAttorney() - { - return $this->container['gross_proceeds_paid_to_attorney']; - } - - /** - * Sets gross_proceeds_paid_to_attorney - * - * @param float|null $gross_proceeds_paid_to_attorney Gross proceeds paid to an attorney - * - * @return self - */ - public function setGrossProceedsPaidToAttorney($gross_proceeds_paid_to_attorney) - { - $this->container['gross_proceeds_paid_to_attorney'] = $gross_proceeds_paid_to_attorney; - - return $this; - } - - /** - * Gets fish_purchased_for_resale - * - * @return float|null - */ - public function getFishPurchasedForResale() - { - return $this->container['fish_purchased_for_resale']; - } - - /** - * Sets fish_purchased_for_resale - * - * @param float|null $fish_purchased_for_resale Fish purchased for resale - * - * @return self - */ - public function setFishPurchasedForResale($fish_purchased_for_resale) - { - $this->container['fish_purchased_for_resale'] = $fish_purchased_for_resale; - - return $this; - } - - /** - * Gets section409_a_deferrals - * - * @return float|null - */ - public function getSection409ADeferrals() - { - return $this->container['section409_a_deferrals']; - } - - /** - * Sets section409_a_deferrals - * - * @param float|null $section409_a_deferrals Section 409A deferrals - * - * @return self - */ - public function setSection409ADeferrals($section409_a_deferrals) - { - $this->container['section409_a_deferrals'] = $section409_a_deferrals; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets excess_golden_parachute_payments - * - * @return float|null - */ - public function getExcessGoldenParachutePayments() - { - return $this->container['excess_golden_parachute_payments']; - } - - /** - * Sets excess_golden_parachute_payments - * - * @param float|null $excess_golden_parachute_payments (Legacy field) Excess golden parachute payments - * - * @return self - */ - public function setExcessGoldenParachutePayments($excess_golden_parachute_payments) - { - $this->container['excess_golden_parachute_payments'] = $excess_golden_parachute_payments; - - return $this; - } - - /** - * Gets nonqualified_deferred_compensation - * - * @return float|null - */ - public function getNonqualifiedDeferredCompensation() - { - return $this->container['nonqualified_deferred_compensation']; - } - - /** - * Sets nonqualified_deferred_compensation - * - * @param float|null $nonqualified_deferred_compensation Nonqualified deferred compensation - * - * @return self - */ - public function setNonqualifiedDeferredCompensation($nonqualified_deferred_compensation) - { - $this->container['nonqualified_deferred_compensation'] = $nonqualified_deferred_compensation; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1099MiscRequest., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1099MiscRequest., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1099MiscRequest., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099Nec.php b/lib/Model/A1099/V2/Form1099Nec.php index b35d3b1..d032b2e 100644 --- a/lib/Model/A1099/V2/Form1099Nec.php +++ b/lib/Model/A1099/V2/Form1099Nec.php @@ -20,7 +20,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) * * @category Avalara client libraries * @package Avalara\SDK\API\A1099\V2 @@ -72,41 +72,47 @@ class Form1099Nec implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'nonemployee_compensation' => 'float', - 'federal_income_tax_withheld' => 'float', 'direct_sales_indicator' => 'bool', - 'id' => 'string', + 'federal_income_tax_withheld' => 'float', 'type' => 'string', - 'issuer_id' => 'int', + 'id' => 'string', + 'issuer_id' => 'string', 'issuer_reference_id' => 'string', 'issuer_tin' => 'string', 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', 'tin' => 'string', 'recipient_name' => 'string', + 'tin_type' => 'string', 'recipient_second_name' => 'string', 'address' => 'string', 'address2' => 'string', 'city' => 'string', 'state' => 'string', 'zip' => 'string', - 'foreign_province' => 'string', + 'email' => 'string', + 'account_number' => 'string', + 'office_code' => 'string', + 'non_us_province' => 'string', 'country_code' => 'string', + 'federal_efile_date' => '\DateTime', + 'postal_mail' => 'bool', + 'state_efile_date' => '\DateTime', + 'recipient_edelivery_date' => '\DateTime', + 'tin_match' => 'bool', + 'no_tin' => 'bool', + 'address_verification' => 'bool', + 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding', + 'second_tin_notice' => 'bool', + 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', + 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationError[]', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding' + 'updated_at' => '\DateTime' ]; /** @@ -118,41 +124,47 @@ class Form1099Nec implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'nonemployee_compensation' => 'double', - 'federal_income_tax_withheld' => 'double', 'direct_sales_indicator' => null, - 'id' => null, + 'federal_income_tax_withheld' => 'double', 'type' => null, - 'issuer_id' => 'int32', + 'id' => null, + 'issuer_id' => null, 'issuer_reference_id' => null, 'issuer_tin' => null, 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, 'reference_id' => null, - 'email' => null, - 'tin_type' => null, 'tin' => null, 'recipient_name' => null, + 'tin_type' => null, 'recipient_second_name' => null, 'address' => null, 'address2' => null, 'city' => null, 'state' => null, 'zip' => null, - 'foreign_province' => null, + 'email' => null, + 'account_number' => null, + 'office_code' => null, + 'non_us_province' => null, 'country_code' => null, + 'federal_efile_date' => 'date', + 'postal_mail' => null, + 'state_efile_date' => 'date', + 'recipient_edelivery_date' => 'date', + 'tin_match' => null, + 'no_tin' => null, + 'address_verification' => null, + 'state_and_local_withholding' => null, + 'second_tin_notice' => null, + 'federal_efile_status' => null, + 'state_efile_status' => null, + 'postal_mail_status' => null, + 'tin_match_status' => null, + 'address_verification_status' => null, + 'e_delivery_status' => null, 'validation_errors' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null + 'updated_at' => 'date-time' ]; /** @@ -183,41 +195,47 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'nonemployee_compensation' => 'nonemployeeCompensation', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', 'direct_sales_indicator' => 'directSalesIndicator', - 'id' => 'id', + 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', 'type' => 'type', + 'id' => 'id', 'issuer_id' => 'issuerId', 'issuer_reference_id' => 'issuerReferenceId', 'issuer_tin' => 'issuerTin', 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', 'tin' => 'tin', 'recipient_name' => 'recipientName', + 'tin_type' => 'tinType', 'recipient_second_name' => 'recipientSecondName', 'address' => 'address', 'address2' => 'address2', 'city' => 'city', 'state' => 'state', 'zip' => 'zip', - 'foreign_province' => 'foreignProvince', + 'email' => 'email', + 'account_number' => 'accountNumber', + 'office_code' => 'officeCode', + 'non_us_province' => 'nonUsProvince', 'country_code' => 'countryCode', + 'federal_efile_date' => 'federalEfileDate', + 'postal_mail' => 'postalMail', + 'state_efile_date' => 'stateEfileDate', + 'recipient_edelivery_date' => 'recipientEdeliveryDate', + 'tin_match' => 'tinMatch', + 'no_tin' => 'noTin', + 'address_verification' => 'addressVerification', + 'state_and_local_withholding' => 'stateAndLocalWithholding', + 'second_tin_notice' => 'secondTinNotice', + 'federal_efile_status' => 'federalEfileStatus', + 'state_efile_status' => 'stateEfileStatus', + 'postal_mail_status' => 'postalMailStatus', + 'tin_match_status' => 'tinMatchStatus', + 'address_verification_status' => 'addressVerificationStatus', + 'e_delivery_status' => 'eDeliveryStatus', 'validation_errors' => 'validationErrors', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' + 'updated_at' => 'updatedAt' ]; /** @@ -227,41 +245,47 @@ public static function openAPIFormats() */ protected static $setters = [ 'nonemployee_compensation' => 'setNonemployeeCompensation', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'id' => 'setId', + 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', 'type' => 'setType', + 'id' => 'setId', 'issuer_id' => 'setIssuerId', 'issuer_reference_id' => 'setIssuerReferenceId', 'issuer_tin' => 'setIssuerTin', 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', 'tin' => 'setTin', 'recipient_name' => 'setRecipientName', + 'tin_type' => 'setTinType', 'recipient_second_name' => 'setRecipientSecondName', 'address' => 'setAddress', 'address2' => 'setAddress2', 'city' => 'setCity', 'state' => 'setState', 'zip' => 'setZip', - 'foreign_province' => 'setForeignProvince', + 'email' => 'setEmail', + 'account_number' => 'setAccountNumber', + 'office_code' => 'setOfficeCode', + 'non_us_province' => 'setNonUsProvince', 'country_code' => 'setCountryCode', + 'federal_efile_date' => 'setFederalEfileDate', + 'postal_mail' => 'setPostalMail', + 'state_efile_date' => 'setStateEfileDate', + 'recipient_edelivery_date' => 'setRecipientEdeliveryDate', + 'tin_match' => 'setTinMatch', + 'no_tin' => 'setNoTin', + 'address_verification' => 'setAddressVerification', + 'state_and_local_withholding' => 'setStateAndLocalWithholding', + 'second_tin_notice' => 'setSecondTinNotice', + 'federal_efile_status' => 'setFederalEfileStatus', + 'state_efile_status' => 'setStateEfileStatus', + 'postal_mail_status' => 'setPostalMailStatus', + 'tin_match_status' => 'setTinMatchStatus', + 'address_verification_status' => 'setAddressVerificationStatus', + 'e_delivery_status' => 'setEDeliveryStatus', 'validation_errors' => 'setValidationErrors', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' + 'updated_at' => 'setUpdatedAt' ]; /** @@ -271,41 +295,47 @@ public static function openAPIFormats() */ protected static $getters = [ 'nonemployee_compensation' => 'getNonemployeeCompensation', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'id' => 'getId', + 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', 'type' => 'getType', + 'id' => 'getId', 'issuer_id' => 'getIssuerId', 'issuer_reference_id' => 'getIssuerReferenceId', 'issuer_tin' => 'getIssuerTin', 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', 'tin' => 'getTin', 'recipient_name' => 'getRecipientName', + 'tin_type' => 'getTinType', 'recipient_second_name' => 'getRecipientSecondName', 'address' => 'getAddress', 'address2' => 'getAddress2', 'city' => 'getCity', 'state' => 'getState', 'zip' => 'getZip', - 'foreign_province' => 'getForeignProvince', + 'email' => 'getEmail', + 'account_number' => 'getAccountNumber', + 'office_code' => 'getOfficeCode', + 'non_us_province' => 'getNonUsProvince', 'country_code' => 'getCountryCode', + 'federal_efile_date' => 'getFederalEfileDate', + 'postal_mail' => 'getPostalMail', + 'state_efile_date' => 'getStateEfileDate', + 'recipient_edelivery_date' => 'getRecipientEdeliveryDate', + 'tin_match' => 'getTinMatch', + 'no_tin' => 'getNoTin', + 'address_verification' => 'getAddressVerification', + 'state_and_local_withholding' => 'getStateAndLocalWithholding', + 'second_tin_notice' => 'getSecondTinNotice', + 'federal_efile_status' => 'getFederalEfileStatus', + 'state_efile_status' => 'getStateEfileStatus', + 'postal_mail_status' => 'getPostalMailStatus', + 'tin_match_status' => 'getTinMatchStatus', + 'address_verification_status' => 'getAddressVerificationStatus', + 'e_delivery_status' => 'getEDeliveryStatus', 'validation_errors' => 'getValidationErrors', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' + 'updated_at' => 'getUpdatedAt' ]; /** @@ -349,6 +379,56 @@ public function getModelName() return self::$openAPIModelName; } + const TYPE__1099_NEC = '1099-NEC'; + const TYPE__1099_MISC = '1099-MISC'; + const TYPE__1099_DIV = '1099-DIV'; + const TYPE__1099_R = '1099-R'; + const TYPE__1099_K = '1099-K'; + const TYPE__1095_B = '1095-B'; + const TYPE__1042_S = '1042-S'; + const TYPE__1095_C = '1095-C'; + const TYPE__1099_INT = '1099-INT'; + const TIN_TYPE__EMPTY = 'Empty'; + const TIN_TYPE_EIN = 'EIN'; + const TIN_TYPE_SSN = 'SSN'; + const TIN_TYPE_ITIN = 'ITIN'; + const TIN_TYPE_ATIN = 'ATIN'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE__1099_NEC, + self::TYPE__1099_MISC, + self::TYPE__1099_DIV, + self::TYPE__1099_R, + self::TYPE__1099_K, + self::TYPE__1095_B, + self::TYPE__1042_S, + self::TYPE__1095_C, + self::TYPE__1099_INT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTinTypeAllowableValues() + { + return [ + self::TIN_TYPE__EMPTY, + self::TIN_TYPE_EIN, + self::TIN_TYPE_SSN, + self::TIN_TYPE_ITIN, + self::TIN_TYPE_ATIN, + ]; + } /** * Associative array for storing property values @@ -366,41 +446,47 @@ public function getModelName() public function __construct(array $data = null) { $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['id'] = $data['id'] ?? null; + $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; $this->container['issuer_id'] = $data['issuer_id'] ?? null; $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['tin'] = $data['tin'] ?? null; $this->container['recipient_name'] = $data['recipient_name'] ?? null; + $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['address2'] = $data['address2'] ?? null; $this->container['city'] = $data['city'] ?? null; $this->container['state'] = $data['state'] ?? null; $this->container['zip'] = $data['zip'] ?? null; - $this->container['foreign_province'] = $data['foreign_province'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['account_number'] = $data['account_number'] ?? null; + $this->container['office_code'] = $data['office_code'] ?? null; + $this->container['non_us_province'] = $data['non_us_province'] ?? null; $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['federal_efile_date'] = $data['federal_efile_date'] ?? null; + $this->container['postal_mail'] = $data['postal_mail'] ?? null; + $this->container['state_efile_date'] = $data['state_efile_date'] ?? null; + $this->container['recipient_edelivery_date'] = $data['recipient_edelivery_date'] ?? null; + $this->container['tin_match'] = $data['tin_match'] ?? null; + $this->container['no_tin'] = $data['no_tin'] ?? null; + $this->container['address_verification'] = $data['address_verification'] ?? null; + $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; + $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; + $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; + $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; + $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; + $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; + $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; + $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['validation_errors'] = $data['validation_errors'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; } /** @@ -412,6 +498,42 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['nonemployee_compensation'] === null) { + $invalidProperties[] = "'nonemployee_compensation' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['recipient_name'] === null) { + $invalidProperties[] = "'recipient_name' can't be null"; + } + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tin_type', must be one of '%s'", + $this->container['tin_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } return $invalidProperties; } @@ -430,7 +552,7 @@ public function valid() /** * Gets nonemployee_compensation * - * @return float|null + * @return float */ public function getNonemployeeCompensation() { @@ -440,7 +562,7 @@ public function getNonemployeeCompensation() /** * Sets nonemployee_compensation * - * @param float|null $nonemployee_compensation nonemployee_compensation + * @param float $nonemployee_compensation Nonemployee compensation * * @return self */ @@ -452,97 +574,107 @@ public function setNonemployeeCompensation($nonemployee_compensation) } /** - * Gets federal_income_tax_withheld + * Gets direct_sales_indicator * - * @return float|null + * @return bool|null */ - public function getFederalIncomeTaxWithheld() + public function getDirectSalesIndicator() { - return $this->container['federal_income_tax_withheld']; + return $this->container['direct_sales_indicator']; } /** - * Sets federal_income_tax_withheld + * Sets direct_sales_indicator * - * @param float|null $federal_income_tax_withheld federal_income_tax_withheld + * @param bool|null $direct_sales_indicator Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale * * @return self */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) + public function setDirectSalesIndicator($direct_sales_indicator) { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; + $this->container['direct_sales_indicator'] = $direct_sales_indicator; return $this; } /** - * Gets direct_sales_indicator + * Gets federal_income_tax_withheld * - * @return bool|null + * @return float|null */ - public function getDirectSalesIndicator() + public function getFederalIncomeTaxWithheld() { - return $this->container['direct_sales_indicator']; + return $this->container['federal_income_tax_withheld']; } /** - * Sets direct_sales_indicator + * Sets federal_income_tax_withheld * - * @param bool|null $direct_sales_indicator direct_sales_indicator + * @param float|null $federal_income_tax_withheld Federal income tax withheld * * @return self */ - public function setDirectSalesIndicator($direct_sales_indicator) + public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; + $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; return $this; } /** - * Gets id + * Gets type * - * @return string|null + * @return string */ - public function getId() + public function getType() { - return $this->container['id']; + return $this->container['type']; } /** - * Sets id + * Sets type * - * @param string|null $id id + * @param string $type Form type * * @return self */ - public function setId($id) + public function setType($type) { - $this->container['id'] = $id; + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; return $this; } /** - * Gets type + * Gets id * * @return string|null */ - public function getType() + public function getId() { - return $this->container['type']; + return $this->container['id']; } /** - * Sets type + * Sets id * - * @param string|null $type type + * @param string|null $id Form ID. Unique identifier set when the record is created. * * @return self */ - public function setType($type) + public function setId($id) { - $this->container['type'] = $type; + $this->container['id'] = $id; return $this; } @@ -550,7 +682,7 @@ public function setType($type) /** * Gets issuer_id * - * @return int|null + * @return string|null */ public function getIssuerId() { @@ -560,7 +692,7 @@ public function getIssuerId() /** * Sets issuer_id * - * @param int|null $issuer_id issuer_id + * @param string|null $issuer_id Issuer ID - only required when creating forms * * @return self */ @@ -584,7 +716,7 @@ public function getIssuerReferenceId() /** * Sets issuer_reference_id * - * @param string|null $issuer_reference_id issuer_reference_id + * @param string|null $issuer_reference_id Issuer Reference ID - only required when creating forms * * @return self */ @@ -608,7 +740,7 @@ public function getIssuerTin() /** * Sets issuer_tin * - * @param string|null $issuer_tin issuer_tin + * @param string|null $issuer_tin Issuer TIN - readonly * * @return self */ @@ -632,7 +764,7 @@ public function getTaxYear() /** * Sets tax_year * - * @param int|null $tax_year tax_year + * @param int|null $tax_year Tax Year - only required when creating forms * * @return self */ @@ -644,555 +776,733 @@ public function setTaxYear($tax_year) } /** - * Gets federal_efile + * Gets reference_id * - * @return bool|null + * @return string|null */ - public function getFederalEfile() + public function getReferenceId() { - return $this->container['federal_efile']; + return $this->container['reference_id']; } /** - * Sets federal_efile + * Sets reference_id * - * @param bool|null $federal_efile federal_efile + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ - public function setFederalEfile($federal_efile) + public function setReferenceId($reference_id) { - $this->container['federal_efile'] = $federal_efile; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets federal_efile_status + * Gets tin * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getFederalEfileStatus() + public function getTin() { - return $this->container['federal_efile_status']; + return $this->container['tin']; } /** - * Sets federal_efile_status + * Sets tin * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status federal_efile_status + * @param string|null $tin Recipient's Federal Tax Identification Number (TIN). * * @return self */ - public function setFederalEfileStatus($federal_efile_status) + public function setTin($tin) { - $this->container['federal_efile_status'] = $federal_efile_status; + $this->container['tin'] = $tin; return $this; } /** - * Gets state_efile + * Gets recipient_name * - * @return bool|null + * @return string */ - public function getStateEfile() + public function getRecipientName() { - return $this->container['state_efile']; + return $this->container['recipient_name']; } /** - * Sets state_efile + * Sets recipient_name * - * @param bool|null $state_efile state_efile + * @param string $recipient_name Recipient name * * @return self */ - public function setStateEfile($state_efile) + public function setRecipientName($recipient_name) { - $this->container['state_efile'] = $state_efile; + $this->container['recipient_name'] = $recipient_name; return $this; } /** - * Gets state_efile_status + * Gets tin_type * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null + * @return string|null */ - public function getStateEfileStatus() + public function getTinType() { - return $this->container['state_efile_status']; + return $this->container['tin_type']; } /** - * Sets state_efile_status + * Sets tin_type * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status state_efile_status + * @param string|null $tin_type Type of TIN (Tax ID Number) * * @return self */ - public function setStateEfileStatus($state_efile_status) + public function setTinType($tin_type) { + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tin_type', must be one of '%s'", + $tin_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tin_type'] = $tin_type; + return $this; + } - $this->container['state_efile_status'] = $state_efile_status; + /** + * Gets recipient_second_name + * + * @return string|null + */ + public function getRecipientSecondName() + { + return $this->container['recipient_second_name']; + } + + /** + * Sets recipient_second_name + * + * @param string|null $recipient_second_name Recipient second name + * + * @return self + */ + public function setRecipientSecondName($recipient_second_name) + { + $this->container['recipient_second_name'] = $recipient_second_name; return $this; } /** - * Gets postal_mail + * Gets address * - * @return bool|null + * @return string */ - public function getPostalMail() + public function getAddress() { - return $this->container['postal_mail']; + return $this->container['address']; } /** - * Sets postal_mail + * Sets address * - * @param bool|null $postal_mail postal_mail + * @param string $address Address. * * @return self */ - public function setPostalMail($postal_mail) + public function setAddress($address) { - $this->container['postal_mail'] = $postal_mail; + $this->container['address'] = $address; return $this; } /** - * Gets postal_mail_status + * Gets address2 * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getPostalMailStatus() + public function getAddress2() { - return $this->container['postal_mail_status']; + return $this->container['address2']; } /** - * Sets postal_mail_status + * Sets address2 * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status postal_mail_status + * @param string|null $address2 Address line 2. * * @return self */ - public function setPostalMailStatus($postal_mail_status) + public function setAddress2($address2) { - $this->container['postal_mail_status'] = $postal_mail_status; + $this->container['address2'] = $address2; return $this; } /** - * Gets tin_match + * Gets city * - * @return bool|null + * @return string */ - public function getTinMatch() + public function getCity() { - return $this->container['tin_match']; + return $this->container['city']; } /** - * Sets tin_match + * Sets city * - * @param bool|null $tin_match tin_match + * @param string $city City. * * @return self */ - public function setTinMatch($tin_match) + public function setCity($city) { - $this->container['tin_match'] = $tin_match; + $this->container['city'] = $city; return $this; } /** - * Gets tin_match_status + * Gets state * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getTinMatchStatus() + public function getState() { - return $this->container['tin_match_status']; + return $this->container['state']; } /** - * Sets tin_match_status + * Sets state * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status tin_match_status + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ - public function setTinMatchStatus($tin_match_status) + public function setState($state) { - $this->container['tin_match_status'] = $tin_match_status; + $this->container['state'] = $state; return $this; } /** - * Gets address_verification + * Gets zip * - * @return bool|null + * @return string|null */ - public function getAddressVerification() + public function getZip() { - return $this->container['address_verification']; + return $this->container['zip']; } /** - * Sets address_verification + * Sets zip * - * @param bool|null $address_verification address_verification + * @param string|null $zip ZIP/postal code. * * @return self */ - public function setAddressVerification($address_verification) + public function setZip($zip) { - $this->container['address_verification'] = $address_verification; + $this->container['zip'] = $zip; return $this; } /** - * Gets address_verification_status + * Gets email * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getAddressVerificationStatus() + public function getEmail() { - return $this->container['address_verification_status']; + return $this->container['email']; } /** - * Sets address_verification_status + * Sets email * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status address_verification_status + * @param string|null $email Recipient's Contact email address. * * @return self */ - public function setAddressVerificationStatus($address_verification_status) + public function setEmail($email) { - $this->container['address_verification_status'] = $address_verification_status; + $this->container['email'] = $email; return $this; } /** - * Gets reference_id + * Gets account_number * * @return string|null */ - public function getReferenceId() + public function getAccountNumber() { - return $this->container['reference_id']; + return $this->container['account_number']; } /** - * Sets reference_id + * Sets account_number * - * @param string|null $reference_id reference_id + * @param string|null $account_number Account number * * @return self */ - public function setReferenceId($reference_id) + public function setAccountNumber($account_number) { - $this->container['reference_id'] = $reference_id; + $this->container['account_number'] = $account_number; return $this; } /** - * Gets email + * Gets office_code * * @return string|null */ - public function getEmail() + public function getOfficeCode() { - return $this->container['email']; + return $this->container['office_code']; } /** - * Sets email + * Sets office_code * - * @param string|null $email email + * @param string|null $office_code Office code * * @return self */ - public function setEmail($email) + public function setOfficeCode($office_code) { - $this->container['email'] = $email; + $this->container['office_code'] = $office_code; return $this; } /** - * Gets tin_type + * Gets non_us_province * * @return string|null */ - public function getTinType() + public function getNonUsProvince() { - return $this->container['tin_type']; + return $this->container['non_us_province']; } /** - * Sets tin_type + * Sets non_us_province * - * @param string|null $tin_type tin_type + * @param string|null $non_us_province Province or region for non-US/CA addresses. * * @return self */ - public function setTinType($tin_type) + public function setNonUsProvince($non_us_province) { - $this->container['tin_type'] = $tin_type; + $this->container['non_us_province'] = $non_us_province; return $this; } /** - * Gets tin + * Gets country_code * - * @return string|null + * @return string */ - public function getTin() + public function getCountryCode() { - return $this->container['tin']; + return $this->container['country_code']; } /** - * Sets tin + * Sets country_code * - * @param string|null $tin tin + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ - public function setTin($tin) + public function setCountryCode($country_code) { - $this->container['tin'] = $tin; + $this->container['country_code'] = $country_code; return $this; } /** - * Gets recipient_name + * Gets federal_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getRecipientName() + public function getFederalEfileDate() { - return $this->container['recipient_name']; + return $this->container['federal_efile_date']; } /** - * Sets recipient_name + * Sets federal_efile_date * - * @param string|null $recipient_name recipient_name + * @param \DateTime|null $federal_efile_date Date when federal e-filing should be scheduled for this form * * @return self */ - public function setRecipientName($recipient_name) + public function setFederalEfileDate($federal_efile_date) { - $this->container['recipient_name'] = $recipient_name; + $this->container['federal_efile_date'] = $federal_efile_date; return $this; } /** - * Gets recipient_second_name + * Gets postal_mail * - * @return string|null + * @return bool|null */ - public function getRecipientSecondName() + public function getPostalMail() { - return $this->container['recipient_second_name']; + return $this->container['postal_mail']; } /** - * Sets recipient_second_name + * Sets postal_mail * - * @param string|null $recipient_second_name recipient_second_name + * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form * * @return self */ - public function setRecipientSecondName($recipient_second_name) + public function setPostalMail($postal_mail) { - $this->container['recipient_second_name'] = $recipient_second_name; + $this->container['postal_mail'] = $postal_mail; return $this; } /** - * Gets address + * Gets state_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getAddress() + public function getStateEfileDate() { - return $this->container['address']; + return $this->container['state_efile_date']; } /** - * Sets address + * Sets state_efile_date * - * @param string|null $address address + * @param \DateTime|null $state_efile_date Date when state e-filing should be scheduled for this form * * @return self */ - public function setAddress($address) + public function setStateEfileDate($state_efile_date) { - $this->container['address'] = $address; + $this->container['state_efile_date'] = $state_efile_date; return $this; } /** - * Gets address2 + * Gets recipient_edelivery_date * - * @return string|null + * @return \DateTime|null */ - public function getAddress2() + public function getRecipientEdeliveryDate() { - return $this->container['address2']; + return $this->container['recipient_edelivery_date']; } /** - * Sets address2 + * Sets recipient_edelivery_date * - * @param string|null $address2 address2 + * @param \DateTime|null $recipient_edelivery_date Date when recipient e-delivery should be scheduled for this form * * @return self */ - public function setAddress2($address2) + public function setRecipientEdeliveryDate($recipient_edelivery_date) { - $this->container['address2'] = $address2; + $this->container['recipient_edelivery_date'] = $recipient_edelivery_date; return $this; } /** - * Gets city + * Gets tin_match * - * @return string|null + * @return bool|null */ - public function getCity() + public function getTinMatch() { - return $this->container['city']; + return $this->container['tin_match']; } /** - * Sets city + * Sets tin_match * - * @param string|null $city city + * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form * * @return self */ - public function setCity($city) + public function setTinMatch($tin_match) { - $this->container['city'] = $city; + $this->container['tin_match'] = $tin_match; return $this; } /** - * Gets state + * Gets no_tin * - * @return string|null + * @return bool|null */ - public function getState() + public function getNoTin() { - return $this->container['state']; + return $this->container['no_tin']; } /** - * Sets state + * Sets no_tin * - * @param string|null $state state + * @param bool|null $no_tin No TIN indicator * * @return self */ - public function setState($state) + public function setNoTin($no_tin) { - $this->container['state'] = $state; + $this->container['no_tin'] = $no_tin; return $this; } /** - * Gets zip + * Gets address_verification * - * @return string|null + * @return bool|null */ - public function getZip() + public function getAddressVerification() { - return $this->container['zip']; + return $this->container['address_verification']; } /** - * Sets zip + * Sets address_verification * - * @param string|null $zip zip + * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form * * @return self */ - public function setZip($zip) + public function setAddressVerification($address_verification) { - $this->container['zip'] = $zip; + $this->container['address_verification'] = $address_verification; return $this; } /** - * Gets foreign_province + * Gets state_and_local_withholding * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null */ - public function getForeignProvince() + public function getStateAndLocalWithholding() { - return $this->container['foreign_province']; + return $this->container['state_and_local_withholding']; } /** - * Sets foreign_province + * Sets state_and_local_withholding * - * @param string|null $foreign_province foreign_province + * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding State and local withholding information * * @return self */ - public function setForeignProvince($foreign_province) + public function setStateAndLocalWithholding($state_and_local_withholding) { - $this->container['foreign_province'] = $foreign_province; + $this->container['state_and_local_withholding'] = $state_and_local_withholding; return $this; } /** - * Gets country_code + * Gets second_tin_notice * - * @return string|null + * @return bool|null */ - public function getCountryCode() + public function getSecondTinNotice() { - return $this->container['country_code']; + return $this->container['second_tin_notice']; } /** - * Sets country_code + * Sets second_tin_notice * - * @param string|null $country_code country_code + * @param bool|null $second_tin_notice Second TIN notice * * @return self */ - public function setCountryCode($country_code) + public function setSecondTinNotice($second_tin_notice) { - $this->container['country_code'] = $country_code; + $this->container['second_tin_notice'] = $second_tin_notice; + + return $this; + } + + /** + * Gets federal_efile_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getFederalEfileStatus() + { + return $this->container['federal_efile_status']; + } + + /** + * Sets federal_efile_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status Federal e-file status + * + * @return self + */ + public function setFederalEfileStatus($federal_efile_status) + { + $this->container['federal_efile_status'] = $federal_efile_status; + + return $this; + } + + /** + * Gets state_efile_status + * + * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null + */ + public function getStateEfileStatus() + { + return $this->container['state_efile_status']; + } + + /** + * Sets state_efile_status + * + * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status State e-file status + * + * @return self + */ + public function setStateEfileStatus($state_efile_status) + { + + + $this->container['state_efile_status'] = $state_efile_status; + + return $this; + } + + /** + * Gets postal_mail_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getPostalMailStatus() + { + return $this->container['postal_mail_status']; + } + + /** + * Sets postal_mail_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status Postal mail to recipient status + * + * @return self + */ + public function setPostalMailStatus($postal_mail_status) + { + $this->container['postal_mail_status'] = $postal_mail_status; + + return $this; + } + + /** + * Gets tin_match_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getTinMatchStatus() + { + return $this->container['tin_match_status']; + } + + /** + * Sets tin_match_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status TIN Match status + * + * @return self + */ + public function setTinMatchStatus($tin_match_status) + { + $this->container['tin_match_status'] = $tin_match_status; + + return $this; + } + + /** + * Gets address_verification_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getAddressVerificationStatus() + { + return $this->container['address_verification_status']; + } + + /** + * Sets address_verification_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status Address verification status + * + * @return self + */ + public function setAddressVerificationStatus($address_verification_status) + { + $this->container['address_verification_status'] = $address_verification_status; + + return $this; + } + + /** + * Gets e_delivery_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getEDeliveryStatus() + { + return $this->container['e_delivery_status']; + } + + /** + * Sets e_delivery_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $e_delivery_status EDelivery status + * + * @return self + */ + public function setEDeliveryStatus($e_delivery_status) + { + $this->container['e_delivery_status'] = $e_delivery_status; return $this; } @@ -1210,7 +1520,7 @@ public function getValidationErrors() /** * Sets validation_errors * - * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors validation_errors + * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors Validation errors * * @return self */ @@ -1236,7 +1546,7 @@ public function getCreatedAt() /** * Sets created_at * - * @param \DateTime|null $created_at created_at + * @param \DateTime|null $created_at Date time when the record was created. * * @return self */ @@ -1260,7 +1570,7 @@ public function getUpdatedAt() /** * Sets updated_at * - * @param \DateTime|null $updated_at updated_at + * @param \DateTime|null $updated_at Date time when the record was last updated. * * @return self */ @@ -1270,30 +1580,6 @@ public function setUpdatedAt($updated_at) return $this; } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/Form1099NecList.php b/lib/Model/A1099/V2/Form1099NecList.php deleted file mode 100644 index f5b53bf..0000000 --- a/lib/Model/A1099/V2/Form1099NecList.php +++ /dev/null @@ -1,364 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099NecList Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099NecList implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099NecList'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'forms' => '\Avalara\SDK\Model\A1099\V2\Form1099NecListItem[]', - 'form_type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'forms' => null, - 'form_type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'forms' => 'forms', - 'form_type' => 'formType' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'forms' => 'setForms', - 'form_type' => 'setFormType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'forms' => 'getForms', - 'form_type' => 'getFormType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['forms'] = $data['forms'] ?? null; - $this->container['form_type'] = $data['form_type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets forms - * - * @return \Avalara\SDK\Model\A1099\V2\Form1099NecListItem[]|null - */ - public function getForms() - { - return $this->container['forms']; - } - - /** - * Sets forms - * - * @param \Avalara\SDK\Model\A1099\V2\Form1099NecListItem[]|null $forms forms - * - * @return self - */ - public function setForms($forms) - { - - - $this->container['forms'] = $forms; - - return $this; - } - - /** - * Gets form_type - * - * @return string|null - */ - public function getFormType() - { - return $this->container['form_type']; - } - - /** - * Sets form_type - * - * @param string|null $form_type form_type - * - * @return self - */ - public function setFormType($form_type) - { - $this->container['form_type'] = $form_type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099NecListItem.php b/lib/Model/A1099/V2/Form1099NecListItem.php deleted file mode 100644 index a8dffa1..0000000 --- a/lib/Model/A1099/V2/Form1099NecListItem.php +++ /dev/null @@ -1,1283 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099NecListItem Class Doc Comment - * - * @category Class - * @description 1099-NEC - Nonemployee compensation - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099NecListItem implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099NecListItem'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'nonemployee_compensation' => 'float', - 'direct_sales_indicator' => 'bool', - 'federal_income_tax_withheld' => 'float', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'nonemployee_compensation' => 'double', - 'direct_sales_indicator' => null, - 'federal_income_tax_withheld' => 'double', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'nonemployee_compensation' => 'nonemployeeCompensation', - 'direct_sales_indicator' => 'directSalesIndicator', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'nonemployee_compensation' => 'setNonemployeeCompensation', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'nonemployee_compensation' => 'getNonemployeeCompensation', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['nonemployee_compensation'] === null) { - $invalidProperties[] = "'nonemployee_compensation' can't be null"; - } - if ($this->container['tax_year'] === null) { - $invalidProperties[] = "'tax_year' can't be null"; - } - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets nonemployee_compensation - * - * @return float - */ - public function getNonemployeeCompensation() - { - return $this->container['nonemployee_compensation']; - } - - /** - * Sets nonemployee_compensation - * - * @param float $nonemployee_compensation Nonemployee compensation - * - * @return self - */ - public function setNonemployeeCompensation($nonemployee_compensation) - { - $this->container['nonemployee_compensation'] = $nonemployee_compensation; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1099NecListItem., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1099NecListItem., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1099NecListItem., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099NecListItemResponse.php b/lib/Model/A1099/V2/Form1099NecListItemResponse.php deleted file mode 100644 index b1a7d65..0000000 --- a/lib/Model/A1099/V2/Form1099NecListItemResponse.php +++ /dev/null @@ -1,1608 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099NecListItemResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099NecListItemResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099NecListItemResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'nonemployee_compensation' => 'float', - 'federal_income_tax_withheld' => 'float', - 'direct_sales_indicator' => 'bool', - 'id' => 'string', - 'type' => 'string', - 'issuer_id' => 'int', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', - 'tin' => 'string', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'recipient_name' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'fatca_filing_requirement' => 'bool', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'nonemployee_compensation' => 'double', - 'federal_income_tax_withheld' => 'double', - 'direct_sales_indicator' => null, - 'id' => null, - 'type' => null, - 'issuer_id' => 'int32', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, - 'e_delivery_status' => null, - 'reference_id' => null, - 'email' => null, - 'tin_type' => null, - 'tin' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'recipient_name' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'non_us_province' => null, - 'country_code' => null, - 'account_number' => null, - 'office_code' => null, - 'fatca_filing_requirement' => null, - 'validation_errors' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'nonemployee_compensation' => 'nonemployeeCompensation', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'direct_sales_indicator' => 'directSalesIndicator', - 'id' => 'id', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', - 'tin' => 'tin', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'recipient_name' => 'recipientName', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'validation_errors' => 'validationErrors', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'nonemployee_compensation' => 'setNonemployeeCompensation', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'id' => 'setId', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', - 'tin' => 'setTin', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'recipient_name' => 'setRecipientName', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'validation_errors' => 'setValidationErrors', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'nonemployee_compensation' => 'getNonemployeeCompensation', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'id' => 'getId', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', - 'tin' => 'getTin', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'recipient_name' => 'getRecipientName', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'validation_errors' => 'getValidationErrors', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ((mb_strlen($this->container['id']) < 1)) { - $invalidProperties[] = "invalid value for 'id', the character length must be bigger than or equal to 1."; - } - - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ((mb_strlen($this->container['type']) < 1)) { - $invalidProperties[] = "invalid value for 'type', the character length must be bigger than or equal to 1."; - } - - if ($this->container['issuer_id'] === null) { - $invalidProperties[] = "'issuer_id' can't be null"; - } - if ($this->container['federal_efile'] === null) { - $invalidProperties[] = "'federal_efile' can't be null"; - } - if ($this->container['state_efile'] === null) { - $invalidProperties[] = "'state_efile' can't be null"; - } - if ($this->container['postal_mail'] === null) { - $invalidProperties[] = "'postal_mail' can't be null"; - } - if ($this->container['tin_match'] === null) { - $invalidProperties[] = "'tin_match' can't be null"; - } - if ($this->container['address_verification'] === null) { - $invalidProperties[] = "'address_verification' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets nonemployee_compensation - * - * @return float|null - */ - public function getNonemployeeCompensation() - { - return $this->container['nonemployee_compensation']; - } - - /** - * Sets nonemployee_compensation - * - * @param float|null $nonemployee_compensation Nonemployee compensation - * - * @return self - */ - public function setNonemployeeCompensation($nonemployee_compensation) - { - $this->container['nonemployee_compensation'] = $nonemployee_compensation; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID of the form - * - * @return self - */ - public function setId($id) - { - - if ((mb_strlen($id) < 1)) { - throw new \InvalidArgumentException('invalid length for $id when calling Form1099NecListItemResponse., must be bigger than or equal to 1.'); - } - - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * - * @return self - */ - public function setType($type) - { - - if ((mb_strlen($type) < 1)) { - throw new \InvalidArgumentException('invalid length for $type when calling Form1099NecListItemResponse., must be bigger than or equal to 1.'); - } - - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return int - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param int $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets federal_efile - * - * @return bool - */ - public function getFederalEfile() - { - return $this->container['federal_efile']; - } - - /** - * Sets federal_efile - * - * @param bool $federal_efile Boolean indicating that federal e-filing has been scheduled for this form - * - * @return self - */ - public function setFederalEfile($federal_efile) - { - $this->container['federal_efile'] = $federal_efile; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status Federal e-file status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets state_efile - * - * @return bool - */ - public function getStateEfile() - { - return $this->container['state_efile']; - } - - /** - * Sets state_efile - * - * @param bool $state_efile Boolean indicating that state e-filing has been scheduled for this form - * - * @return self - */ - public function setStateEfile($state_efile) - { - $this->container['state_efile'] = $state_efile; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status State e-file status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool $postal_mail Boolean indicating that postal mailing to the recipient has been scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status Postal mail to recipient status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool $tin_match Boolean indicating that TIN Matching has been scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status TIN Match status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool $address_verification Boolean indicating that address verification has been scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status Address verification status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status EDelivery status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin Recipient Tax ID Number - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second Tin Notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address Address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city City - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account Number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office Code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors Validation errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Creation time - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Update time - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099NecRequest.php b/lib/Model/A1099/V2/Form1099NecRequest.php deleted file mode 100644 index 4673e24..0000000 --- a/lib/Model/A1099/V2/Form1099NecRequest.php +++ /dev/null @@ -1,1265 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099NecRequest Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099NecRequest implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099NecRequest'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'nonemployee_compensation' => 'float', - 'direct_sales_indicator' => 'bool', - 'federal_income_tax_withheld' => 'float', - 'type' => 'string', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'nonemployee_compensation' => 'double', - 'direct_sales_indicator' => null, - 'federal_income_tax_withheld' => 'double', - 'type' => null, - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'nonemployee_compensation' => 'nonemployeeCompensation', - 'direct_sales_indicator' => 'directSalesIndicator', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'nonemployee_compensation' => 'setNonemployeeCompensation', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'nonemployee_compensation' => 'getNonemployeeCompensation', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['nonemployee_compensation'] === null) { - $invalidProperties[] = "'nonemployee_compensation' can't be null"; - } - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets nonemployee_compensation - * - * @return float - */ - public function getNonemployeeCompensation() - { - return $this->container['nonemployee_compensation']; - } - - /** - * Sets nonemployee_compensation - * - * @param float $nonemployee_compensation Nonemployee compensation - * - * @return self - */ - public function setNonemployeeCompensation($nonemployee_compensation) - { - $this->container['nonemployee_compensation'] = $nonemployee_compensation; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1099NecRequest., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1099NecRequest., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1099NecRequest., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099NecResponse.php b/lib/Model/A1099/V2/Form1099NecResponse.php deleted file mode 100644 index 2bd7f30..0000000 --- a/lib/Model/A1099/V2/Form1099NecResponse.php +++ /dev/null @@ -1,1620 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099NecResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099NecResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099NecResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'nonemployee_compensation' => 'float', - 'direct_sales_indicator' => 'bool', - 'federal_income_tax_withheld' => 'float', - 'type' => 'string', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse', - 'tin_type' => 'string', - 'id' => 'string', - 'issuer_id' => 'string', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'reference_id' => 'string', - 'recipient_name' => 'string', - 'recipient_tin' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'nonemployee_compensation' => 'double', - 'direct_sales_indicator' => null, - 'federal_income_tax_withheld' => 'double', - 'type' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null, - 'tin_type' => null, - 'id' => null, - 'issuer_id' => null, - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'reference_id' => null, - 'recipient_name' => null, - 'recipient_tin' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'federal_efile_status' => null, - 'e_delivery_status' => null, - 'state_efile_status' => null, - 'postal_mail_status' => null, - 'tin_match_status' => null, - 'address_verification_status' => null, - 'validation_errors' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'nonemployee_compensation' => 'nonemployeeCompensation', - 'direct_sales_indicator' => 'directSalesIndicator', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'type' => 'type', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'tin_type' => 'tinType', - 'id' => 'id', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'reference_id' => 'referenceId', - 'recipient_name' => 'recipientName', - 'recipient_tin' => 'recipientTin', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'federal_efile_status' => 'federalEfileStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification_status' => 'addressVerificationStatus', - 'validation_errors' => 'validationErrors' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'nonemployee_compensation' => 'setNonemployeeCompensation', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'type' => 'setType', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'tin_type' => 'setTinType', - 'id' => 'setId', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'reference_id' => 'setReferenceId', - 'recipient_name' => 'setRecipientName', - 'recipient_tin' => 'setRecipientTin', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'federal_efile_status' => 'setFederalEfileStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification_status' => 'setAddressVerificationStatus', - 'validation_errors' => 'setValidationErrors' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'nonemployee_compensation' => 'getNonemployeeCompensation', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'type' => 'getType', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'tin_type' => 'getTinType', - 'id' => 'getId', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'reference_id' => 'getReferenceId', - 'recipient_name' => 'getRecipientName', - 'recipient_tin' => 'getRecipientTin', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'federal_efile_status' => 'getFederalEfileStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification_status' => 'getAddressVerificationStatus', - 'validation_errors' => 'getValidationErrors' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets nonemployee_compensation - * - * @return float|null - */ - public function getNonemployeeCompensation() - { - return $this->container['nonemployee_compensation']; - } - - /** - * Sets nonemployee_compensation - * - * @param float|null $nonemployee_compensation nonemployee_compensation - * - * @return self - */ - public function setNonemployeeCompensation($nonemployee_compensation) - { - $this->container['nonemployee_compensation'] = $nonemployee_compensation; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator direct_sales_indicator - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld federal_income_tax_withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at created_at - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at updated_at - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type tin_type - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id issuer_id - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id issuer_reference_id - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin issuer_tin - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year tax_year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id reference_id - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name recipient_name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin recipient_tin - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name recipient_second_name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 address2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city city - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip zip - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email email - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number account_number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code office_code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province non_us_province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code country_code - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file federal_e_file - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail postal_mail - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file state_e_file - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match tin_match - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin no_tin - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice second_tin_notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification address_verification - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status federal_efile_status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status e_delivery_status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status state_efile_status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status postal_mail_status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status tin_match_status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status address_verification_status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors validation_errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099ProccessResult.php b/lib/Model/A1099/V2/Form1099ProccessResult.php deleted file mode 100644 index 4daca1f..0000000 --- a/lib/Model/A1099/V2/Form1099ProccessResult.php +++ /dev/null @@ -1,332 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099ProccessResult Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099ProccessResult implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099ProccessResult'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'job_data' => '\Avalara\SDK\Model\A1099\V2\Data' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'job_data' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'job_data' => 'jobData' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'job_data' => 'setJobData' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'job_data' => 'getJobData' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['job_data'] = $data['job_data'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets job_data - * - * @return \Avalara\SDK\Model\A1099\V2\Data|null - */ - public function getJobData() - { - return $this->container['job_data']; - } - - /** - * Sets job_data - * - * @param \Avalara\SDK\Model\A1099\V2\Data|null $job_data job_data - * - * @return self - */ - public function setJobData($job_data) - { - $this->container['job_data'] = $job_data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099R.php b/lib/Model/A1099/V2/Form1099R.php index 6ae8f28..43268ae 100644 --- a/lib/Model/A1099/V2/Form1099R.php +++ b/lib/Model/A1099/V2/Form1099R.php @@ -20,7 +20,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) * * @category Avalara client libraries * @package Avalara\SDK\API\A1099\V2 @@ -47,6 +47,7 @@ * Form1099R Class Doc Comment * * @category Class + * @description Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharing Plans, IRAs, Insurance Contracts, etc. * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -71,59 +72,65 @@ class Form1099R implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'gross_distributions' => 'float', + 'gross_distribution' => 'float', 'taxable_amount' => 'float', 'taxable_amount_not_determined' => 'bool', - 'total_distribution_indicator' => 'bool', + 'total_distribution_determined' => 'bool', 'capital_gain' => 'float', - 'fed_income_tax_withheld' => 'float', - 'employee_contributions' => 'float', - 'net_unrealized_appreciation' => 'float', - 'distribution_code_required' => 'string', - 'distribution_code_optional' => 'string', - 'ira_sep_simple_indicator' => 'bool', - 'total_ira_sep_simple_distribution' => 'float', - 'other' => 'float', - 'other_percent' => 'string', - 'percentage_total_distribution' => 'string', + 'federal_income_tax_withheld' => 'float', + 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'float', + 'net_unrealized_appreciation_in_employer_securities' => 'float', + 'distribution_code' => 'string', + 'second_distribution_code' => 'string', + 'ira_sep_simple' => 'bool', + 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'float', + 'other_amount' => 'float', + 'other_percentage' => 'string', + 'total_distribution_percentage' => 'string', 'total_employee_contributions' => 'float', - 'amount_allocable_to_irr' => 'float', - 'first_year_designated_roth_contrib' => 'string', - 'fatca_requirement_indicator' => 'bool', - 'date_of_payment' => 'string', - 'id' => 'string', + 'amount_allocable_to_irr_within5_years' => 'float', + 'first_year_of_designated_roth_contribution' => 'string', + 'date_of_payment' => '\DateTime', + 'fatca_filing_requirement' => 'bool', 'type' => 'string', - 'issuer_id' => 'int', + 'id' => 'string', + 'issuer_id' => 'string', 'issuer_reference_id' => 'string', 'issuer_tin' => 'string', 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', 'tin' => 'string', 'recipient_name' => 'string', + 'tin_type' => 'string', 'recipient_second_name' => 'string', 'address' => 'string', 'address2' => 'string', 'city' => 'string', 'state' => 'string', 'zip' => 'string', - 'foreign_province' => 'string', + 'email' => 'string', + 'account_number' => 'string', + 'office_code' => 'string', + 'non_us_province' => 'string', 'country_code' => 'string', + 'federal_efile_date' => '\DateTime', + 'postal_mail' => 'bool', + 'state_efile_date' => '\DateTime', + 'recipient_edelivery_date' => '\DateTime', + 'tin_match' => 'bool', + 'no_tin' => 'bool', + 'address_verification' => 'bool', + 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding', + 'second_tin_notice' => 'bool', + 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', + 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationError[]', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding' + 'updated_at' => '\DateTime' ]; /** @@ -134,59 +141,65 @@ class Form1099R implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'gross_distributions' => 'double', + 'gross_distribution' => 'double', 'taxable_amount' => 'double', 'taxable_amount_not_determined' => null, - 'total_distribution_indicator' => null, + 'total_distribution_determined' => null, 'capital_gain' => 'double', - 'fed_income_tax_withheld' => 'double', - 'employee_contributions' => 'double', - 'net_unrealized_appreciation' => 'double', - 'distribution_code_required' => null, - 'distribution_code_optional' => null, - 'ira_sep_simple_indicator' => null, - 'total_ira_sep_simple_distribution' => 'double', - 'other' => 'double', - 'other_percent' => null, - 'percentage_total_distribution' => null, + 'federal_income_tax_withheld' => 'double', + 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'double', + 'net_unrealized_appreciation_in_employer_securities' => 'double', + 'distribution_code' => null, + 'second_distribution_code' => null, + 'ira_sep_simple' => null, + 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'double', + 'other_amount' => 'double', + 'other_percentage' => null, + 'total_distribution_percentage' => null, 'total_employee_contributions' => 'double', - 'amount_allocable_to_irr' => 'double', - 'first_year_designated_roth_contrib' => null, - 'fatca_requirement_indicator' => null, - 'date_of_payment' => null, - 'id' => null, + 'amount_allocable_to_irr_within5_years' => 'double', + 'first_year_of_designated_roth_contribution' => null, + 'date_of_payment' => 'date', + 'fatca_filing_requirement' => null, 'type' => null, - 'issuer_id' => 'int32', + 'id' => null, + 'issuer_id' => null, 'issuer_reference_id' => null, 'issuer_tin' => null, 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, 'reference_id' => null, - 'email' => null, - 'tin_type' => null, 'tin' => null, 'recipient_name' => null, + 'tin_type' => null, 'recipient_second_name' => null, 'address' => null, 'address2' => null, 'city' => null, 'state' => null, 'zip' => null, - 'foreign_province' => null, + 'email' => null, + 'account_number' => null, + 'office_code' => null, + 'non_us_province' => null, 'country_code' => null, + 'federal_efile_date' => 'date', + 'postal_mail' => null, + 'state_efile_date' => 'date', + 'recipient_edelivery_date' => 'date', + 'tin_match' => null, + 'no_tin' => null, + 'address_verification' => null, + 'state_and_local_withholding' => null, + 'second_tin_notice' => null, + 'federal_efile_status' => null, + 'state_efile_status' => null, + 'postal_mail_status' => null, + 'tin_match_status' => null, + 'address_verification_status' => null, + 'e_delivery_status' => null, 'validation_errors' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null + 'updated_at' => 'date-time' ]; /** @@ -216,59 +229,65 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'gross_distributions' => 'grossDistributions', + 'gross_distribution' => 'grossDistribution', 'taxable_amount' => 'taxableAmount', 'taxable_amount_not_determined' => 'taxableAmountNotDetermined', - 'total_distribution_indicator' => 'totalDistributionIndicator', + 'total_distribution_determined' => 'totalDistributionDetermined', 'capital_gain' => 'capitalGain', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', - 'employee_contributions' => 'employeeContributions', - 'net_unrealized_appreciation' => 'netUnrealizedAppreciation', - 'distribution_code_required' => 'distributionCodeRequired', - 'distribution_code_optional' => 'distributionCodeOptional', - 'ira_sep_simple_indicator' => 'iraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'totalIraSepSimpleDistribution', - 'other' => 'other', - 'other_percent' => 'otherPercent', - 'percentage_total_distribution' => 'percentageTotalDistribution', + 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', + 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'employeeContributionsOrDesignatedRothOrInsurancePremiums', + 'net_unrealized_appreciation_in_employer_securities' => 'netUnrealizedAppreciationInEmployerSecurities', + 'distribution_code' => 'distributionCode', + 'second_distribution_code' => 'secondDistributionCode', + 'ira_sep_simple' => 'iraSepSimple', + 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'traditionalIraSepSimpleOrRothConversionAmount', + 'other_amount' => 'otherAmount', + 'other_percentage' => 'otherPercentage', + 'total_distribution_percentage' => 'totalDistributionPercentage', 'total_employee_contributions' => 'totalEmployeeContributions', - 'amount_allocable_to_irr' => 'amountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'firstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'fatcaRequirementIndicator', + 'amount_allocable_to_irr_within5_years' => 'amountAllocableToIrrWithin5Years', + 'first_year_of_designated_roth_contribution' => 'firstYearOfDesignatedRothContribution', 'date_of_payment' => 'dateOfPayment', - 'id' => 'id', + 'fatca_filing_requirement' => 'fatcaFilingRequirement', 'type' => 'type', + 'id' => 'id', 'issuer_id' => 'issuerId', 'issuer_reference_id' => 'issuerReferenceId', 'issuer_tin' => 'issuerTin', 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', 'tin' => 'tin', 'recipient_name' => 'recipientName', + 'tin_type' => 'tinType', 'recipient_second_name' => 'recipientSecondName', 'address' => 'address', 'address2' => 'address2', 'city' => 'city', 'state' => 'state', 'zip' => 'zip', - 'foreign_province' => 'foreignProvince', + 'email' => 'email', + 'account_number' => 'accountNumber', + 'office_code' => 'officeCode', + 'non_us_province' => 'nonUsProvince', 'country_code' => 'countryCode', + 'federal_efile_date' => 'federalEfileDate', + 'postal_mail' => 'postalMail', + 'state_efile_date' => 'stateEfileDate', + 'recipient_edelivery_date' => 'recipientEdeliveryDate', + 'tin_match' => 'tinMatch', + 'no_tin' => 'noTin', + 'address_verification' => 'addressVerification', + 'state_and_local_withholding' => 'stateAndLocalWithholding', + 'second_tin_notice' => 'secondTinNotice', + 'federal_efile_status' => 'federalEfileStatus', + 'state_efile_status' => 'stateEfileStatus', + 'postal_mail_status' => 'postalMailStatus', + 'tin_match_status' => 'tinMatchStatus', + 'address_verification_status' => 'addressVerificationStatus', + 'e_delivery_status' => 'eDeliveryStatus', 'validation_errors' => 'validationErrors', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' + 'updated_at' => 'updatedAt' ]; /** @@ -277,59 +296,65 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'gross_distributions' => 'setGrossDistributions', + 'gross_distribution' => 'setGrossDistribution', 'taxable_amount' => 'setTaxableAmount', 'taxable_amount_not_determined' => 'setTaxableAmountNotDetermined', - 'total_distribution_indicator' => 'setTotalDistributionIndicator', + 'total_distribution_determined' => 'setTotalDistributionDetermined', 'capital_gain' => 'setCapitalGain', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', - 'employee_contributions' => 'setEmployeeContributions', - 'net_unrealized_appreciation' => 'setNetUnrealizedAppreciation', - 'distribution_code_required' => 'setDistributionCodeRequired', - 'distribution_code_optional' => 'setDistributionCodeOptional', - 'ira_sep_simple_indicator' => 'setIraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'setTotalIraSepSimpleDistribution', - 'other' => 'setOther', - 'other_percent' => 'setOtherPercent', - 'percentage_total_distribution' => 'setPercentageTotalDistribution', + 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', + 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'setEmployeeContributionsOrDesignatedRothOrInsurancePremiums', + 'net_unrealized_appreciation_in_employer_securities' => 'setNetUnrealizedAppreciationInEmployerSecurities', + 'distribution_code' => 'setDistributionCode', + 'second_distribution_code' => 'setSecondDistributionCode', + 'ira_sep_simple' => 'setIraSepSimple', + 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'setTraditionalIraSepSimpleOrRothConversionAmount', + 'other_amount' => 'setOtherAmount', + 'other_percentage' => 'setOtherPercentage', + 'total_distribution_percentage' => 'setTotalDistributionPercentage', 'total_employee_contributions' => 'setTotalEmployeeContributions', - 'amount_allocable_to_irr' => 'setAmountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'setFirstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'setFatcaRequirementIndicator', + 'amount_allocable_to_irr_within5_years' => 'setAmountAllocableToIrrWithin5Years', + 'first_year_of_designated_roth_contribution' => 'setFirstYearOfDesignatedRothContribution', 'date_of_payment' => 'setDateOfPayment', - 'id' => 'setId', + 'fatca_filing_requirement' => 'setFatcaFilingRequirement', 'type' => 'setType', + 'id' => 'setId', 'issuer_id' => 'setIssuerId', 'issuer_reference_id' => 'setIssuerReferenceId', 'issuer_tin' => 'setIssuerTin', 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', 'tin' => 'setTin', 'recipient_name' => 'setRecipientName', + 'tin_type' => 'setTinType', 'recipient_second_name' => 'setRecipientSecondName', 'address' => 'setAddress', 'address2' => 'setAddress2', 'city' => 'setCity', 'state' => 'setState', 'zip' => 'setZip', - 'foreign_province' => 'setForeignProvince', + 'email' => 'setEmail', + 'account_number' => 'setAccountNumber', + 'office_code' => 'setOfficeCode', + 'non_us_province' => 'setNonUsProvince', 'country_code' => 'setCountryCode', + 'federal_efile_date' => 'setFederalEfileDate', + 'postal_mail' => 'setPostalMail', + 'state_efile_date' => 'setStateEfileDate', + 'recipient_edelivery_date' => 'setRecipientEdeliveryDate', + 'tin_match' => 'setTinMatch', + 'no_tin' => 'setNoTin', + 'address_verification' => 'setAddressVerification', + 'state_and_local_withholding' => 'setStateAndLocalWithholding', + 'second_tin_notice' => 'setSecondTinNotice', + 'federal_efile_status' => 'setFederalEfileStatus', + 'state_efile_status' => 'setStateEfileStatus', + 'postal_mail_status' => 'setPostalMailStatus', + 'tin_match_status' => 'setTinMatchStatus', + 'address_verification_status' => 'setAddressVerificationStatus', + 'e_delivery_status' => 'setEDeliveryStatus', 'validation_errors' => 'setValidationErrors', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' + 'updated_at' => 'setUpdatedAt' ]; /** @@ -338,59 +363,65 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'gross_distributions' => 'getGrossDistributions', + 'gross_distribution' => 'getGrossDistribution', 'taxable_amount' => 'getTaxableAmount', 'taxable_amount_not_determined' => 'getTaxableAmountNotDetermined', - 'total_distribution_indicator' => 'getTotalDistributionIndicator', + 'total_distribution_determined' => 'getTotalDistributionDetermined', 'capital_gain' => 'getCapitalGain', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', - 'employee_contributions' => 'getEmployeeContributions', - 'net_unrealized_appreciation' => 'getNetUnrealizedAppreciation', - 'distribution_code_required' => 'getDistributionCodeRequired', - 'distribution_code_optional' => 'getDistributionCodeOptional', - 'ira_sep_simple_indicator' => 'getIraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'getTotalIraSepSimpleDistribution', - 'other' => 'getOther', - 'other_percent' => 'getOtherPercent', - 'percentage_total_distribution' => 'getPercentageTotalDistribution', + 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', + 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'getEmployeeContributionsOrDesignatedRothOrInsurancePremiums', + 'net_unrealized_appreciation_in_employer_securities' => 'getNetUnrealizedAppreciationInEmployerSecurities', + 'distribution_code' => 'getDistributionCode', + 'second_distribution_code' => 'getSecondDistributionCode', + 'ira_sep_simple' => 'getIraSepSimple', + 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'getTraditionalIraSepSimpleOrRothConversionAmount', + 'other_amount' => 'getOtherAmount', + 'other_percentage' => 'getOtherPercentage', + 'total_distribution_percentage' => 'getTotalDistributionPercentage', 'total_employee_contributions' => 'getTotalEmployeeContributions', - 'amount_allocable_to_irr' => 'getAmountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'getFirstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'getFatcaRequirementIndicator', + 'amount_allocable_to_irr_within5_years' => 'getAmountAllocableToIrrWithin5Years', + 'first_year_of_designated_roth_contribution' => 'getFirstYearOfDesignatedRothContribution', 'date_of_payment' => 'getDateOfPayment', - 'id' => 'getId', + 'fatca_filing_requirement' => 'getFatcaFilingRequirement', 'type' => 'getType', + 'id' => 'getId', 'issuer_id' => 'getIssuerId', 'issuer_reference_id' => 'getIssuerReferenceId', 'issuer_tin' => 'getIssuerTin', 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', 'tin' => 'getTin', 'recipient_name' => 'getRecipientName', + 'tin_type' => 'getTinType', 'recipient_second_name' => 'getRecipientSecondName', 'address' => 'getAddress', 'address2' => 'getAddress2', 'city' => 'getCity', 'state' => 'getState', 'zip' => 'getZip', - 'foreign_province' => 'getForeignProvince', + 'email' => 'getEmail', + 'account_number' => 'getAccountNumber', + 'office_code' => 'getOfficeCode', + 'non_us_province' => 'getNonUsProvince', 'country_code' => 'getCountryCode', + 'federal_efile_date' => 'getFederalEfileDate', + 'postal_mail' => 'getPostalMail', + 'state_efile_date' => 'getStateEfileDate', + 'recipient_edelivery_date' => 'getRecipientEdeliveryDate', + 'tin_match' => 'getTinMatch', + 'no_tin' => 'getNoTin', + 'address_verification' => 'getAddressVerification', + 'state_and_local_withholding' => 'getStateAndLocalWithholding', + 'second_tin_notice' => 'getSecondTinNotice', + 'federal_efile_status' => 'getFederalEfileStatus', + 'state_efile_status' => 'getStateEfileStatus', + 'postal_mail_status' => 'getPostalMailStatus', + 'tin_match_status' => 'getTinMatchStatus', + 'address_verification_status' => 'getAddressVerificationStatus', + 'e_delivery_status' => 'getEDeliveryStatus', 'validation_errors' => 'getValidationErrors', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' + 'updated_at' => 'getUpdatedAt' ]; /** @@ -434,6 +465,56 @@ public function getModelName() return self::$openAPIModelName; } + const TYPE__1099_NEC = '1099-NEC'; + const TYPE__1099_MISC = '1099-MISC'; + const TYPE__1099_DIV = '1099-DIV'; + const TYPE__1099_R = '1099-R'; + const TYPE__1099_K = '1099-K'; + const TYPE__1095_B = '1095-B'; + const TYPE__1042_S = '1042-S'; + const TYPE__1095_C = '1095-C'; + const TYPE__1099_INT = '1099-INT'; + const TIN_TYPE__EMPTY = 'Empty'; + const TIN_TYPE_EIN = 'EIN'; + const TIN_TYPE_SSN = 'SSN'; + const TIN_TYPE_ITIN = 'ITIN'; + const TIN_TYPE_ATIN = 'ATIN'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE__1099_NEC, + self::TYPE__1099_MISC, + self::TYPE__1099_DIV, + self::TYPE__1099_R, + self::TYPE__1099_K, + self::TYPE__1095_B, + self::TYPE__1042_S, + self::TYPE__1095_C, + self::TYPE__1099_INT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTinTypeAllowableValues() + { + return [ + self::TIN_TYPE__EMPTY, + self::TIN_TYPE_EIN, + self::TIN_TYPE_SSN, + self::TIN_TYPE_ITIN, + self::TIN_TYPE_ATIN, + ]; + } /** * Associative array for storing property values @@ -450,59 +531,65 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['gross_distributions'] = $data['gross_distributions'] ?? null; + $this->container['gross_distribution'] = $data['gross_distribution'] ?? null; $this->container['taxable_amount'] = $data['taxable_amount'] ?? null; $this->container['taxable_amount_not_determined'] = $data['taxable_amount_not_determined'] ?? null; - $this->container['total_distribution_indicator'] = $data['total_distribution_indicator'] ?? null; + $this->container['total_distribution_determined'] = $data['total_distribution_determined'] ?? null; $this->container['capital_gain'] = $data['capital_gain'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; - $this->container['employee_contributions'] = $data['employee_contributions'] ?? null; - $this->container['net_unrealized_appreciation'] = $data['net_unrealized_appreciation'] ?? null; - $this->container['distribution_code_required'] = $data['distribution_code_required'] ?? null; - $this->container['distribution_code_optional'] = $data['distribution_code_optional'] ?? null; - $this->container['ira_sep_simple_indicator'] = $data['ira_sep_simple_indicator'] ?? null; - $this->container['total_ira_sep_simple_distribution'] = $data['total_ira_sep_simple_distribution'] ?? null; - $this->container['other'] = $data['other'] ?? null; - $this->container['other_percent'] = $data['other_percent'] ?? null; - $this->container['percentage_total_distribution'] = $data['percentage_total_distribution'] ?? null; + $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; + $this->container['employee_contributions_or_designated_roth_or_insurance_premiums'] = $data['employee_contributions_or_designated_roth_or_insurance_premiums'] ?? null; + $this->container['net_unrealized_appreciation_in_employer_securities'] = $data['net_unrealized_appreciation_in_employer_securities'] ?? null; + $this->container['distribution_code'] = $data['distribution_code'] ?? null; + $this->container['second_distribution_code'] = $data['second_distribution_code'] ?? null; + $this->container['ira_sep_simple'] = $data['ira_sep_simple'] ?? null; + $this->container['traditional_ira_sep_simple_or_roth_conversion_amount'] = $data['traditional_ira_sep_simple_or_roth_conversion_amount'] ?? null; + $this->container['other_amount'] = $data['other_amount'] ?? null; + $this->container['other_percentage'] = $data['other_percentage'] ?? null; + $this->container['total_distribution_percentage'] = $data['total_distribution_percentage'] ?? null; $this->container['total_employee_contributions'] = $data['total_employee_contributions'] ?? null; - $this->container['amount_allocable_to_irr'] = $data['amount_allocable_to_irr'] ?? null; - $this->container['first_year_designated_roth_contrib'] = $data['first_year_designated_roth_contrib'] ?? null; - $this->container['fatca_requirement_indicator'] = $data['fatca_requirement_indicator'] ?? null; + $this->container['amount_allocable_to_irr_within5_years'] = $data['amount_allocable_to_irr_within5_years'] ?? null; + $this->container['first_year_of_designated_roth_contribution'] = $data['first_year_of_designated_roth_contribution'] ?? null; $this->container['date_of_payment'] = $data['date_of_payment'] ?? null; - $this->container['id'] = $data['id'] ?? null; + $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; $this->container['issuer_id'] = $data['issuer_id'] ?? null; $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['tin'] = $data['tin'] ?? null; $this->container['recipient_name'] = $data['recipient_name'] ?? null; + $this->container['tin_type'] = $data['tin_type'] ?? null; $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; $this->container['address'] = $data['address'] ?? null; $this->container['address2'] = $data['address2'] ?? null; $this->container['city'] = $data['city'] ?? null; $this->container['state'] = $data['state'] ?? null; $this->container['zip'] = $data['zip'] ?? null; - $this->container['foreign_province'] = $data['foreign_province'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['account_number'] = $data['account_number'] ?? null; + $this->container['office_code'] = $data['office_code'] ?? null; + $this->container['non_us_province'] = $data['non_us_province'] ?? null; $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['federal_efile_date'] = $data['federal_efile_date'] ?? null; + $this->container['postal_mail'] = $data['postal_mail'] ?? null; + $this->container['state_efile_date'] = $data['state_efile_date'] ?? null; + $this->container['recipient_edelivery_date'] = $data['recipient_edelivery_date'] ?? null; + $this->container['tin_match'] = $data['tin_match'] ?? null; + $this->container['no_tin'] = $data['no_tin'] ?? null; + $this->container['address_verification'] = $data['address_verification'] ?? null; + $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; + $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; + $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; + $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; + $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; + $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; + $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; + $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; $this->container['validation_errors'] = $data['validation_errors'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; } /** @@ -514,6 +601,39 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['recipient_name'] === null) { + $invalidProperties[] = "'recipient_name' can't be null"; + } + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tin_type', must be one of '%s'", + $this->container['tin_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } return $invalidProperties; } @@ -530,25 +650,25 @@ public function valid() /** - * Gets gross_distributions + * Gets gross_distribution * * @return float|null */ - public function getGrossDistributions() + public function getGrossDistribution() { - return $this->container['gross_distributions']; + return $this->container['gross_distribution']; } /** - * Sets gross_distributions + * Sets gross_distribution * - * @param float|null $gross_distributions gross_distributions + * @param float|null $gross_distribution Gross distribution * * @return self */ - public function setGrossDistributions($gross_distributions) + public function setGrossDistribution($gross_distribution) { - $this->container['gross_distributions'] = $gross_distributions; + $this->container['gross_distribution'] = $gross_distribution; return $this; } @@ -566,7 +686,7 @@ public function getTaxableAmount() /** * Sets taxable_amount * - * @param float|null $taxable_amount taxable_amount + * @param float|null $taxable_amount Taxable amount * * @return self */ @@ -590,7 +710,7 @@ public function getTaxableAmountNotDetermined() /** * Sets taxable_amount_not_determined * - * @param bool|null $taxable_amount_not_determined taxable_amount_not_determined + * @param bool|null $taxable_amount_not_determined Taxable amount not determined * * @return self */ @@ -602,25 +722,25 @@ public function setTaxableAmountNotDetermined($taxable_amount_not_determined) } /** - * Gets total_distribution_indicator + * Gets total_distribution_determined * * @return bool|null */ - public function getTotalDistributionIndicator() + public function getTotalDistributionDetermined() { - return $this->container['total_distribution_indicator']; + return $this->container['total_distribution_determined']; } /** - * Sets total_distribution_indicator + * Sets total_distribution_determined * - * @param bool|null $total_distribution_indicator total_distribution_indicator + * @param bool|null $total_distribution_determined Total distribution * * @return self */ - public function setTotalDistributionIndicator($total_distribution_indicator) + public function setTotalDistributionDetermined($total_distribution_determined) { - $this->container['total_distribution_indicator'] = $total_distribution_indicator; + $this->container['total_distribution_determined'] = $total_distribution_determined; return $this; } @@ -638,7 +758,7 @@ public function getCapitalGain() /** * Sets capital_gain * - * @param float|null $capital_gain capital_gain + * @param float|null $capital_gain Capital gain (included in Box 2a) * * @return self */ @@ -650,241 +770,241 @@ public function setCapitalGain($capital_gain) } /** - * Gets fed_income_tax_withheld + * Gets federal_income_tax_withheld * * @return float|null */ - public function getFedIncomeTaxWithheld() + public function getFederalIncomeTaxWithheld() { - return $this->container['fed_income_tax_withheld']; + return $this->container['federal_income_tax_withheld']; } /** - * Sets fed_income_tax_withheld + * Sets federal_income_tax_withheld * - * @param float|null $fed_income_tax_withheld fed_income_tax_withheld + * @param float|null $federal_income_tax_withheld Federal income tax withheld * * @return self */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) + public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; + $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; return $this; } /** - * Gets employee_contributions + * Gets employee_contributions_or_designated_roth_or_insurance_premiums * * @return float|null */ - public function getEmployeeContributions() + public function getEmployeeContributionsOrDesignatedRothOrInsurancePremiums() { - return $this->container['employee_contributions']; + return $this->container['employee_contributions_or_designated_roth_or_insurance_premiums']; } /** - * Sets employee_contributions + * Sets employee_contributions_or_designated_roth_or_insurance_premiums * - * @param float|null $employee_contributions employee_contributions + * @param float|null $employee_contributions_or_designated_roth_or_insurance_premiums Employee contributions/Designated Roth contributions or insurance premiums * * @return self */ - public function setEmployeeContributions($employee_contributions) + public function setEmployeeContributionsOrDesignatedRothOrInsurancePremiums($employee_contributions_or_designated_roth_or_insurance_premiums) { - $this->container['employee_contributions'] = $employee_contributions; + $this->container['employee_contributions_or_designated_roth_or_insurance_premiums'] = $employee_contributions_or_designated_roth_or_insurance_premiums; return $this; } /** - * Gets net_unrealized_appreciation + * Gets net_unrealized_appreciation_in_employer_securities * * @return float|null */ - public function getNetUnrealizedAppreciation() + public function getNetUnrealizedAppreciationInEmployerSecurities() { - return $this->container['net_unrealized_appreciation']; + return $this->container['net_unrealized_appreciation_in_employer_securities']; } /** - * Sets net_unrealized_appreciation + * Sets net_unrealized_appreciation_in_employer_securities * - * @param float|null $net_unrealized_appreciation net_unrealized_appreciation + * @param float|null $net_unrealized_appreciation_in_employer_securities Net unrealized appreciation in employer's securities * * @return self */ - public function setNetUnrealizedAppreciation($net_unrealized_appreciation) + public function setNetUnrealizedAppreciationInEmployerSecurities($net_unrealized_appreciation_in_employer_securities) { - $this->container['net_unrealized_appreciation'] = $net_unrealized_appreciation; + $this->container['net_unrealized_appreciation_in_employer_securities'] = $net_unrealized_appreciation_in_employer_securities; return $this; } /** - * Gets distribution_code_required + * Gets distribution_code * * @return string|null */ - public function getDistributionCodeRequired() + public function getDistributionCode() { - return $this->container['distribution_code_required']; + return $this->container['distribution_code']; } /** - * Sets distribution_code_required + * Sets distribution_code * - * @param string|null $distribution_code_required distribution_code_required + * @param string|null $distribution_code Distribution code * * @return self */ - public function setDistributionCodeRequired($distribution_code_required) + public function setDistributionCode($distribution_code) { - $this->container['distribution_code_required'] = $distribution_code_required; + $this->container['distribution_code'] = $distribution_code; return $this; } /** - * Gets distribution_code_optional + * Gets second_distribution_code * * @return string|null */ - public function getDistributionCodeOptional() + public function getSecondDistributionCode() { - return $this->container['distribution_code_optional']; + return $this->container['second_distribution_code']; } /** - * Sets distribution_code_optional + * Sets second_distribution_code * - * @param string|null $distribution_code_optional distribution_code_optional + * @param string|null $second_distribution_code Second distribution code * * @return self */ - public function setDistributionCodeOptional($distribution_code_optional) + public function setSecondDistributionCode($second_distribution_code) { - $this->container['distribution_code_optional'] = $distribution_code_optional; + $this->container['second_distribution_code'] = $second_distribution_code; return $this; } /** - * Gets ira_sep_simple_indicator + * Gets ira_sep_simple * * @return bool|null */ - public function getIraSepSimpleIndicator() + public function getIraSepSimple() { - return $this->container['ira_sep_simple_indicator']; + return $this->container['ira_sep_simple']; } /** - * Sets ira_sep_simple_indicator + * Sets ira_sep_simple * - * @param bool|null $ira_sep_simple_indicator ira_sep_simple_indicator + * @param bool|null $ira_sep_simple IRA/SEP/SIMPLE * * @return self */ - public function setIraSepSimpleIndicator($ira_sep_simple_indicator) + public function setIraSepSimple($ira_sep_simple) { - $this->container['ira_sep_simple_indicator'] = $ira_sep_simple_indicator; + $this->container['ira_sep_simple'] = $ira_sep_simple; return $this; } /** - * Gets total_ira_sep_simple_distribution + * Gets traditional_ira_sep_simple_or_roth_conversion_amount * * @return float|null */ - public function getTotalIraSepSimpleDistribution() + public function getTraditionalIraSepSimpleOrRothConversionAmount() { - return $this->container['total_ira_sep_simple_distribution']; + return $this->container['traditional_ira_sep_simple_or_roth_conversion_amount']; } /** - * Sets total_ira_sep_simple_distribution + * Sets traditional_ira_sep_simple_or_roth_conversion_amount * - * @param float|null $total_ira_sep_simple_distribution total_ira_sep_simple_distribution + * @param float|null $traditional_ira_sep_simple_or_roth_conversion_amount Traditional IRA/SEP/SIMPLE or Roth conversion amount * * @return self */ - public function setTotalIraSepSimpleDistribution($total_ira_sep_simple_distribution) + public function setTraditionalIraSepSimpleOrRothConversionAmount($traditional_ira_sep_simple_or_roth_conversion_amount) { - $this->container['total_ira_sep_simple_distribution'] = $total_ira_sep_simple_distribution; + $this->container['traditional_ira_sep_simple_or_roth_conversion_amount'] = $traditional_ira_sep_simple_or_roth_conversion_amount; return $this; } /** - * Gets other + * Gets other_amount * * @return float|null */ - public function getOther() + public function getOtherAmount() { - return $this->container['other']; + return $this->container['other_amount']; } /** - * Sets other + * Sets other_amount * - * @param float|null $other other + * @param float|null $other_amount Other amount * * @return self */ - public function setOther($other) + public function setOtherAmount($other_amount) { - $this->container['other'] = $other; + $this->container['other_amount'] = $other_amount; return $this; } /** - * Gets other_percent + * Gets other_percentage * * @return string|null */ - public function getOtherPercent() + public function getOtherPercentage() { - return $this->container['other_percent']; + return $this->container['other_percentage']; } /** - * Sets other_percent + * Sets other_percentage * - * @param string|null $other_percent other_percent + * @param string|null $other_percentage Other percentage * * @return self */ - public function setOtherPercent($other_percent) + public function setOtherPercentage($other_percentage) { - $this->container['other_percent'] = $other_percent; + $this->container['other_percentage'] = $other_percentage; return $this; } /** - * Gets percentage_total_distribution + * Gets total_distribution_percentage * * @return string|null */ - public function getPercentageTotalDistribution() + public function getTotalDistributionPercentage() { - return $this->container['percentage_total_distribution']; + return $this->container['total_distribution_percentage']; } /** - * Sets percentage_total_distribution + * Sets total_distribution_percentage * - * @param string|null $percentage_total_distribution percentage_total_distribution + * @param string|null $total_distribution_percentage Total distribution percentage * * @return self */ - public function setPercentageTotalDistribution($percentage_total_distribution) + public function setTotalDistributionPercentage($total_distribution_percentage) { - $this->container['percentage_total_distribution'] = $percentage_total_distribution; + $this->container['total_distribution_percentage'] = $total_distribution_percentage; return $this; } @@ -902,7 +1022,7 @@ public function getTotalEmployeeContributions() /** * Sets total_employee_contributions * - * @param float|null $total_employee_contributions total_employee_contributions + * @param float|null $total_employee_contributions Total employee contributions * * @return self */ @@ -914,145 +1034,155 @@ public function setTotalEmployeeContributions($total_employee_contributions) } /** - * Gets amount_allocable_to_irr + * Gets amount_allocable_to_irr_within5_years * * @return float|null */ - public function getAmountAllocableToIrr() + public function getAmountAllocableToIrrWithin5Years() { - return $this->container['amount_allocable_to_irr']; + return $this->container['amount_allocable_to_irr_within5_years']; } /** - * Sets amount_allocable_to_irr + * Sets amount_allocable_to_irr_within5_years * - * @param float|null $amount_allocable_to_irr amount_allocable_to_irr + * @param float|null $amount_allocable_to_irr_within5_years Amount allocable to IRR within 5 years * * @return self */ - public function setAmountAllocableToIrr($amount_allocable_to_irr) + public function setAmountAllocableToIrrWithin5Years($amount_allocable_to_irr_within5_years) { - $this->container['amount_allocable_to_irr'] = $amount_allocable_to_irr; + $this->container['amount_allocable_to_irr_within5_years'] = $amount_allocable_to_irr_within5_years; return $this; } /** - * Gets first_year_designated_roth_contrib + * Gets first_year_of_designated_roth_contribution * * @return string|null */ - public function getFirstYearDesignatedRothContrib() + public function getFirstYearOfDesignatedRothContribution() { - return $this->container['first_year_designated_roth_contrib']; + return $this->container['first_year_of_designated_roth_contribution']; } /** - * Sets first_year_designated_roth_contrib + * Sets first_year_of_designated_roth_contribution * - * @param string|null $first_year_designated_roth_contrib first_year_designated_roth_contrib + * @param string|null $first_year_of_designated_roth_contribution First year of designated Roth contribution * * @return self */ - public function setFirstYearDesignatedRothContrib($first_year_designated_roth_contrib) + public function setFirstYearOfDesignatedRothContribution($first_year_of_designated_roth_contribution) { - $this->container['first_year_designated_roth_contrib'] = $first_year_designated_roth_contrib; + $this->container['first_year_of_designated_roth_contribution'] = $first_year_of_designated_roth_contribution; return $this; } /** - * Gets fatca_requirement_indicator + * Gets date_of_payment * - * @return bool|null + * @return \DateTime|null */ - public function getFatcaRequirementIndicator() + public function getDateOfPayment() { - return $this->container['fatca_requirement_indicator']; + return $this->container['date_of_payment']; } /** - * Sets fatca_requirement_indicator + * Sets date_of_payment * - * @param bool|null $fatca_requirement_indicator fatca_requirement_indicator + * @param \DateTime|null $date_of_payment Date of payment * * @return self */ - public function setFatcaRequirementIndicator($fatca_requirement_indicator) + public function setDateOfPayment($date_of_payment) { - $this->container['fatca_requirement_indicator'] = $fatca_requirement_indicator; + $this->container['date_of_payment'] = $date_of_payment; return $this; } /** - * Gets date_of_payment + * Gets fatca_filing_requirement * - * @return string|null + * @return bool|null */ - public function getDateOfPayment() + public function getFatcaFilingRequirement() { - return $this->container['date_of_payment']; + return $this->container['fatca_filing_requirement']; } /** - * Sets date_of_payment + * Sets fatca_filing_requirement * - * @param string|null $date_of_payment date_of_payment + * @param bool|null $fatca_filing_requirement FATCA filing requirement * * @return self */ - public function setDateOfPayment($date_of_payment) + public function setFatcaFilingRequirement($fatca_filing_requirement) { - $this->container['date_of_payment'] = $date_of_payment; + $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; return $this; } /** - * Gets id + * Gets type * - * @return string|null + * @return string */ - public function getId() + public function getType() { - return $this->container['id']; + return $this->container['type']; } /** - * Sets id + * Sets type * - * @param string|null $id id + * @param string $type Form type * * @return self */ - public function setId($id) + public function setType($type) { - $this->container['id'] = $id; + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; return $this; } /** - * Gets type + * Gets id * * @return string|null */ - public function getType() + public function getId() { - return $this->container['type']; + return $this->container['id']; } /** - * Sets type + * Sets id * - * @param string|null $type type + * @param string|null $id Form ID. Unique identifier set when the record is created. * * @return self */ - public function setType($type) + public function setId($id) { - $this->container['type'] = $type; + $this->container['id'] = $id; return $this; } @@ -1060,7 +1190,7 @@ public function setType($type) /** * Gets issuer_id * - * @return int|null + * @return string|null */ public function getIssuerId() { @@ -1070,7 +1200,7 @@ public function getIssuerId() /** * Sets issuer_id * - * @param int|null $issuer_id issuer_id + * @param string|null $issuer_id Issuer ID - only required when creating forms * * @return self */ @@ -1094,7 +1224,7 @@ public function getIssuerReferenceId() /** * Sets issuer_reference_id * - * @param string|null $issuer_reference_id issuer_reference_id + * @param string|null $issuer_reference_id Issuer Reference ID - only required when creating forms * * @return self */ @@ -1118,7 +1248,7 @@ public function getIssuerTin() /** * Sets issuer_tin * - * @param string|null $issuer_tin issuer_tin + * @param string|null $issuer_tin Issuer TIN - readonly * * @return self */ @@ -1142,7 +1272,7 @@ public function getTaxYear() /** * Sets tax_year * - * @param int|null $tax_year tax_year + * @param int|null $tax_year Tax Year - only required when creating forms * * @return self */ @@ -1154,555 +1284,733 @@ public function setTaxYear($tax_year) } /** - * Gets federal_efile + * Gets reference_id * - * @return bool|null + * @return string|null */ - public function getFederalEfile() + public function getReferenceId() { - return $this->container['federal_efile']; + return $this->container['reference_id']; } /** - * Sets federal_efile + * Sets reference_id * - * @param bool|null $federal_efile federal_efile + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ - public function setFederalEfile($federal_efile) + public function setReferenceId($reference_id) { - $this->container['federal_efile'] = $federal_efile; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets federal_efile_status + * Gets tin * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getFederalEfileStatus() + public function getTin() { - return $this->container['federal_efile_status']; + return $this->container['tin']; } /** - * Sets federal_efile_status + * Sets tin * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status federal_efile_status + * @param string|null $tin Recipient's Federal Tax Identification Number (TIN). * * @return self */ - public function setFederalEfileStatus($federal_efile_status) + public function setTin($tin) { - $this->container['federal_efile_status'] = $federal_efile_status; + $this->container['tin'] = $tin; return $this; } /** - * Gets state_efile + * Gets recipient_name * - * @return bool|null + * @return string */ - public function getStateEfile() + public function getRecipientName() { - return $this->container['state_efile']; + return $this->container['recipient_name']; } /** - * Sets state_efile + * Sets recipient_name * - * @param bool|null $state_efile state_efile + * @param string $recipient_name Recipient name * * @return self */ - public function setStateEfile($state_efile) + public function setRecipientName($recipient_name) { - $this->container['state_efile'] = $state_efile; + $this->container['recipient_name'] = $recipient_name; return $this; } /** - * Gets state_efile_status + * Gets tin_type * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null + * @return string|null */ - public function getStateEfileStatus() + public function getTinType() { - return $this->container['state_efile_status']; + return $this->container['tin_type']; } /** - * Sets state_efile_status + * Sets tin_type * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status state_efile_status + * @param string|null $tin_type Type of TIN (Tax ID Number) * * @return self */ - public function setStateEfileStatus($state_efile_status) + public function setTinType($tin_type) { - - - $this->container['state_efile_status'] = $state_efile_status; + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tin_type', must be one of '%s'", + $tin_type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tin_type'] = $tin_type; return $this; } /** - * Gets postal_mail + * Gets recipient_second_name * - * @return bool|null + * @return string|null */ - public function getPostalMail() + public function getRecipientSecondName() { - return $this->container['postal_mail']; + return $this->container['recipient_second_name']; } /** - * Sets postal_mail + * Sets recipient_second_name * - * @param bool|null $postal_mail postal_mail + * @param string|null $recipient_second_name Recipient second name * * @return self */ - public function setPostalMail($postal_mail) + public function setRecipientSecondName($recipient_second_name) { - $this->container['postal_mail'] = $postal_mail; + $this->container['recipient_second_name'] = $recipient_second_name; return $this; } /** - * Gets postal_mail_status + * Gets address * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string */ - public function getPostalMailStatus() + public function getAddress() { - return $this->container['postal_mail_status']; + return $this->container['address']; } /** - * Sets postal_mail_status + * Sets address * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status postal_mail_status + * @param string $address Address. * * @return self */ - public function setPostalMailStatus($postal_mail_status) + public function setAddress($address) { - $this->container['postal_mail_status'] = $postal_mail_status; + $this->container['address'] = $address; return $this; } /** - * Gets tin_match + * Gets address2 * - * @return bool|null + * @return string|null */ - public function getTinMatch() + public function getAddress2() { - return $this->container['tin_match']; + return $this->container['address2']; } /** - * Sets tin_match + * Sets address2 * - * @param bool|null $tin_match tin_match + * @param string|null $address2 Address line 2. * * @return self */ - public function setTinMatch($tin_match) + public function setAddress2($address2) { - $this->container['tin_match'] = $tin_match; + $this->container['address2'] = $address2; return $this; } /** - * Gets tin_match_status + * Gets city * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string */ - public function getTinMatchStatus() + public function getCity() { - return $this->container['tin_match_status']; + return $this->container['city']; } /** - * Sets tin_match_status + * Sets city * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status tin_match_status + * @param string $city City. * * @return self */ - public function setTinMatchStatus($tin_match_status) + public function setCity($city) { - $this->container['tin_match_status'] = $tin_match_status; + $this->container['city'] = $city; return $this; } /** - * Gets address_verification + * Gets state * - * @return bool|null + * @return string|null */ - public function getAddressVerification() + public function getState() { - return $this->container['address_verification']; + return $this->container['state']; } /** - * Sets address_verification + * Sets state * - * @param bool|null $address_verification address_verification + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ - public function setAddressVerification($address_verification) + public function setState($state) { - $this->container['address_verification'] = $address_verification; + $this->container['state'] = $state; return $this; } /** - * Gets address_verification_status + * Gets zip * - * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + * @return string|null */ - public function getAddressVerificationStatus() + public function getZip() { - return $this->container['address_verification_status']; + return $this->container['zip']; } /** - * Sets address_verification_status + * Sets zip * - * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status address_verification_status + * @param string|null $zip ZIP/postal code. * * @return self */ - public function setAddressVerificationStatus($address_verification_status) + public function setZip($zip) { - $this->container['address_verification_status'] = $address_verification_status; + $this->container['zip'] = $zip; return $this; } /** - * Gets reference_id + * Gets email * * @return string|null */ - public function getReferenceId() + public function getEmail() { - return $this->container['reference_id']; + return $this->container['email']; } /** - * Sets reference_id + * Sets email * - * @param string|null $reference_id reference_id + * @param string|null $email Recipient's Contact email address. * * @return self */ - public function setReferenceId($reference_id) + public function setEmail($email) { - $this->container['reference_id'] = $reference_id; + $this->container['email'] = $email; return $this; } /** - * Gets email + * Gets account_number * * @return string|null */ - public function getEmail() + public function getAccountNumber() { - return $this->container['email']; + return $this->container['account_number']; } /** - * Sets email + * Sets account_number * - * @param string|null $email email + * @param string|null $account_number Account number * * @return self */ - public function setEmail($email) + public function setAccountNumber($account_number) { - $this->container['email'] = $email; + $this->container['account_number'] = $account_number; return $this; } /** - * Gets tin_type + * Gets office_code * * @return string|null */ - public function getTinType() + public function getOfficeCode() { - return $this->container['tin_type']; + return $this->container['office_code']; } /** - * Sets tin_type + * Sets office_code * - * @param string|null $tin_type tin_type + * @param string|null $office_code Office code * * @return self */ - public function setTinType($tin_type) + public function setOfficeCode($office_code) { - $this->container['tin_type'] = $tin_type; + $this->container['office_code'] = $office_code; return $this; } /** - * Gets tin + * Gets non_us_province * * @return string|null */ - public function getTin() + public function getNonUsProvince() { - return $this->container['tin']; + return $this->container['non_us_province']; } /** - * Sets tin + * Sets non_us_province * - * @param string|null $tin tin + * @param string|null $non_us_province Province or region for non-US/CA addresses. * * @return self */ - public function setTin($tin) + public function setNonUsProvince($non_us_province) { - $this->container['tin'] = $tin; + $this->container['non_us_province'] = $non_us_province; return $this; } /** - * Gets recipient_name + * Gets country_code * - * @return string|null + * @return string */ - public function getRecipientName() + public function getCountryCode() { - return $this->container['recipient_name']; + return $this->container['country_code']; } /** - * Sets recipient_name + * Sets country_code * - * @param string|null $recipient_name recipient_name + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ - public function setRecipientName($recipient_name) + public function setCountryCode($country_code) { - $this->container['recipient_name'] = $recipient_name; + $this->container['country_code'] = $country_code; return $this; } /** - * Gets recipient_second_name + * Gets federal_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getRecipientSecondName() + public function getFederalEfileDate() { - return $this->container['recipient_second_name']; + return $this->container['federal_efile_date']; } /** - * Sets recipient_second_name + * Sets federal_efile_date * - * @param string|null $recipient_second_name recipient_second_name + * @param \DateTime|null $federal_efile_date Date when federal e-filing should be scheduled for this form * * @return self */ - public function setRecipientSecondName($recipient_second_name) + public function setFederalEfileDate($federal_efile_date) { - $this->container['recipient_second_name'] = $recipient_second_name; + $this->container['federal_efile_date'] = $federal_efile_date; return $this; } /** - * Gets address + * Gets postal_mail * - * @return string|null + * @return bool|null */ - public function getAddress() + public function getPostalMail() { - return $this->container['address']; + return $this->container['postal_mail']; } /** - * Sets address + * Sets postal_mail * - * @param string|null $address address + * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form * * @return self */ - public function setAddress($address) + public function setPostalMail($postal_mail) { - $this->container['address'] = $address; + $this->container['postal_mail'] = $postal_mail; return $this; } /** - * Gets address2 + * Gets state_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getAddress2() + public function getStateEfileDate() { - return $this->container['address2']; + return $this->container['state_efile_date']; } /** - * Sets address2 + * Sets state_efile_date * - * @param string|null $address2 address2 + * @param \DateTime|null $state_efile_date Date when state e-filing should be scheduled for this form * * @return self */ - public function setAddress2($address2) + public function setStateEfileDate($state_efile_date) { - $this->container['address2'] = $address2; + $this->container['state_efile_date'] = $state_efile_date; return $this; } /** - * Gets city + * Gets recipient_edelivery_date * - * @return string|null + * @return \DateTime|null */ - public function getCity() + public function getRecipientEdeliveryDate() { - return $this->container['city']; + return $this->container['recipient_edelivery_date']; } /** - * Sets city + * Sets recipient_edelivery_date * - * @param string|null $city city + * @param \DateTime|null $recipient_edelivery_date Date when recipient e-delivery should be scheduled for this form * * @return self */ - public function setCity($city) + public function setRecipientEdeliveryDate($recipient_edelivery_date) { - $this->container['city'] = $city; + $this->container['recipient_edelivery_date'] = $recipient_edelivery_date; return $this; } /** - * Gets state + * Gets tin_match * - * @return string|null + * @return bool|null */ - public function getState() + public function getTinMatch() { - return $this->container['state']; + return $this->container['tin_match']; } /** - * Sets state + * Sets tin_match * - * @param string|null $state state + * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form * * @return self */ - public function setState($state) + public function setTinMatch($tin_match) { - $this->container['state'] = $state; + $this->container['tin_match'] = $tin_match; return $this; } /** - * Gets zip + * Gets no_tin * - * @return string|null + * @return bool|null */ - public function getZip() + public function getNoTin() { - return $this->container['zip']; + return $this->container['no_tin']; } /** - * Sets zip + * Sets no_tin * - * @param string|null $zip zip + * @param bool|null $no_tin No TIN indicator * * @return self */ - public function setZip($zip) + public function setNoTin($no_tin) { - $this->container['zip'] = $zip; + $this->container['no_tin'] = $no_tin; return $this; } /** - * Gets foreign_province + * Gets address_verification * - * @return string|null + * @return bool|null */ - public function getForeignProvince() + public function getAddressVerification() { - return $this->container['foreign_province']; + return $this->container['address_verification']; } /** - * Sets foreign_province + * Sets address_verification * - * @param string|null $foreign_province foreign_province + * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form * * @return self */ - public function setForeignProvince($foreign_province) + public function setAddressVerification($address_verification) { - $this->container['foreign_province'] = $foreign_province; + $this->container['address_verification'] = $address_verification; return $this; } /** - * Gets country_code + * Gets state_and_local_withholding * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null */ - public function getCountryCode() + public function getStateAndLocalWithholding() { - return $this->container['country_code']; + return $this->container['state_and_local_withholding']; } /** - * Sets country_code + * Sets state_and_local_withholding * - * @param string|null $country_code country_code + * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding State and local withholding information * * @return self */ - public function setCountryCode($country_code) + public function setStateAndLocalWithholding($state_and_local_withholding) { - $this->container['country_code'] = $country_code; + $this->container['state_and_local_withholding'] = $state_and_local_withholding; + + return $this; + } + + /** + * Gets second_tin_notice + * + * @return bool|null + */ + public function getSecondTinNotice() + { + return $this->container['second_tin_notice']; + } + + /** + * Sets second_tin_notice + * + * @param bool|null $second_tin_notice Second TIN notice + * + * @return self + */ + public function setSecondTinNotice($second_tin_notice) + { + $this->container['second_tin_notice'] = $second_tin_notice; + + return $this; + } + + /** + * Gets federal_efile_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getFederalEfileStatus() + { + return $this->container['federal_efile_status']; + } + + /** + * Sets federal_efile_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status Federal e-file status + * + * @return self + */ + public function setFederalEfileStatus($federal_efile_status) + { + $this->container['federal_efile_status'] = $federal_efile_status; + + return $this; + } + + /** + * Gets state_efile_status + * + * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null + */ + public function getStateEfileStatus() + { + return $this->container['state_efile_status']; + } + + /** + * Sets state_efile_status + * + * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status State e-file status + * + * @return self + */ + public function setStateEfileStatus($state_efile_status) + { + + + $this->container['state_efile_status'] = $state_efile_status; + + return $this; + } + + /** + * Gets postal_mail_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getPostalMailStatus() + { + return $this->container['postal_mail_status']; + } + + /** + * Sets postal_mail_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status Postal mail to recipient status + * + * @return self + */ + public function setPostalMailStatus($postal_mail_status) + { + $this->container['postal_mail_status'] = $postal_mail_status; + + return $this; + } + + /** + * Gets tin_match_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getTinMatchStatus() + { + return $this->container['tin_match_status']; + } + + /** + * Sets tin_match_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status TIN Match status + * + * @return self + */ + public function setTinMatchStatus($tin_match_status) + { + $this->container['tin_match_status'] = $tin_match_status; + + return $this; + } + + /** + * Gets address_verification_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getAddressVerificationStatus() + { + return $this->container['address_verification_status']; + } + + /** + * Sets address_verification_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status Address verification status + * + * @return self + */ + public function setAddressVerificationStatus($address_verification_status) + { + $this->container['address_verification_status'] = $address_verification_status; + + return $this; + } + + /** + * Gets e_delivery_status + * + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null + */ + public function getEDeliveryStatus() + { + return $this->container['e_delivery_status']; + } + + /** + * Sets e_delivery_status + * + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $e_delivery_status EDelivery status + * + * @return self + */ + public function setEDeliveryStatus($e_delivery_status) + { + $this->container['e_delivery_status'] = $e_delivery_status; return $this; } @@ -1720,7 +2028,7 @@ public function getValidationErrors() /** * Sets validation_errors * - * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors validation_errors + * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors Validation errors * * @return self */ @@ -1746,7 +2054,7 @@ public function getCreatedAt() /** * Sets created_at * - * @param \DateTime|null $created_at created_at + * @param \DateTime|null $created_at Date time when the record was created. * * @return self */ @@ -1770,7 +2078,7 @@ public function getUpdatedAt() /** * Sets updated_at * - * @param \DateTime|null $updated_at updated_at + * @param \DateTime|null $updated_at Date time when the record was last updated. * * @return self */ @@ -1780,30 +2088,6 @@ public function setUpdatedAt($updated_at) return $this; } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/Form1099RList.php b/lib/Model/A1099/V2/Form1099RList.php deleted file mode 100644 index 137abb7..0000000 --- a/lib/Model/A1099/V2/Form1099RList.php +++ /dev/null @@ -1,364 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099RList Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099RList implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099RList'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'forms' => '\Avalara\SDK\Model\A1099\V2\Form1099RListItem[]', - 'form_type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'forms' => null, - 'form_type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'forms' => 'forms', - 'form_type' => 'formType' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'forms' => 'setForms', - 'form_type' => 'setFormType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'forms' => 'getForms', - 'form_type' => 'getFormType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['forms'] = $data['forms'] ?? null; - $this->container['form_type'] = $data['form_type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets forms - * - * @return \Avalara\SDK\Model\A1099\V2\Form1099RListItem[]|null - */ - public function getForms() - { - return $this->container['forms']; - } - - /** - * Sets forms - * - * @param \Avalara\SDK\Model\A1099\V2\Form1099RListItem[]|null $forms forms - * - * @return self - */ - public function setForms($forms) - { - - - $this->container['forms'] = $forms; - - return $this; - } - - /** - * Gets form_type - * - * @return string|null - */ - public function getFormType() - { - return $this->container['form_type']; - } - - /** - * Sets form_type - * - * @param string|null $form_type form_type - * - * @return self - */ - public function setFormType($form_type) - { - $this->container['form_type'] = $form_type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099RListItem.php b/lib/Model/A1099/V2/Form1099RListItem.php deleted file mode 100644 index b154263..0000000 --- a/lib/Model/A1099/V2/Form1099RListItem.php +++ /dev/null @@ -1,1965 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099RListItem Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099RListItem implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099RListItem'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'gross_distribution' => 'float', - 'taxable_amount' => 'float', - 'taxable_amount_not_determined' => 'bool', - 'total_distribution_determined' => 'bool', - 'capital_gain' => 'float', - 'federal_income_tax_withheld' => 'float', - 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'float', - 'net_unrealized_appreciation_in_employer_securities' => 'float', - 'distribution_code' => 'string', - 'second_distribution_code' => 'string', - 'ira_sep_simple' => 'bool', - 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'float', - 'other_amount' => 'float', - 'other_percentage' => 'string', - 'total_distribution_percentage' => 'string', - 'total_employee_contributions' => 'float', - 'amount_allocable_to_irr_within5_years' => 'float', - 'first_year_of_designated_roth_contribution' => 'int', - 'fatca_filing_requirement' => 'bool', - 'date_of_payment' => '\DateTime', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'gross_distribution' => 'double', - 'taxable_amount' => 'double', - 'taxable_amount_not_determined' => null, - 'total_distribution_determined' => null, - 'capital_gain' => 'double', - 'federal_income_tax_withheld' => 'double', - 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'double', - 'net_unrealized_appreciation_in_employer_securities' => 'double', - 'distribution_code' => null, - 'second_distribution_code' => null, - 'ira_sep_simple' => null, - 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'double', - 'other_amount' => 'double', - 'other_percentage' => null, - 'total_distribution_percentage' => null, - 'total_employee_contributions' => 'double', - 'amount_allocable_to_irr_within5_years' => 'double', - 'first_year_of_designated_roth_contribution' => 'int32', - 'fatca_filing_requirement' => null, - 'date_of_payment' => 'date-time', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'gross_distribution' => 'grossDistribution', - 'taxable_amount' => 'taxableAmount', - 'taxable_amount_not_determined' => 'taxableAmountNotDetermined', - 'total_distribution_determined' => 'totalDistributionDetermined', - 'capital_gain' => 'capitalGain', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'employeeContributionsOrDesignatedRothOrInsurancePremiums', - 'net_unrealized_appreciation_in_employer_securities' => 'netUnrealizedAppreciationInEmployerSecurities', - 'distribution_code' => 'distributionCode', - 'second_distribution_code' => 'secondDistributionCode', - 'ira_sep_simple' => 'iraSepSimple', - 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'traditionalIraSepSimpleOrRothConversionAmount', - 'other_amount' => 'otherAmount', - 'other_percentage' => 'otherPercentage', - 'total_distribution_percentage' => 'totalDistributionPercentage', - 'total_employee_contributions' => 'totalEmployeeContributions', - 'amount_allocable_to_irr_within5_years' => 'amountAllocableToIrrWithin5Years', - 'first_year_of_designated_roth_contribution' => 'firstYearOfDesignatedRothContribution', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'date_of_payment' => 'dateOfPayment', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'gross_distribution' => 'setGrossDistribution', - 'taxable_amount' => 'setTaxableAmount', - 'taxable_amount_not_determined' => 'setTaxableAmountNotDetermined', - 'total_distribution_determined' => 'setTotalDistributionDetermined', - 'capital_gain' => 'setCapitalGain', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'setEmployeeContributionsOrDesignatedRothOrInsurancePremiums', - 'net_unrealized_appreciation_in_employer_securities' => 'setNetUnrealizedAppreciationInEmployerSecurities', - 'distribution_code' => 'setDistributionCode', - 'second_distribution_code' => 'setSecondDistributionCode', - 'ira_sep_simple' => 'setIraSepSimple', - 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'setTraditionalIraSepSimpleOrRothConversionAmount', - 'other_amount' => 'setOtherAmount', - 'other_percentage' => 'setOtherPercentage', - 'total_distribution_percentage' => 'setTotalDistributionPercentage', - 'total_employee_contributions' => 'setTotalEmployeeContributions', - 'amount_allocable_to_irr_within5_years' => 'setAmountAllocableToIrrWithin5Years', - 'first_year_of_designated_roth_contribution' => 'setFirstYearOfDesignatedRothContribution', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'date_of_payment' => 'setDateOfPayment', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'gross_distribution' => 'getGrossDistribution', - 'taxable_amount' => 'getTaxableAmount', - 'taxable_amount_not_determined' => 'getTaxableAmountNotDetermined', - 'total_distribution_determined' => 'getTotalDistributionDetermined', - 'capital_gain' => 'getCapitalGain', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'getEmployeeContributionsOrDesignatedRothOrInsurancePremiums', - 'net_unrealized_appreciation_in_employer_securities' => 'getNetUnrealizedAppreciationInEmployerSecurities', - 'distribution_code' => 'getDistributionCode', - 'second_distribution_code' => 'getSecondDistributionCode', - 'ira_sep_simple' => 'getIraSepSimple', - 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'getTraditionalIraSepSimpleOrRothConversionAmount', - 'other_amount' => 'getOtherAmount', - 'other_percentage' => 'getOtherPercentage', - 'total_distribution_percentage' => 'getTotalDistributionPercentage', - 'total_employee_contributions' => 'getTotalEmployeeContributions', - 'amount_allocable_to_irr_within5_years' => 'getAmountAllocableToIrrWithin5Years', - 'first_year_of_designated_roth_contribution' => 'getFirstYearOfDesignatedRothContribution', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'date_of_payment' => 'getDateOfPayment', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const DISTRIBUTION_CODE__1 = '1'; - const DISTRIBUTION_CODE__2 = '2'; - const DISTRIBUTION_CODE__3 = '3'; - const DISTRIBUTION_CODE__4 = '4'; - const DISTRIBUTION_CODE__5 = '5'; - const DISTRIBUTION_CODE__6 = '6'; - const DISTRIBUTION_CODE__7 = '7'; - const DISTRIBUTION_CODE__8 = '8'; - const DISTRIBUTION_CODE__9 = '9'; - const DISTRIBUTION_CODE_A = 'A'; - const DISTRIBUTION_CODE_B = 'B'; - const DISTRIBUTION_CODE_C = 'C'; - const DISTRIBUTION_CODE_D = 'D'; - const DISTRIBUTION_CODE_E = 'E'; - const DISTRIBUTION_CODE_F = 'F'; - const DISTRIBUTION_CODE_G = 'G'; - const DISTRIBUTION_CODE_H = 'H'; - const DISTRIBUTION_CODE_J = 'J'; - const DISTRIBUTION_CODE_K = 'K'; - const DISTRIBUTION_CODE_L = 'L'; - const DISTRIBUTION_CODE_M = 'M'; - const DISTRIBUTION_CODE_N = 'N'; - const DISTRIBUTION_CODE_P = 'P'; - const DISTRIBUTION_CODE_Q = 'Q'; - const DISTRIBUTION_CODE_R = 'R'; - const DISTRIBUTION_CODE_S = 'S'; - const DISTRIBUTION_CODE_T = 'T'; - const DISTRIBUTION_CODE_U = 'U'; - const DISTRIBUTION_CODE_W = 'W'; - const SECOND_DISTRIBUTION_CODE_EARLY_DISTRIBUTION_NO_EXCEPTION = 'EarlyDistributionNoException'; - const SECOND_DISTRIBUTION_CODE_EARLY_DISTRIBUTION_WITH_EXCEPTION = 'EarlyDistributionWithException'; - const SECOND_DISTRIBUTION_CODE_DISABILITY = 'Disability'; - const SECOND_DISTRIBUTION_CODE_DEATH = 'Death'; - const SECOND_DISTRIBUTION_CODE_PROHIBITED_TRANSACTION = 'ProhibitedTransaction'; - const SECOND_DISTRIBUTION_CODE_SECTION1035_EXCHANGE = 'Section1035Exchange'; - const SECOND_DISTRIBUTION_CODE_NORMAL_DISTRIBUTION = 'NormalDistribution'; - const SECOND_DISTRIBUTION_CODE_EXCESS_CONTRIBUTIONS_CURRENT_YEAR = 'ExcessContributionsCurrentYear'; - const SECOND_DISTRIBUTION_CODE_CURRENT_LIFE_INSURANCE_PROTECTION_COST = 'CurrentLifeInsuranceProtectionCost'; - const SECOND_DISTRIBUTION_CODE_TEN_YEAR_TAX_OPTION = 'TenYearTaxOption'; - const SECOND_DISTRIBUTION_CODE_DESIGNATED_ROTH_DISTRIBUTION = 'DesignatedRothDistribution'; - const SECOND_DISTRIBUTION_CODE_REPORTABLE_DEATH_BENEFITS = 'ReportableDeathBenefits'; - const SECOND_DISTRIBUTION_CODE_NONQUALIFIED_ANNUITY_PAYMENTS = 'NonqualifiedAnnuityPayments'; - const SECOND_DISTRIBUTION_CODE_EPCRS_DISTRIBUTION = 'EPCRSDistribution'; - const SECOND_DISTRIBUTION_CODE_CHARITABLE_GIFT_ANNUITY = 'CharitableGiftAnnuity'; - const SECOND_DISTRIBUTION_CODE_DIRECT_ROLLOVER = 'DirectRollover'; - const SECOND_DISTRIBUTION_CODE_ROTH_ACCOUNT_TO_IRA_DIRECT_ROLLOVER = 'RothAccountToIRADirectRollover'; - const SECOND_DISTRIBUTION_CODE_EARLY_ROTH_IRA_DISTRIBUTION = 'EarlyRothIRADistribution'; - const SECOND_DISTRIBUTION_CODE_IRA_ASSETS_NO_FMV = 'IRAAssetsNoFMV'; - const SECOND_DISTRIBUTION_CODE_LOANS_DEEMED_DISTRIBUTIONS = 'LoansDeemedDistributions'; - const SECOND_DISTRIBUTION_CODE_QUALIFIED_PLAN_LOAN_OFFSETS = 'QualifiedPlanLoanOffsets'; - const SECOND_DISTRIBUTION_CODE_RECHARACTERIZED_IRA_NEXT_YEAR = 'RecharacterizedIRANextYear'; - const SECOND_DISTRIBUTION_CODE_EXCESS_CONTRIBUTIONS_PREVIOUS_YEAR = 'ExcessContributionsPreviousYear'; - const SECOND_DISTRIBUTION_CODE_QUALIFIED_ROTH_IRA_DISTRIBUTION = 'QualifiedRothIRADistribution'; - const SECOND_DISTRIBUTION_CODE_RECHARACTERIZED_IRA_PREVIOUS_YEAR = 'RecharacterizedIRAPreviousYear'; - const SECOND_DISTRIBUTION_CODE_EARLY_SIMPLE_IRA_DISTRIBUTION = 'EarlySimpleIRADistribution'; - const SECOND_DISTRIBUTION_CODE_ROTH_IRA_DISTRIBUTION_EXCEPTION = 'RothIRADistributionException'; - const SECOND_DISTRIBUTION_CODE_ESOP_DISTRIBUTION = 'ESOPDistribution'; - const SECOND_DISTRIBUTION_CODE_LONG_TERM_CARE_INSURANCE = 'LongTermCareInsurance'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getDistributionCodeAllowableValues() - { - return [ - self::DISTRIBUTION_CODE__1, - self::DISTRIBUTION_CODE__2, - self::DISTRIBUTION_CODE__3, - self::DISTRIBUTION_CODE__4, - self::DISTRIBUTION_CODE__5, - self::DISTRIBUTION_CODE__6, - self::DISTRIBUTION_CODE__7, - self::DISTRIBUTION_CODE__8, - self::DISTRIBUTION_CODE__9, - self::DISTRIBUTION_CODE_A, - self::DISTRIBUTION_CODE_B, - self::DISTRIBUTION_CODE_C, - self::DISTRIBUTION_CODE_D, - self::DISTRIBUTION_CODE_E, - self::DISTRIBUTION_CODE_F, - self::DISTRIBUTION_CODE_G, - self::DISTRIBUTION_CODE_H, - self::DISTRIBUTION_CODE_J, - self::DISTRIBUTION_CODE_K, - self::DISTRIBUTION_CODE_L, - self::DISTRIBUTION_CODE_M, - self::DISTRIBUTION_CODE_N, - self::DISTRIBUTION_CODE_P, - self::DISTRIBUTION_CODE_Q, - self::DISTRIBUTION_CODE_R, - self::DISTRIBUTION_CODE_S, - self::DISTRIBUTION_CODE_T, - self::DISTRIBUTION_CODE_U, - self::DISTRIBUTION_CODE_W, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getSecondDistributionCodeAllowableValues() - { - return [ - self::SECOND_DISTRIBUTION_CODE_EARLY_DISTRIBUTION_NO_EXCEPTION, - self::SECOND_DISTRIBUTION_CODE_EARLY_DISTRIBUTION_WITH_EXCEPTION, - self::SECOND_DISTRIBUTION_CODE_DISABILITY, - self::SECOND_DISTRIBUTION_CODE_DEATH, - self::SECOND_DISTRIBUTION_CODE_PROHIBITED_TRANSACTION, - self::SECOND_DISTRIBUTION_CODE_SECTION1035_EXCHANGE, - self::SECOND_DISTRIBUTION_CODE_NORMAL_DISTRIBUTION, - self::SECOND_DISTRIBUTION_CODE_EXCESS_CONTRIBUTIONS_CURRENT_YEAR, - self::SECOND_DISTRIBUTION_CODE_CURRENT_LIFE_INSURANCE_PROTECTION_COST, - self::SECOND_DISTRIBUTION_CODE_TEN_YEAR_TAX_OPTION, - self::SECOND_DISTRIBUTION_CODE_DESIGNATED_ROTH_DISTRIBUTION, - self::SECOND_DISTRIBUTION_CODE_REPORTABLE_DEATH_BENEFITS, - self::SECOND_DISTRIBUTION_CODE_NONQUALIFIED_ANNUITY_PAYMENTS, - self::SECOND_DISTRIBUTION_CODE_EPCRS_DISTRIBUTION, - self::SECOND_DISTRIBUTION_CODE_CHARITABLE_GIFT_ANNUITY, - self::SECOND_DISTRIBUTION_CODE_DIRECT_ROLLOVER, - self::SECOND_DISTRIBUTION_CODE_ROTH_ACCOUNT_TO_IRA_DIRECT_ROLLOVER, - self::SECOND_DISTRIBUTION_CODE_EARLY_ROTH_IRA_DISTRIBUTION, - self::SECOND_DISTRIBUTION_CODE_IRA_ASSETS_NO_FMV, - self::SECOND_DISTRIBUTION_CODE_LOANS_DEEMED_DISTRIBUTIONS, - self::SECOND_DISTRIBUTION_CODE_QUALIFIED_PLAN_LOAN_OFFSETS, - self::SECOND_DISTRIBUTION_CODE_RECHARACTERIZED_IRA_NEXT_YEAR, - self::SECOND_DISTRIBUTION_CODE_EXCESS_CONTRIBUTIONS_PREVIOUS_YEAR, - self::SECOND_DISTRIBUTION_CODE_QUALIFIED_ROTH_IRA_DISTRIBUTION, - self::SECOND_DISTRIBUTION_CODE_RECHARACTERIZED_IRA_PREVIOUS_YEAR, - self::SECOND_DISTRIBUTION_CODE_EARLY_SIMPLE_IRA_DISTRIBUTION, - self::SECOND_DISTRIBUTION_CODE_ROTH_IRA_DISTRIBUTION_EXCEPTION, - self::SECOND_DISTRIBUTION_CODE_ESOP_DISTRIBUTION, - self::SECOND_DISTRIBUTION_CODE_LONG_TERM_CARE_INSURANCE, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['gross_distribution'] = $data['gross_distribution'] ?? null; - $this->container['taxable_amount'] = $data['taxable_amount'] ?? null; - $this->container['taxable_amount_not_determined'] = $data['taxable_amount_not_determined'] ?? null; - $this->container['total_distribution_determined'] = $data['total_distribution_determined'] ?? null; - $this->container['capital_gain'] = $data['capital_gain'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['employee_contributions_or_designated_roth_or_insurance_premiums'] = $data['employee_contributions_or_designated_roth_or_insurance_premiums'] ?? null; - $this->container['net_unrealized_appreciation_in_employer_securities'] = $data['net_unrealized_appreciation_in_employer_securities'] ?? null; - $this->container['distribution_code'] = $data['distribution_code'] ?? null; - $this->container['second_distribution_code'] = $data['second_distribution_code'] ?? null; - $this->container['ira_sep_simple'] = $data['ira_sep_simple'] ?? null; - $this->container['traditional_ira_sep_simple_or_roth_conversion_amount'] = $data['traditional_ira_sep_simple_or_roth_conversion_amount'] ?? null; - $this->container['other_amount'] = $data['other_amount'] ?? null; - $this->container['other_percentage'] = $data['other_percentage'] ?? null; - $this->container['total_distribution_percentage'] = $data['total_distribution_percentage'] ?? null; - $this->container['total_employee_contributions'] = $data['total_employee_contributions'] ?? null; - $this->container['amount_allocable_to_irr_within5_years'] = $data['amount_allocable_to_irr_within5_years'] ?? null; - $this->container['first_year_of_designated_roth_contribution'] = $data['first_year_of_designated_roth_contribution'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['date_of_payment'] = $data['date_of_payment'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getDistributionCodeAllowableValues(); - if (!is_null($this->container['distribution_code']) && !in_array($this->container['distribution_code'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'distribution_code', must be one of '%s'", - $this->container['distribution_code'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getSecondDistributionCodeAllowableValues(); - if (!is_null($this->container['second_distribution_code']) && !in_array($this->container['second_distribution_code'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'second_distribution_code', must be one of '%s'", - $this->container['second_distribution_code'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['tax_year'] === null) { - $invalidProperties[] = "'tax_year' can't be null"; - } - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets gross_distribution - * - * @return float|null - */ - public function getGrossDistribution() - { - return $this->container['gross_distribution']; - } - - /** - * Sets gross_distribution - * - * @param float|null $gross_distribution Gross distribution - * - * @return self - */ - public function setGrossDistribution($gross_distribution) - { - $this->container['gross_distribution'] = $gross_distribution; - - return $this; - } - - /** - * Gets taxable_amount - * - * @return float|null - */ - public function getTaxableAmount() - { - return $this->container['taxable_amount']; - } - - /** - * Sets taxable_amount - * - * @param float|null $taxable_amount Taxable amount - * - * @return self - */ - public function setTaxableAmount($taxable_amount) - { - $this->container['taxable_amount'] = $taxable_amount; - - return $this; - } - - /** - * Gets taxable_amount_not_determined - * - * @return bool|null - */ - public function getTaxableAmountNotDetermined() - { - return $this->container['taxable_amount_not_determined']; - } - - /** - * Sets taxable_amount_not_determined - * - * @param bool|null $taxable_amount_not_determined Taxable amount not determined - * - * @return self - */ - public function setTaxableAmountNotDetermined($taxable_amount_not_determined) - { - $this->container['taxable_amount_not_determined'] = $taxable_amount_not_determined; - - return $this; - } - - /** - * Gets total_distribution_determined - * - * @return bool|null - */ - public function getTotalDistributionDetermined() - { - return $this->container['total_distribution_determined']; - } - - /** - * Sets total_distribution_determined - * - * @param bool|null $total_distribution_determined Total distribution - * - * @return self - */ - public function setTotalDistributionDetermined($total_distribution_determined) - { - $this->container['total_distribution_determined'] = $total_distribution_determined; - - return $this; - } - - /** - * Gets capital_gain - * - * @return float|null - */ - public function getCapitalGain() - { - return $this->container['capital_gain']; - } - - /** - * Sets capital_gain - * - * @param float|null $capital_gain Capital gain (included in Box 2a) - * - * @return self - */ - public function setCapitalGain($capital_gain) - { - $this->container['capital_gain'] = $capital_gain; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets employee_contributions_or_designated_roth_or_insurance_premiums - * - * @return float|null - */ - public function getEmployeeContributionsOrDesignatedRothOrInsurancePremiums() - { - return $this->container['employee_contributions_or_designated_roth_or_insurance_premiums']; - } - - /** - * Sets employee_contributions_or_designated_roth_or_insurance_premiums - * - * @param float|null $employee_contributions_or_designated_roth_or_insurance_premiums Employee contributions/Designated Roth contributions or insurance premiums - * - * @return self - */ - public function setEmployeeContributionsOrDesignatedRothOrInsurancePremiums($employee_contributions_or_designated_roth_or_insurance_premiums) - { - $this->container['employee_contributions_or_designated_roth_or_insurance_premiums'] = $employee_contributions_or_designated_roth_or_insurance_premiums; - - return $this; - } - - /** - * Gets net_unrealized_appreciation_in_employer_securities - * - * @return float|null - */ - public function getNetUnrealizedAppreciationInEmployerSecurities() - { - return $this->container['net_unrealized_appreciation_in_employer_securities']; - } - - /** - * Sets net_unrealized_appreciation_in_employer_securities - * - * @param float|null $net_unrealized_appreciation_in_employer_securities Net unrealized appreciation in employer's securities - * - * @return self - */ - public function setNetUnrealizedAppreciationInEmployerSecurities($net_unrealized_appreciation_in_employer_securities) - { - $this->container['net_unrealized_appreciation_in_employer_securities'] = $net_unrealized_appreciation_in_employer_securities; - - return $this; - } - - /** - * Gets distribution_code - * - * @return string|null - */ - public function getDistributionCode() - { - return $this->container['distribution_code']; - } - - /** - * Sets distribution_code - * - * @param string|null $distribution_code Distribution code - * - * @return self - */ - public function setDistributionCode($distribution_code) - { - $allowedValues = $this->getDistributionCodeAllowableValues(); - if (!is_null($distribution_code) && !in_array($distribution_code, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'distribution_code', must be one of '%s'", - $distribution_code, - implode("', '", $allowedValues) - ) - ); - } - $this->container['distribution_code'] = $distribution_code; - - return $this; - } - - /** - * Gets second_distribution_code - * - * @return string|null - */ - public function getSecondDistributionCode() - { - return $this->container['second_distribution_code']; - } - - /** - * Sets second_distribution_code - * - * @param string|null $second_distribution_code Second distribution code - * - * @return self - */ - public function setSecondDistributionCode($second_distribution_code) - { - $allowedValues = $this->getSecondDistributionCodeAllowableValues(); - if (!is_null($second_distribution_code) && !in_array($second_distribution_code, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'second_distribution_code', must be one of '%s'", - $second_distribution_code, - implode("', '", $allowedValues) - ) - ); - } - $this->container['second_distribution_code'] = $second_distribution_code; - - return $this; - } - - /** - * Gets ira_sep_simple - * - * @return bool|null - */ - public function getIraSepSimple() - { - return $this->container['ira_sep_simple']; - } - - /** - * Sets ira_sep_simple - * - * @param bool|null $ira_sep_simple IRA/SEP/SIMPLE - * - * @return self - */ - public function setIraSepSimple($ira_sep_simple) - { - $this->container['ira_sep_simple'] = $ira_sep_simple; - - return $this; - } - - /** - * Gets traditional_ira_sep_simple_or_roth_conversion_amount - * - * @return float|null - */ - public function getTraditionalIraSepSimpleOrRothConversionAmount() - { - return $this->container['traditional_ira_sep_simple_or_roth_conversion_amount']; - } - - /** - * Sets traditional_ira_sep_simple_or_roth_conversion_amount - * - * @param float|null $traditional_ira_sep_simple_or_roth_conversion_amount Traditional IRA/SEP/SIMPLE or Roth conversion amount - * - * @return self - */ - public function setTraditionalIraSepSimpleOrRothConversionAmount($traditional_ira_sep_simple_or_roth_conversion_amount) - { - $this->container['traditional_ira_sep_simple_or_roth_conversion_amount'] = $traditional_ira_sep_simple_or_roth_conversion_amount; - - return $this; - } - - /** - * Gets other_amount - * - * @return float|null - */ - public function getOtherAmount() - { - return $this->container['other_amount']; - } - - /** - * Sets other_amount - * - * @param float|null $other_amount Other amount - * - * @return self - */ - public function setOtherAmount($other_amount) - { - $this->container['other_amount'] = $other_amount; - - return $this; - } - - /** - * Gets other_percentage - * - * @return string|null - */ - public function getOtherPercentage() - { - return $this->container['other_percentage']; - } - - /** - * Sets other_percentage - * - * @param string|null $other_percentage Other percentage - * - * @return self - */ - public function setOtherPercentage($other_percentage) - { - $this->container['other_percentage'] = $other_percentage; - - return $this; - } - - /** - * Gets total_distribution_percentage - * - * @return string|null - */ - public function getTotalDistributionPercentage() - { - return $this->container['total_distribution_percentage']; - } - - /** - * Sets total_distribution_percentage - * - * @param string|null $total_distribution_percentage Total distribution percentage - * - * @return self - */ - public function setTotalDistributionPercentage($total_distribution_percentage) - { - $this->container['total_distribution_percentage'] = $total_distribution_percentage; - - return $this; - } - - /** - * Gets total_employee_contributions - * - * @return float|null - */ - public function getTotalEmployeeContributions() - { - return $this->container['total_employee_contributions']; - } - - /** - * Sets total_employee_contributions - * - * @param float|null $total_employee_contributions Total employee contributions - * - * @return self - */ - public function setTotalEmployeeContributions($total_employee_contributions) - { - $this->container['total_employee_contributions'] = $total_employee_contributions; - - return $this; - } - - /** - * Gets amount_allocable_to_irr_within5_years - * - * @return float|null - */ - public function getAmountAllocableToIrrWithin5Years() - { - return $this->container['amount_allocable_to_irr_within5_years']; - } - - /** - * Sets amount_allocable_to_irr_within5_years - * - * @param float|null $amount_allocable_to_irr_within5_years Amount allocable to IRR within 5 years - * - * @return self - */ - public function setAmountAllocableToIrrWithin5Years($amount_allocable_to_irr_within5_years) - { - $this->container['amount_allocable_to_irr_within5_years'] = $amount_allocable_to_irr_within5_years; - - return $this; - } - - /** - * Gets first_year_of_designated_roth_contribution - * - * @return int|null - */ - public function getFirstYearOfDesignatedRothContribution() - { - return $this->container['first_year_of_designated_roth_contribution']; - } - - /** - * Sets first_year_of_designated_roth_contribution - * - * @param int|null $first_year_of_designated_roth_contribution First year of designated Roth contribution - * - * @return self - */ - public function setFirstYearOfDesignatedRothContribution($first_year_of_designated_roth_contribution) - { - $this->container['first_year_of_designated_roth_contribution'] = $first_year_of_designated_roth_contribution; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets date_of_payment - * - * @return \DateTime|null - */ - public function getDateOfPayment() - { - return $this->container['date_of_payment']; - } - - /** - * Sets date_of_payment - * - * @param \DateTime|null $date_of_payment Date of payment - * - * @return self - */ - public function setDateOfPayment($date_of_payment) - { - $this->container['date_of_payment'] = $date_of_payment; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1099RListItem., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1099RListItem., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1099RListItem., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099RListItemResponse.php b/lib/Model/A1099/V2/Form1099RListItemResponse.php deleted file mode 100644 index 8955438..0000000 --- a/lib/Model/A1099/V2/Form1099RListItemResponse.php +++ /dev/null @@ -1,2118 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099RListItemResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099RListItemResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099RListItemResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'gross_distributions' => 'float', - 'taxable_amount' => 'float', - 'taxable_amount_not_determined' => 'bool', - 'total_distribution_indicator' => 'bool', - 'capital_gain' => 'float', - 'fed_income_tax_withheld' => 'float', - 'employee_contributions' => 'float', - 'net_unrealized_appreciation' => 'float', - 'distribution_code_required' => 'string', - 'distribution_code_optional' => 'string', - 'ira_sep_simple_indicator' => 'bool', - 'total_ira_sep_simple_distribution' => 'float', - 'other' => 'float', - 'other_percent' => 'string', - 'percentage_total_distribution' => 'string', - 'total_employee_contributions' => 'float', - 'amount_allocable_to_irr' => 'float', - 'first_year_designated_roth_contrib' => 'string', - 'fatca_requirement_indicator' => 'bool', - 'date_of_payment' => 'string', - 'id' => 'string', - 'type' => 'string', - 'issuer_id' => 'int', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'reference_id' => 'string', - 'email' => 'string', - 'tin_type' => 'string', - 'tin' => 'string', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'recipient_name' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'fatca_filing_requirement' => 'bool', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'gross_distributions' => 'double', - 'taxable_amount' => 'double', - 'taxable_amount_not_determined' => null, - 'total_distribution_indicator' => null, - 'capital_gain' => 'double', - 'fed_income_tax_withheld' => 'double', - 'employee_contributions' => 'double', - 'net_unrealized_appreciation' => 'double', - 'distribution_code_required' => null, - 'distribution_code_optional' => null, - 'ira_sep_simple_indicator' => null, - 'total_ira_sep_simple_distribution' => 'double', - 'other' => 'double', - 'other_percent' => null, - 'percentage_total_distribution' => null, - 'total_employee_contributions' => 'double', - 'amount_allocable_to_irr' => 'double', - 'first_year_designated_roth_contrib' => null, - 'fatca_requirement_indicator' => null, - 'date_of_payment' => null, - 'id' => null, - 'type' => null, - 'issuer_id' => 'int32', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, - 'e_delivery_status' => null, - 'reference_id' => null, - 'email' => null, - 'tin_type' => null, - 'tin' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'recipient_name' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'non_us_province' => null, - 'country_code' => null, - 'account_number' => null, - 'office_code' => null, - 'fatca_filing_requirement' => null, - 'validation_errors' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'gross_distributions' => 'grossDistributions', - 'taxable_amount' => 'taxableAmount', - 'taxable_amount_not_determined' => 'taxableAmountNotDetermined', - 'total_distribution_indicator' => 'totalDistributionIndicator', - 'capital_gain' => 'capitalGain', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', - 'employee_contributions' => 'employeeContributions', - 'net_unrealized_appreciation' => 'netUnrealizedAppreciation', - 'distribution_code_required' => 'distributionCodeRequired', - 'distribution_code_optional' => 'distributionCodeOptional', - 'ira_sep_simple_indicator' => 'iraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'totalIraSepSimpleDistribution', - 'other' => 'other', - 'other_percent' => 'otherPercent', - 'percentage_total_distribution' => 'percentageTotalDistribution', - 'total_employee_contributions' => 'totalEmployeeContributions', - 'amount_allocable_to_irr' => 'amountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'firstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'fatcaRequirementIndicator', - 'date_of_payment' => 'dateOfPayment', - 'id' => 'id', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'reference_id' => 'referenceId', - 'email' => 'email', - 'tin_type' => 'tinType', - 'tin' => 'tin', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'recipient_name' => 'recipientName', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'validation_errors' => 'validationErrors', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'gross_distributions' => 'setGrossDistributions', - 'taxable_amount' => 'setTaxableAmount', - 'taxable_amount_not_determined' => 'setTaxableAmountNotDetermined', - 'total_distribution_indicator' => 'setTotalDistributionIndicator', - 'capital_gain' => 'setCapitalGain', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', - 'employee_contributions' => 'setEmployeeContributions', - 'net_unrealized_appreciation' => 'setNetUnrealizedAppreciation', - 'distribution_code_required' => 'setDistributionCodeRequired', - 'distribution_code_optional' => 'setDistributionCodeOptional', - 'ira_sep_simple_indicator' => 'setIraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'setTotalIraSepSimpleDistribution', - 'other' => 'setOther', - 'other_percent' => 'setOtherPercent', - 'percentage_total_distribution' => 'setPercentageTotalDistribution', - 'total_employee_contributions' => 'setTotalEmployeeContributions', - 'amount_allocable_to_irr' => 'setAmountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'setFirstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'setFatcaRequirementIndicator', - 'date_of_payment' => 'setDateOfPayment', - 'id' => 'setId', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'tin_type' => 'setTinType', - 'tin' => 'setTin', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'recipient_name' => 'setRecipientName', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'validation_errors' => 'setValidationErrors', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'gross_distributions' => 'getGrossDistributions', - 'taxable_amount' => 'getTaxableAmount', - 'taxable_amount_not_determined' => 'getTaxableAmountNotDetermined', - 'total_distribution_indicator' => 'getTotalDistributionIndicator', - 'capital_gain' => 'getCapitalGain', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', - 'employee_contributions' => 'getEmployeeContributions', - 'net_unrealized_appreciation' => 'getNetUnrealizedAppreciation', - 'distribution_code_required' => 'getDistributionCodeRequired', - 'distribution_code_optional' => 'getDistributionCodeOptional', - 'ira_sep_simple_indicator' => 'getIraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'getTotalIraSepSimpleDistribution', - 'other' => 'getOther', - 'other_percent' => 'getOtherPercent', - 'percentage_total_distribution' => 'getPercentageTotalDistribution', - 'total_employee_contributions' => 'getTotalEmployeeContributions', - 'amount_allocable_to_irr' => 'getAmountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'getFirstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'getFatcaRequirementIndicator', - 'date_of_payment' => 'getDateOfPayment', - 'id' => 'getId', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'tin_type' => 'getTinType', - 'tin' => 'getTin', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'recipient_name' => 'getRecipientName', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'validation_errors' => 'getValidationErrors', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['gross_distributions'] = $data['gross_distributions'] ?? null; - $this->container['taxable_amount'] = $data['taxable_amount'] ?? null; - $this->container['taxable_amount_not_determined'] = $data['taxable_amount_not_determined'] ?? null; - $this->container['total_distribution_indicator'] = $data['total_distribution_indicator'] ?? null; - $this->container['capital_gain'] = $data['capital_gain'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; - $this->container['employee_contributions'] = $data['employee_contributions'] ?? null; - $this->container['net_unrealized_appreciation'] = $data['net_unrealized_appreciation'] ?? null; - $this->container['distribution_code_required'] = $data['distribution_code_required'] ?? null; - $this->container['distribution_code_optional'] = $data['distribution_code_optional'] ?? null; - $this->container['ira_sep_simple_indicator'] = $data['ira_sep_simple_indicator'] ?? null; - $this->container['total_ira_sep_simple_distribution'] = $data['total_ira_sep_simple_distribution'] ?? null; - $this->container['other'] = $data['other'] ?? null; - $this->container['other_percent'] = $data['other_percent'] ?? null; - $this->container['percentage_total_distribution'] = $data['percentage_total_distribution'] ?? null; - $this->container['total_employee_contributions'] = $data['total_employee_contributions'] ?? null; - $this->container['amount_allocable_to_irr'] = $data['amount_allocable_to_irr'] ?? null; - $this->container['first_year_designated_roth_contrib'] = $data['first_year_designated_roth_contrib'] ?? null; - $this->container['fatca_requirement_indicator'] = $data['fatca_requirement_indicator'] ?? null; - $this->container['date_of_payment'] = $data['date_of_payment'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } - if ((mb_strlen($this->container['id']) < 1)) { - $invalidProperties[] = "invalid value for 'id', the character length must be bigger than or equal to 1."; - } - - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ((mb_strlen($this->container['type']) < 1)) { - $invalidProperties[] = "invalid value for 'type', the character length must be bigger than or equal to 1."; - } - - if ($this->container['issuer_id'] === null) { - $invalidProperties[] = "'issuer_id' can't be null"; - } - if ($this->container['federal_efile'] === null) { - $invalidProperties[] = "'federal_efile' can't be null"; - } - if ($this->container['state_efile'] === null) { - $invalidProperties[] = "'state_efile' can't be null"; - } - if ($this->container['postal_mail'] === null) { - $invalidProperties[] = "'postal_mail' can't be null"; - } - if ($this->container['tin_match'] === null) { - $invalidProperties[] = "'tin_match' can't be null"; - } - if ($this->container['address_verification'] === null) { - $invalidProperties[] = "'address_verification' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets gross_distributions - * - * @return float|null - */ - public function getGrossDistributions() - { - return $this->container['gross_distributions']; - } - - /** - * Sets gross_distributions - * - * @param float|null $gross_distributions Gross distribution - * - * @return self - */ - public function setGrossDistributions($gross_distributions) - { - $this->container['gross_distributions'] = $gross_distributions; - - return $this; - } - - /** - * Gets taxable_amount - * - * @return float|null - */ - public function getTaxableAmount() - { - return $this->container['taxable_amount']; - } - - /** - * Sets taxable_amount - * - * @param float|null $taxable_amount Taxable amount - * - * @return self - */ - public function setTaxableAmount($taxable_amount) - { - $this->container['taxable_amount'] = $taxable_amount; - - return $this; - } - - /** - * Gets taxable_amount_not_determined - * - * @return bool|null - */ - public function getTaxableAmountNotDetermined() - { - return $this->container['taxable_amount_not_determined']; - } - - /** - * Sets taxable_amount_not_determined - * - * @param bool|null $taxable_amount_not_determined Taxable amount not determined - * - * @return self - */ - public function setTaxableAmountNotDetermined($taxable_amount_not_determined) - { - $this->container['taxable_amount_not_determined'] = $taxable_amount_not_determined; - - return $this; - } - - /** - * Gets total_distribution_indicator - * - * @return bool|null - */ - public function getTotalDistributionIndicator() - { - return $this->container['total_distribution_indicator']; - } - - /** - * Sets total_distribution_indicator - * - * @param bool|null $total_distribution_indicator Total distribution - * - * @return self - */ - public function setTotalDistributionIndicator($total_distribution_indicator) - { - $this->container['total_distribution_indicator'] = $total_distribution_indicator; - - return $this; - } - - /** - * Gets capital_gain - * - * @return float|null - */ - public function getCapitalGain() - { - return $this->container['capital_gain']; - } - - /** - * Sets capital_gain - * - * @param float|null $capital_gain Capital gain (included in Box 2a) - * - * @return self - */ - public function setCapitalGain($capital_gain) - { - $this->container['capital_gain'] = $capital_gain; - - return $this; - } - - /** - * Gets fed_income_tax_withheld - * - * @return float|null - */ - public function getFedIncomeTaxWithheld() - { - return $this->container['fed_income_tax_withheld']; - } - - /** - * Sets fed_income_tax_withheld - * - * @param float|null $fed_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) - { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; - - return $this; - } - - /** - * Gets employee_contributions - * - * @return float|null - */ - public function getEmployeeContributions() - { - return $this->container['employee_contributions']; - } - - /** - * Sets employee_contributions - * - * @param float|null $employee_contributions Employee contributions/Designated Roth contributions or insurance premiums - * - * @return self - */ - public function setEmployeeContributions($employee_contributions) - { - $this->container['employee_contributions'] = $employee_contributions; - - return $this; - } - - /** - * Gets net_unrealized_appreciation - * - * @return float|null - */ - public function getNetUnrealizedAppreciation() - { - return $this->container['net_unrealized_appreciation']; - } - - /** - * Sets net_unrealized_appreciation - * - * @param float|null $net_unrealized_appreciation Net unrealized appreciation in employer's securities - * - * @return self - */ - public function setNetUnrealizedAppreciation($net_unrealized_appreciation) - { - $this->container['net_unrealized_appreciation'] = $net_unrealized_appreciation; - - return $this; - } - - /** - * Gets distribution_code_required - * - * @return string|null - */ - public function getDistributionCodeRequired() - { - return $this->container['distribution_code_required']; - } - - /** - * Sets distribution_code_required - * - * @param string|null $distribution_code_required Distribution code - * - * @return self - */ - public function setDistributionCodeRequired($distribution_code_required) - { - $this->container['distribution_code_required'] = $distribution_code_required; - - return $this; - } - - /** - * Gets distribution_code_optional - * - * @return string|null - */ - public function getDistributionCodeOptional() - { - return $this->container['distribution_code_optional']; - } - - /** - * Sets distribution_code_optional - * - * @param string|null $distribution_code_optional Second distribution code - * - * @return self - */ - public function setDistributionCodeOptional($distribution_code_optional) - { - $this->container['distribution_code_optional'] = $distribution_code_optional; - - return $this; - } - - /** - * Gets ira_sep_simple_indicator - * - * @return bool|null - */ - public function getIraSepSimpleIndicator() - { - return $this->container['ira_sep_simple_indicator']; - } - - /** - * Sets ira_sep_simple_indicator - * - * @param bool|null $ira_sep_simple_indicator IRA/SEP/SIMPLE - * - * @return self - */ - public function setIraSepSimpleIndicator($ira_sep_simple_indicator) - { - $this->container['ira_sep_simple_indicator'] = $ira_sep_simple_indicator; - - return $this; - } - - /** - * Gets total_ira_sep_simple_distribution - * - * @return float|null - */ - public function getTotalIraSepSimpleDistribution() - { - return $this->container['total_ira_sep_simple_distribution']; - } - - /** - * Sets total_ira_sep_simple_distribution - * - * @param float|null $total_ira_sep_simple_distribution Traditional IRA/SEP/SIMPLE or Roth conversion amount - * - * @return self - */ - public function setTotalIraSepSimpleDistribution($total_ira_sep_simple_distribution) - { - $this->container['total_ira_sep_simple_distribution'] = $total_ira_sep_simple_distribution; - - return $this; - } - - /** - * Gets other - * - * @return float|null - */ - public function getOther() - { - return $this->container['other']; - } - - /** - * Sets other - * - * @param float|null $other Other amount - * - * @return self - */ - public function setOther($other) - { - $this->container['other'] = $other; - - return $this; - } - - /** - * Gets other_percent - * - * @return string|null - */ - public function getOtherPercent() - { - return $this->container['other_percent']; - } - - /** - * Sets other_percent - * - * @param string|null $other_percent Other percentage - * - * @return self - */ - public function setOtherPercent($other_percent) - { - $this->container['other_percent'] = $other_percent; - - return $this; - } - - /** - * Gets percentage_total_distribution - * - * @return string|null - */ - public function getPercentageTotalDistribution() - { - return $this->container['percentage_total_distribution']; - } - - /** - * Sets percentage_total_distribution - * - * @param string|null $percentage_total_distribution Total distribution percentage - * - * @return self - */ - public function setPercentageTotalDistribution($percentage_total_distribution) - { - $this->container['percentage_total_distribution'] = $percentage_total_distribution; - - return $this; - } - - /** - * Gets total_employee_contributions - * - * @return float|null - */ - public function getTotalEmployeeContributions() - { - return $this->container['total_employee_contributions']; - } - - /** - * Sets total_employee_contributions - * - * @param float|null $total_employee_contributions Total employee contributions - * - * @return self - */ - public function setTotalEmployeeContributions($total_employee_contributions) - { - $this->container['total_employee_contributions'] = $total_employee_contributions; - - return $this; - } - - /** - * Gets amount_allocable_to_irr - * - * @return float|null - */ - public function getAmountAllocableToIrr() - { - return $this->container['amount_allocable_to_irr']; - } - - /** - * Sets amount_allocable_to_irr - * - * @param float|null $amount_allocable_to_irr Amount allocable to IRR within 5 years - * - * @return self - */ - public function setAmountAllocableToIrr($amount_allocable_to_irr) - { - $this->container['amount_allocable_to_irr'] = $amount_allocable_to_irr; - - return $this; - } - - /** - * Gets first_year_designated_roth_contrib - * - * @return string|null - */ - public function getFirstYearDesignatedRothContrib() - { - return $this->container['first_year_designated_roth_contrib']; - } - - /** - * Sets first_year_designated_roth_contrib - * - * @param string|null $first_year_designated_roth_contrib First year of designated Roth contribution - * - * @return self - */ - public function setFirstYearDesignatedRothContrib($first_year_designated_roth_contrib) - { - $this->container['first_year_designated_roth_contrib'] = $first_year_designated_roth_contrib; - - return $this; - } - - /** - * Gets fatca_requirement_indicator - * - * @return bool|null - */ - public function getFatcaRequirementIndicator() - { - return $this->container['fatca_requirement_indicator']; - } - - /** - * Sets fatca_requirement_indicator - * - * @param bool|null $fatca_requirement_indicator FATCA filing requirement - * - * @return self - */ - public function setFatcaRequirementIndicator($fatca_requirement_indicator) - { - $this->container['fatca_requirement_indicator'] = $fatca_requirement_indicator; - - return $this; - } - - /** - * Gets date_of_payment - * - * @return string|null - */ - public function getDateOfPayment() - { - return $this->container['date_of_payment']; - } - - /** - * Sets date_of_payment - * - * @param string|null $date_of_payment Date of payment - * - * @return self - */ - public function setDateOfPayment($date_of_payment) - { - $this->container['date_of_payment'] = $date_of_payment; - - return $this; - } - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID of the form - * - * @return self - */ - public function setId($id) - { - - if ((mb_strlen($id) < 1)) { - throw new \InvalidArgumentException('invalid length for $id when calling Form1099RListItemResponse., must be bigger than or equal to 1.'); - } - - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * - * @return self - */ - public function setType($type) - { - - if ((mb_strlen($type) < 1)) { - throw new \InvalidArgumentException('invalid length for $type when calling Form1099RListItemResponse., must be bigger than or equal to 1.'); - } - - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return int - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param int $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets federal_efile - * - * @return bool - */ - public function getFederalEfile() - { - return $this->container['federal_efile']; - } - - /** - * Sets federal_efile - * - * @param bool $federal_efile Boolean indicating that federal e-filing has been scheduled for this form - * - * @return self - */ - public function setFederalEfile($federal_efile) - { - $this->container['federal_efile'] = $federal_efile; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status Federal e-file status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets state_efile - * - * @return bool - */ - public function getStateEfile() - { - return $this->container['state_efile']; - } - - /** - * Sets state_efile - * - * @param bool $state_efile Boolean indicating that state e-filing has been scheduled for this form - * - * @return self - */ - public function setStateEfile($state_efile) - { - $this->container['state_efile'] = $state_efile; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status State e-file status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool $postal_mail Boolean indicating that postal mailing to the recipient has been scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status Postal mail to recipient status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool $tin_match Boolean indicating that TIN Matching has been scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status TIN Match status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool $address_verification Boolean indicating that address verification has been scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status Address verification status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status EDelivery status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets tin - * - * @return string|null - */ - public function getTin() - { - return $this->container['tin']; - } - - /** - * Sets tin - * - * @param string|null $tin Recipient Tax ID Number - * - * @return self - */ - public function setTin($tin) - { - $this->container['tin'] = $tin; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second Tin Notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address Address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city City - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account Number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office Code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors Validation errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Creation time - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Update time - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099RRequest.php b/lib/Model/A1099/V2/Form1099RRequest.php deleted file mode 100644 index c5869f9..0000000 --- a/lib/Model/A1099/V2/Form1099RRequest.php +++ /dev/null @@ -1,1772 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099RRequest Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099RRequest implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099RRequest'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'gross_distribution' => 'float', - 'taxable_amount' => 'float', - 'taxable_amount_not_determined' => 'bool', - 'total_distribution_determined' => 'bool', - 'capital_gain' => 'float', - 'federal_income_tax_withheld' => 'float', - 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'float', - 'net_unrealized_appreciation_in_employer_securities' => 'float', - 'distribution_code' => 'string', - 'second_distribution_code' => 'string', - 'ira_sep_simple' => 'bool', - 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'float', - 'other_amount' => 'float', - 'other_percentage' => 'string', - 'total_distribution_percentage' => 'string', - 'total_employee_contributions' => 'float', - 'amount_allocable_to_irr_within5_years' => 'float', - 'first_year_of_designated_roth_contribution' => 'string', - 'fatca_filing_requirement' => 'bool', - 'date_of_payment' => '\DateTime', - 'type' => 'string', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'gross_distribution' => 'double', - 'taxable_amount' => 'double', - 'taxable_amount_not_determined' => null, - 'total_distribution_determined' => null, - 'capital_gain' => 'double', - 'federal_income_tax_withheld' => 'double', - 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'double', - 'net_unrealized_appreciation_in_employer_securities' => 'double', - 'distribution_code' => null, - 'second_distribution_code' => null, - 'ira_sep_simple' => null, - 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'double', - 'other_amount' => 'double', - 'other_percentage' => null, - 'total_distribution_percentage' => null, - 'total_employee_contributions' => 'double', - 'amount_allocable_to_irr_within5_years' => 'double', - 'first_year_of_designated_roth_contribution' => null, - 'fatca_filing_requirement' => null, - 'date_of_payment' => 'date-time', - 'type' => null, - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'gross_distribution' => 'grossDistribution', - 'taxable_amount' => 'taxableAmount', - 'taxable_amount_not_determined' => 'taxableAmountNotDetermined', - 'total_distribution_determined' => 'totalDistributionDetermined', - 'capital_gain' => 'capitalGain', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'employeeContributionsOrDesignatedRothOrInsurancePremiums', - 'net_unrealized_appreciation_in_employer_securities' => 'netUnrealizedAppreciationInEmployerSecurities', - 'distribution_code' => 'distributionCode', - 'second_distribution_code' => 'secondDistributionCode', - 'ira_sep_simple' => 'iraSepSimple', - 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'traditionalIraSepSimpleOrRothConversionAmount', - 'other_amount' => 'otherAmount', - 'other_percentage' => 'otherPercentage', - 'total_distribution_percentage' => 'totalDistributionPercentage', - 'total_employee_contributions' => 'totalEmployeeContributions', - 'amount_allocable_to_irr_within5_years' => 'amountAllocableToIrrWithin5Years', - 'first_year_of_designated_roth_contribution' => 'firstYearOfDesignatedRothContribution', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'date_of_payment' => 'dateOfPayment', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'gross_distribution' => 'setGrossDistribution', - 'taxable_amount' => 'setTaxableAmount', - 'taxable_amount_not_determined' => 'setTaxableAmountNotDetermined', - 'total_distribution_determined' => 'setTotalDistributionDetermined', - 'capital_gain' => 'setCapitalGain', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'setEmployeeContributionsOrDesignatedRothOrInsurancePremiums', - 'net_unrealized_appreciation_in_employer_securities' => 'setNetUnrealizedAppreciationInEmployerSecurities', - 'distribution_code' => 'setDistributionCode', - 'second_distribution_code' => 'setSecondDistributionCode', - 'ira_sep_simple' => 'setIraSepSimple', - 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'setTraditionalIraSepSimpleOrRothConversionAmount', - 'other_amount' => 'setOtherAmount', - 'other_percentage' => 'setOtherPercentage', - 'total_distribution_percentage' => 'setTotalDistributionPercentage', - 'total_employee_contributions' => 'setTotalEmployeeContributions', - 'amount_allocable_to_irr_within5_years' => 'setAmountAllocableToIrrWithin5Years', - 'first_year_of_designated_roth_contribution' => 'setFirstYearOfDesignatedRothContribution', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'date_of_payment' => 'setDateOfPayment', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'gross_distribution' => 'getGrossDistribution', - 'taxable_amount' => 'getTaxableAmount', - 'taxable_amount_not_determined' => 'getTaxableAmountNotDetermined', - 'total_distribution_determined' => 'getTotalDistributionDetermined', - 'capital_gain' => 'getCapitalGain', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'getEmployeeContributionsOrDesignatedRothOrInsurancePremiums', - 'net_unrealized_appreciation_in_employer_securities' => 'getNetUnrealizedAppreciationInEmployerSecurities', - 'distribution_code' => 'getDistributionCode', - 'second_distribution_code' => 'getSecondDistributionCode', - 'ira_sep_simple' => 'getIraSepSimple', - 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'getTraditionalIraSepSimpleOrRothConversionAmount', - 'other_amount' => 'getOtherAmount', - 'other_percentage' => 'getOtherPercentage', - 'total_distribution_percentage' => 'getTotalDistributionPercentage', - 'total_employee_contributions' => 'getTotalEmployeeContributions', - 'amount_allocable_to_irr_within5_years' => 'getAmountAllocableToIrrWithin5Years', - 'first_year_of_designated_roth_contribution' => 'getFirstYearOfDesignatedRothContribution', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'date_of_payment' => 'getDateOfPayment', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['gross_distribution'] = $data['gross_distribution'] ?? null; - $this->container['taxable_amount'] = $data['taxable_amount'] ?? null; - $this->container['taxable_amount_not_determined'] = $data['taxable_amount_not_determined'] ?? null; - $this->container['total_distribution_determined'] = $data['total_distribution_determined'] ?? null; - $this->container['capital_gain'] = $data['capital_gain'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['employee_contributions_or_designated_roth_or_insurance_premiums'] = $data['employee_contributions_or_designated_roth_or_insurance_premiums'] ?? null; - $this->container['net_unrealized_appreciation_in_employer_securities'] = $data['net_unrealized_appreciation_in_employer_securities'] ?? null; - $this->container['distribution_code'] = $data['distribution_code'] ?? null; - $this->container['second_distribution_code'] = $data['second_distribution_code'] ?? null; - $this->container['ira_sep_simple'] = $data['ira_sep_simple'] ?? null; - $this->container['traditional_ira_sep_simple_or_roth_conversion_amount'] = $data['traditional_ira_sep_simple_or_roth_conversion_amount'] ?? null; - $this->container['other_amount'] = $data['other_amount'] ?? null; - $this->container['other_percentage'] = $data['other_percentage'] ?? null; - $this->container['total_distribution_percentage'] = $data['total_distribution_percentage'] ?? null; - $this->container['total_employee_contributions'] = $data['total_employee_contributions'] ?? null; - $this->container['amount_allocable_to_irr_within5_years'] = $data['amount_allocable_to_irr_within5_years'] ?? null; - $this->container['first_year_of_designated_roth_contribution'] = $data['first_year_of_designated_roth_contribution'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['date_of_payment'] = $data['date_of_payment'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets gross_distribution - * - * @return float|null - */ - public function getGrossDistribution() - { - return $this->container['gross_distribution']; - } - - /** - * Sets gross_distribution - * - * @param float|null $gross_distribution Gross distribution - * - * @return self - */ - public function setGrossDistribution($gross_distribution) - { - $this->container['gross_distribution'] = $gross_distribution; - - return $this; - } - - /** - * Gets taxable_amount - * - * @return float|null - */ - public function getTaxableAmount() - { - return $this->container['taxable_amount']; - } - - /** - * Sets taxable_amount - * - * @param float|null $taxable_amount Taxable amount - * - * @return self - */ - public function setTaxableAmount($taxable_amount) - { - $this->container['taxable_amount'] = $taxable_amount; - - return $this; - } - - /** - * Gets taxable_amount_not_determined - * - * @return bool|null - */ - public function getTaxableAmountNotDetermined() - { - return $this->container['taxable_amount_not_determined']; - } - - /** - * Sets taxable_amount_not_determined - * - * @param bool|null $taxable_amount_not_determined Taxable amount not determined - * - * @return self - */ - public function setTaxableAmountNotDetermined($taxable_amount_not_determined) - { - $this->container['taxable_amount_not_determined'] = $taxable_amount_not_determined; - - return $this; - } - - /** - * Gets total_distribution_determined - * - * @return bool|null - */ - public function getTotalDistributionDetermined() - { - return $this->container['total_distribution_determined']; - } - - /** - * Sets total_distribution_determined - * - * @param bool|null $total_distribution_determined Total distribution - * - * @return self - */ - public function setTotalDistributionDetermined($total_distribution_determined) - { - $this->container['total_distribution_determined'] = $total_distribution_determined; - - return $this; - } - - /** - * Gets capital_gain - * - * @return float|null - */ - public function getCapitalGain() - { - return $this->container['capital_gain']; - } - - /** - * Sets capital_gain - * - * @param float|null $capital_gain Capital gain (included in Box 2a) - * - * @return self - */ - public function setCapitalGain($capital_gain) - { - $this->container['capital_gain'] = $capital_gain; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets employee_contributions_or_designated_roth_or_insurance_premiums - * - * @return float|null - */ - public function getEmployeeContributionsOrDesignatedRothOrInsurancePremiums() - { - return $this->container['employee_contributions_or_designated_roth_or_insurance_premiums']; - } - - /** - * Sets employee_contributions_or_designated_roth_or_insurance_premiums - * - * @param float|null $employee_contributions_or_designated_roth_or_insurance_premiums Employee contributions/Designated Roth contributions or insurance premiums - * - * @return self - */ - public function setEmployeeContributionsOrDesignatedRothOrInsurancePremiums($employee_contributions_or_designated_roth_or_insurance_premiums) - { - $this->container['employee_contributions_or_designated_roth_or_insurance_premiums'] = $employee_contributions_or_designated_roth_or_insurance_premiums; - - return $this; - } - - /** - * Gets net_unrealized_appreciation_in_employer_securities - * - * @return float|null - */ - public function getNetUnrealizedAppreciationInEmployerSecurities() - { - return $this->container['net_unrealized_appreciation_in_employer_securities']; - } - - /** - * Sets net_unrealized_appreciation_in_employer_securities - * - * @param float|null $net_unrealized_appreciation_in_employer_securities Net unrealized appreciation in employer's securities - * - * @return self - */ - public function setNetUnrealizedAppreciationInEmployerSecurities($net_unrealized_appreciation_in_employer_securities) - { - $this->container['net_unrealized_appreciation_in_employer_securities'] = $net_unrealized_appreciation_in_employer_securities; - - return $this; - } - - /** - * Gets distribution_code - * - * @return string|null - */ - public function getDistributionCode() - { - return $this->container['distribution_code']; - } - - /** - * Sets distribution_code - * - * @param string|null $distribution_code Distribution code - * - * @return self - */ - public function setDistributionCode($distribution_code) - { - $this->container['distribution_code'] = $distribution_code; - - return $this; - } - - /** - * Gets second_distribution_code - * - * @return string|null - */ - public function getSecondDistributionCode() - { - return $this->container['second_distribution_code']; - } - - /** - * Sets second_distribution_code - * - * @param string|null $second_distribution_code Second distribution code - * - * @return self - */ - public function setSecondDistributionCode($second_distribution_code) - { - $this->container['second_distribution_code'] = $second_distribution_code; - - return $this; - } - - /** - * Gets ira_sep_simple - * - * @return bool|null - */ - public function getIraSepSimple() - { - return $this->container['ira_sep_simple']; - } - - /** - * Sets ira_sep_simple - * - * @param bool|null $ira_sep_simple IRA/SEP/SIMPLE - * - * @return self - */ - public function setIraSepSimple($ira_sep_simple) - { - $this->container['ira_sep_simple'] = $ira_sep_simple; - - return $this; - } - - /** - * Gets traditional_ira_sep_simple_or_roth_conversion_amount - * - * @return float|null - */ - public function getTraditionalIraSepSimpleOrRothConversionAmount() - { - return $this->container['traditional_ira_sep_simple_or_roth_conversion_amount']; - } - - /** - * Sets traditional_ira_sep_simple_or_roth_conversion_amount - * - * @param float|null $traditional_ira_sep_simple_or_roth_conversion_amount Traditional IRA/SEP/SIMPLE or Roth conversion amount - * - * @return self - */ - public function setTraditionalIraSepSimpleOrRothConversionAmount($traditional_ira_sep_simple_or_roth_conversion_amount) - { - $this->container['traditional_ira_sep_simple_or_roth_conversion_amount'] = $traditional_ira_sep_simple_or_roth_conversion_amount; - - return $this; - } - - /** - * Gets other_amount - * - * @return float|null - */ - public function getOtherAmount() - { - return $this->container['other_amount']; - } - - /** - * Sets other_amount - * - * @param float|null $other_amount Other amount - * - * @return self - */ - public function setOtherAmount($other_amount) - { - $this->container['other_amount'] = $other_amount; - - return $this; - } - - /** - * Gets other_percentage - * - * @return string|null - */ - public function getOtherPercentage() - { - return $this->container['other_percentage']; - } - - /** - * Sets other_percentage - * - * @param string|null $other_percentage Other percentage - * - * @return self - */ - public function setOtherPercentage($other_percentage) - { - $this->container['other_percentage'] = $other_percentage; - - return $this; - } - - /** - * Gets total_distribution_percentage - * - * @return string|null - */ - public function getTotalDistributionPercentage() - { - return $this->container['total_distribution_percentage']; - } - - /** - * Sets total_distribution_percentage - * - * @param string|null $total_distribution_percentage Total distribution percentage - * - * @return self - */ - public function setTotalDistributionPercentage($total_distribution_percentage) - { - $this->container['total_distribution_percentage'] = $total_distribution_percentage; - - return $this; - } - - /** - * Gets total_employee_contributions - * - * @return float|null - */ - public function getTotalEmployeeContributions() - { - return $this->container['total_employee_contributions']; - } - - /** - * Sets total_employee_contributions - * - * @param float|null $total_employee_contributions Total employee contributions - * - * @return self - */ - public function setTotalEmployeeContributions($total_employee_contributions) - { - $this->container['total_employee_contributions'] = $total_employee_contributions; - - return $this; - } - - /** - * Gets amount_allocable_to_irr_within5_years - * - * @return float|null - */ - public function getAmountAllocableToIrrWithin5Years() - { - return $this->container['amount_allocable_to_irr_within5_years']; - } - - /** - * Sets amount_allocable_to_irr_within5_years - * - * @param float|null $amount_allocable_to_irr_within5_years Amount allocable to IRR within 5 years - * - * @return self - */ - public function setAmountAllocableToIrrWithin5Years($amount_allocable_to_irr_within5_years) - { - $this->container['amount_allocable_to_irr_within5_years'] = $amount_allocable_to_irr_within5_years; - - return $this; - } - - /** - * Gets first_year_of_designated_roth_contribution - * - * @return string|null - */ - public function getFirstYearOfDesignatedRothContribution() - { - return $this->container['first_year_of_designated_roth_contribution']; - } - - /** - * Sets first_year_of_designated_roth_contribution - * - * @param string|null $first_year_of_designated_roth_contribution First year of designated Roth contribution - * - * @return self - */ - public function setFirstYearOfDesignatedRothContribution($first_year_of_designated_roth_contribution) - { - $this->container['first_year_of_designated_roth_contribution'] = $first_year_of_designated_roth_contribution; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets date_of_payment - * - * @return \DateTime|null - */ - public function getDateOfPayment() - { - return $this->container['date_of_payment']; - } - - /** - * Sets date_of_payment - * - * @param \DateTime|null $date_of_payment Date of payment - * - * @return self - */ - public function setDateOfPayment($date_of_payment) - { - $this->container['date_of_payment'] = $date_of_payment; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling Form1099RRequest., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling Form1099RRequest., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling Form1099RRequest., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Form1099StatusDetail.php b/lib/Model/A1099/V2/Form1099StatusDetail.php index 9f31f72..ed2e2ce 100644 --- a/lib/Model/A1099/V2/Form1099StatusDetail.php +++ b/lib/Model/A1099/V2/Form1099StatusDetail.php @@ -20,7 +20,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) * * @category Avalara client libraries * @package Avalara\SDK\API\A1099\V2 diff --git a/lib/Model/A1099/V2/Form1099StatusDetailResponse.php b/lib/Model/A1099/V2/Form1099StatusDetailResponse.php deleted file mode 100644 index f91f6c1..0000000 --- a/lib/Model/A1099/V2/Form1099StatusDetailResponse.php +++ /dev/null @@ -1,362 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Form1099StatusDetailResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Form1099StatusDetailResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Form1099StatusDetailResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'time' => 'string', - 'status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'time' => null, - 'status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'time' => 'time', - 'status' => 'status' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'time' => 'setTime', - 'status' => 'setStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'time' => 'getTime', - 'status' => 'getStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['time'] = $data['time'] ?? null; - $this->container['status'] = $data['status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets time - * - * @return string|null - */ - public function getTime() - { - return $this->container['time']; - } - - /** - * Sets time - * - * @param string|null $time The date the form is scheduled for or the time the status last changed - * - * @return self - */ - public function setTime($time) - { - $this->container['time'] = $time; - - return $this; - } - - /** - * Gets status - * - * @return string|null - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string|null $status The status of the form. Will be one of: * unsent * scheduled * sent * corrected_scheduled * accepted * corrected * corrected_accepted * held * pending * delivered * bad_verify * bad_verify_limit * bounced * verified * incomplete * failed * unchanged * unknown - * - * @return self - */ - public function setStatus($status) - { - $this->container['status'] = $status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/FormRequestBase.php b/lib/Model/A1099/V2/FormRequestBase.php deleted file mode 100644 index 4a2955c..0000000 --- a/lib/Model/A1099/V2/FormRequestBase.php +++ /dev/null @@ -1,1096 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * FormRequestBase Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class FormRequestBase implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'FormRequestBase'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling FormRequestBase., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling FormRequestBase., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling FormRequestBase., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/FormRequestCsvBase.php b/lib/Model/A1099/V2/FormRequestCsvBase.php deleted file mode 100644 index 063fbeb..0000000 --- a/lib/Model/A1099/V2/FormRequestCsvBase.php +++ /dev/null @@ -1,1090 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * FormRequestCsvBase Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class FormRequestCsvBase implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'FormRequestCsvBase'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_name' => 'string', - 'recipient_tin' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'recipient_email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'recipient_non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_name' => null, - 'recipient_tin' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'recipient_email' => null, - 'account_number' => null, - 'office_code' => null, - 'recipient_non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_name' => 'recipientName', - 'recipient_tin' => 'recipientTin', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'recipient_email' => 'recipientEmail', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'recipient_non_us_province' => 'recipientNonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_name' => 'setRecipientName', - 'recipient_tin' => 'setRecipientTin', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'recipient_email' => 'setRecipientEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'recipient_non_us_province' => 'setRecipientNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_name' => 'getRecipientName', - 'recipient_tin' => 'getRecipientTin', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'recipient_email' => 'getRecipientEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'recipient_non_us_province' => 'getRecipientNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['recipient_email'] = $data['recipient_email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['recipient_non_us_province'] = $data['recipient_non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id issuer_reference_id - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin issuer_tin - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year tax_year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id issuer_id - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id reference_id - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name recipient_name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin recipient_tin - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type tin_type - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name recipient_second_name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 address2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city city - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip zip - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets recipient_email - * - * @return string|null - */ - public function getRecipientEmail() - { - return $this->container['recipient_email']; - } - - /** - * Sets recipient_email - * - * @param string|null $recipient_email recipient_email - * - * @return self - */ - public function setRecipientEmail($recipient_email) - { - $this->container['recipient_email'] = $recipient_email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number account_number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code office_code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets recipient_non_us_province - * - * @return string|null - */ - public function getRecipientNonUsProvince() - { - return $this->container['recipient_non_us_province']; - } - - /** - * Sets recipient_non_us_province - * - * @param string|null $recipient_non_us_province recipient_non_us_province - * - * @return self - */ - public function setRecipientNonUsProvince($recipient_non_us_province) - { - $this->container['recipient_non_us_province'] = $recipient_non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code country_code - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file federal_e_file - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail postal_mail - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file state_e_file - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match tin_match - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification address_verification - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/FormRequestListItemBase.php b/lib/Model/A1099/V2/FormRequestListItemBase.php deleted file mode 100644 index 90875e9..0000000 --- a/lib/Model/A1099/V2/FormRequestListItemBase.php +++ /dev/null @@ -1,1189 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * FormRequestListItemBase Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class FormRequestListItemBase implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'FormRequestListItemBase'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['tax_year'] === null) { - $invalidProperties[] = "'tax_year' can't be null"; - } - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int $tax_year Tax year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling FormRequestListItemBase., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling FormRequestListItemBase., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling FormRequestListItemBase., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/FormResponseBase.php b/lib/Model/A1099/V2/FormResponseBase.php deleted file mode 100644 index a755691..0000000 --- a/lib/Model/A1099/V2/FormResponseBase.php +++ /dev/null @@ -1,1530 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * FormResponseBase Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class FormResponseBase implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'FormResponseBase'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'type' => 'string', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse', - 'tin_type' => 'string', - 'id' => 'string', - 'issuer_id' => 'string', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'reference_id' => 'string', - 'recipient_name' => 'string', - 'recipient_tin' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'type' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null, - 'tin_type' => null, - 'id' => null, - 'issuer_id' => null, - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'reference_id' => null, - 'recipient_name' => null, - 'recipient_tin' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'federal_efile_status' => null, - 'e_delivery_status' => null, - 'state_efile_status' => null, - 'postal_mail_status' => null, - 'tin_match_status' => null, - 'address_verification_status' => null, - 'validation_errors' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'tin_type' => 'tinType', - 'id' => 'id', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'reference_id' => 'referenceId', - 'recipient_name' => 'recipientName', - 'recipient_tin' => 'recipientTin', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'federal_efile_status' => 'federalEfileStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification_status' => 'addressVerificationStatus', - 'validation_errors' => 'validationErrors' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'tin_type' => 'setTinType', - 'id' => 'setId', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'reference_id' => 'setReferenceId', - 'recipient_name' => 'setRecipientName', - 'recipient_tin' => 'setRecipientTin', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'federal_efile_status' => 'setFederalEfileStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification_status' => 'setAddressVerificationStatus', - 'validation_errors' => 'setValidationErrors' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'tin_type' => 'getTinType', - 'id' => 'getId', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'reference_id' => 'getReferenceId', - 'recipient_name' => 'getRecipientName', - 'recipient_tin' => 'getRecipientTin', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'federal_efile_status' => 'getFederalEfileStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification_status' => 'getAddressVerificationStatus', - 'validation_errors' => 'getValidationErrors' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at created_at - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at updated_at - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type tin_type - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id issuer_id - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id issuer_reference_id - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin issuer_tin - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year tax_year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id reference_id - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name recipient_name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin recipient_tin - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name recipient_second_name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 address2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city city - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip zip - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email email - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number account_number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code office_code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province non_us_province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code country_code - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file federal_e_file - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail postal_mail - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file state_e_file - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match tin_match - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin no_tin - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice second_tin_notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification address_verification - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status federal_efile_status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status e_delivery_status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status state_efile_status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status postal_mail_status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status tin_match_status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status address_verification_status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors validation_errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/FormSingleRequestBase.php b/lib/Model/A1099/V2/FormSingleRequestBase.php deleted file mode 100644 index e11fda8..0000000 --- a/lib/Model/A1099/V2/FormSingleRequestBase.php +++ /dev/null @@ -1,1172 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * FormSingleRequestBase Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class FormSingleRequestBase implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'FormSingleRequestBase'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'type' => 'string', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'type' => null, - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling FormSingleRequestBase., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling FormSingleRequestBase., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling FormSingleRequestBase., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Get1099Form200Response.php b/lib/Model/A1099/V2/Get1099Form200Response.php index 9b683b5..ef42967 100644 --- a/lib/Model/A1099/V2/Get1099Form200Response.php +++ b/lib/Model/A1099/V2/Get1099Form200Response.php @@ -71,45 +71,7 @@ class Get1099Form200Response implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'type' => 'string', - 'issuer_id' => 'int', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'federal_efile' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile' => 'bool', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail' => 'bool', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification' => 'bool', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'reference_id' => 'string', - 'email' => 'string', 'tin_type' => 'string', - 'tin' => 'string', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'recipient_name' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'fatca_filing_requirement' => 'bool', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse', 'unique_form_id' => 'string', 'recipient_date_of_birth' => '\DateTime', 'recipient_giin' => 'string', @@ -131,28 +93,86 @@ class Get1099Form200Response implements ModelInterface, ArrayAccess, \JsonSerial 'tax_paid_agent' => 'float', 'chap3_status_code' => 'string', 'chap4_status_code' => 'string', - 'primary_withholding_agent' => '\Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentResponse', - 'intermediary_or_flow_through' => '\Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughResponse', + 'primary_withholding_agent' => '\Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgent', + 'intermediary_or_flow_through' => '\Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThrough', + 'type' => 'string', + 'id' => 'string', + 'issuer_id' => 'string', + 'issuer_reference_id' => 'string', + 'issuer_tin' => 'string', + 'tax_year' => 'int', + 'reference_id' => 'string', + 'tin' => 'string', + 'recipient_name' => 'string', + 'recipient_second_name' => 'string', + 'address' => 'string', + 'address2' => 'string', + 'city' => 'string', + 'state' => 'string', + 'zip' => 'string', + 'email' => 'string', + 'account_number' => 'string', + 'office_code' => 'string', + 'non_us_province' => 'string', + 'country_code' => 'string', + 'federal_efile_date' => '\DateTime', + 'postal_mail' => 'bool', + 'state_efile_date' => '\DateTime', + 'recipient_edelivery_date' => '\DateTime', + 'tin_match' => 'bool', + 'no_tin' => 'bool', + 'address_verification' => 'bool', + 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding', + 'second_tin_notice' => 'bool', + 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]', + 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\Form1099StatusDetail', + 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationError[]', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'employee_first_name' => 'string', + 'employee_middle_name' => 'string', + 'employee_last_name' => 'string', + 'employee_name_suffix' => 'string', + 'employee_date_of_birth' => '\DateTime', 'origin_of_health_coverage_code' => 'string', - 'covered_individuals' => '\Avalara\SDK\Model\A1099\V2\CoveredIndividualReferenceResponse[]', - 'total_ordinary_dividends' => 'string', - 'qualified_dividends' => 'string', - 'total_capital_gain_distributions' => 'string', - 'unrecaptured_section1250_gain' => 'string', - 'section1202_gain' => 'string', - 'collectibles_gain' => 'string', - 'section897_ordinary_dividends' => 'string', - 'section897_capital_gain' => 'string', - 'nondividend_distributions' => 'string', + 'covered_individuals' => '\Avalara\SDK\Model\A1099\V2\CoveredIndividual[]', + 'plan_start_month' => 'string', + 'employer_provided_si_coverage' => 'bool', + 'offer_and_coverages' => '\Avalara\SDK\Model\A1099\V2\OfferAndCoverage[]', + 'total_ordinary_dividends' => 'float', + 'qualified_dividends' => 'float', + 'total_capital_gain_distributions' => 'float', + 'unrecaptured_section1250_gain' => 'float', + 'section1202_gain' => 'float', + 'collectibles_gain' => 'float', + 'section897_ordinary_dividends' => 'float', + 'section897_capital_gain' => 'float', + 'nondividend_distributions' => 'float', 'federal_income_tax_withheld' => 'float', - 'section199_a_dividends' => 'string', - 'investment_expenses' => 'string', - 'foreign_tax_paid' => 'string', + 'section199_a_dividends' => 'float', + 'investment_expenses' => 'float', + 'foreign_tax_paid' => 'float', 'foreign_country_or_us_possession' => 'string', - 'cash_liquidation_distributions' => 'string', - 'noncash_liquidation_distributions' => 'string', - 'exempt_interest_dividends' => 'string', - 'specified_private_activity_bond_interest_dividends' => 'string', + 'cash_liquidation_distributions' => 'float', + 'noncash_liquidation_distributions' => 'float', + 'exempt_interest_dividends' => 'float', + 'specified_private_activity_bond_interest_dividends' => 'float', + 'fatca_filing_requirement' => 'bool', + 'interest_income' => 'float', + 'early_withdrawal_penalty' => 'float', + 'us_savings_bonds_interest' => 'float', + 'foreign_country' => 'string', + 'tax_exempt_interest' => 'float', + 'specified_private_activity_bond_interest' => 'float', + 'market_discount' => 'float', + 'bond_premium' => 'float', + 'bond_premium_on_treasury_obligations' => 'float', + 'bond_premium_on_tax_exempt_bond' => 'float', + 'tax_exempt_bond_cusip_number' => 'string', 'filer_type' => 'string', 'payment_type' => 'string', 'payment_settlement_entity_name_phone_number' => 'string', @@ -168,44 +188,42 @@ class Get1099Form200Response implements ModelInterface, ArrayAccess, \JsonSerial 'june' => 'float', 'july' => 'float', 'august' => 'float', - 'sept' => 'float', + 'september' => 'float', 'october' => 'float', 'november' => 'float', 'december' => 'float', 'rents' => 'float', 'royalties' => 'float', 'other_income' => 'float', - 'fed_income_tax_withheld' => 'float', 'fishing_boat_proceeds' => 'float', 'medical_and_health_care_payments' => 'float', - 'substitute_payments' => 'float', 'direct_sales_indicator' => 'bool', + 'substitute_payments' => 'float', 'crop_insurance_proceeds' => 'float', - 'excess_golden_parachute_payments' => 'float', 'gross_proceeds_paid_to_attorney' => 'float', 'fish_purchased_for_resale' => 'float', 'section409_a_deferrals' => 'float', + 'excess_golden_parachute_payments' => 'float', 'nonqualified_deferred_compensation' => 'float', 'nonemployee_compensation' => 'float', - 'gross_distributions' => 'float', + 'gross_distribution' => 'float', 'taxable_amount' => 'float', 'taxable_amount_not_determined' => 'bool', - 'total_distribution_indicator' => 'bool', + 'total_distribution_determined' => 'bool', 'capital_gain' => 'float', - 'employee_contributions' => 'float', - 'net_unrealized_appreciation' => 'float', - 'distribution_code_required' => 'string', - 'distribution_code_optional' => 'string', - 'ira_sep_simple_indicator' => 'bool', - 'total_ira_sep_simple_distribution' => 'float', - 'other' => 'float', - 'other_percent' => 'string', - 'percentage_total_distribution' => 'string', + 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'float', + 'net_unrealized_appreciation_in_employer_securities' => 'float', + 'distribution_code' => 'string', + 'second_distribution_code' => 'string', + 'ira_sep_simple' => 'bool', + 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'float', + 'other_amount' => 'float', + 'other_percentage' => 'string', + 'total_distribution_percentage' => 'string', 'total_employee_contributions' => 'float', - 'amount_allocable_to_irr' => 'float', - 'first_year_designated_roth_contrib' => 'string', - 'fatca_requirement_indicator' => 'bool', - 'date_of_payment' => 'string' + 'amount_allocable_to_irr_within5_years' => 'float', + 'first_year_of_designated_roth_contribution' => 'string', + 'date_of_payment' => '\DateTime' ]; /** @@ -216,47 +234,9 @@ class Get1099Form200Response implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'type' => null, - 'issuer_id' => 'int32', - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'federal_efile' => null, - 'federal_efile_status' => null, - 'state_efile' => null, - 'state_efile_status' => null, - 'postal_mail' => null, - 'postal_mail_status' => null, - 'tin_match' => null, - 'tin_match_status' => null, - 'address_verification' => null, - 'address_verification_status' => null, - 'e_delivery_status' => null, - 'reference_id' => null, - 'email' => null, 'tin_type' => null, - 'tin' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'recipient_name' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'non_us_province' => null, - 'country_code' => null, - 'account_number' => null, - 'office_code' => null, - 'fatca_filing_requirement' => null, - 'validation_errors' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null, 'unique_form_id' => null, - 'recipient_date_of_birth' => 'date-time', + 'recipient_date_of_birth' => 'date', 'recipient_giin' => null, 'recipient_foreign_tin' => null, 'lob_code' => null, @@ -278,26 +258,84 @@ class Get1099Form200Response implements ModelInterface, ArrayAccess, \JsonSerial 'chap4_status_code' => null, 'primary_withholding_agent' => null, 'intermediary_or_flow_through' => null, + 'type' => null, + 'id' => null, + 'issuer_id' => null, + 'issuer_reference_id' => null, + 'issuer_tin' => null, + 'tax_year' => 'int32', + 'reference_id' => null, + 'tin' => null, + 'recipient_name' => null, + 'recipient_second_name' => null, + 'address' => null, + 'address2' => null, + 'city' => null, + 'state' => null, + 'zip' => null, + 'email' => null, + 'account_number' => null, + 'office_code' => null, + 'non_us_province' => null, + 'country_code' => null, + 'federal_efile_date' => 'date', + 'postal_mail' => null, + 'state_efile_date' => 'date', + 'recipient_edelivery_date' => 'date', + 'tin_match' => null, + 'no_tin' => null, + 'address_verification' => null, + 'state_and_local_withholding' => null, + 'second_tin_notice' => null, + 'federal_efile_status' => null, + 'state_efile_status' => null, + 'postal_mail_status' => null, + 'tin_match_status' => null, + 'address_verification_status' => null, + 'e_delivery_status' => null, + 'validation_errors' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time', + 'employee_first_name' => null, + 'employee_middle_name' => null, + 'employee_last_name' => null, + 'employee_name_suffix' => null, + 'employee_date_of_birth' => 'date', 'origin_of_health_coverage_code' => null, 'covered_individuals' => null, - 'total_ordinary_dividends' => null, - 'qualified_dividends' => null, - 'total_capital_gain_distributions' => null, - 'unrecaptured_section1250_gain' => null, - 'section1202_gain' => null, - 'collectibles_gain' => null, - 'section897_ordinary_dividends' => null, - 'section897_capital_gain' => null, - 'nondividend_distributions' => null, + 'plan_start_month' => null, + 'employer_provided_si_coverage' => null, + 'offer_and_coverages' => null, + 'total_ordinary_dividends' => 'double', + 'qualified_dividends' => 'double', + 'total_capital_gain_distributions' => 'double', + 'unrecaptured_section1250_gain' => 'double', + 'section1202_gain' => 'double', + 'collectibles_gain' => 'double', + 'section897_ordinary_dividends' => 'double', + 'section897_capital_gain' => 'double', + 'nondividend_distributions' => 'double', 'federal_income_tax_withheld' => 'double', - 'section199_a_dividends' => null, - 'investment_expenses' => null, - 'foreign_tax_paid' => null, + 'section199_a_dividends' => 'double', + 'investment_expenses' => 'double', + 'foreign_tax_paid' => 'double', 'foreign_country_or_us_possession' => null, - 'cash_liquidation_distributions' => null, - 'noncash_liquidation_distributions' => null, - 'exempt_interest_dividends' => null, - 'specified_private_activity_bond_interest_dividends' => null, + 'cash_liquidation_distributions' => 'double', + 'noncash_liquidation_distributions' => 'double', + 'exempt_interest_dividends' => 'double', + 'specified_private_activity_bond_interest_dividends' => 'double', + 'fatca_filing_requirement' => null, + 'interest_income' => 'double', + 'early_withdrawal_penalty' => 'double', + 'us_savings_bonds_interest' => 'double', + 'foreign_country' => null, + 'tax_exempt_interest' => 'double', + 'specified_private_activity_bond_interest' => 'double', + 'market_discount' => 'double', + 'bond_premium' => 'double', + 'bond_premium_on_treasury_obligations' => 'double', + 'bond_premium_on_tax_exempt_bond' => 'double', + 'tax_exempt_bond_cusip_number' => null, 'filer_type' => null, 'payment_type' => null, 'payment_settlement_entity_name_phone_number' => null, @@ -313,44 +351,42 @@ class Get1099Form200Response implements ModelInterface, ArrayAccess, \JsonSerial 'june' => 'double', 'july' => 'double', 'august' => 'double', - 'sept' => 'double', + 'september' => 'double', 'october' => 'double', 'november' => 'double', 'december' => 'double', 'rents' => 'double', 'royalties' => 'double', 'other_income' => 'double', - 'fed_income_tax_withheld' => 'double', 'fishing_boat_proceeds' => 'double', 'medical_and_health_care_payments' => 'double', - 'substitute_payments' => 'double', 'direct_sales_indicator' => null, + 'substitute_payments' => 'double', 'crop_insurance_proceeds' => 'double', - 'excess_golden_parachute_payments' => 'double', 'gross_proceeds_paid_to_attorney' => 'double', 'fish_purchased_for_resale' => 'double', 'section409_a_deferrals' => 'double', + 'excess_golden_parachute_payments' => 'double', 'nonqualified_deferred_compensation' => 'double', 'nonemployee_compensation' => 'double', - 'gross_distributions' => 'double', + 'gross_distribution' => 'double', 'taxable_amount' => 'double', 'taxable_amount_not_determined' => null, - 'total_distribution_indicator' => null, + 'total_distribution_determined' => null, 'capital_gain' => 'double', - 'employee_contributions' => 'double', - 'net_unrealized_appreciation' => 'double', - 'distribution_code_required' => null, - 'distribution_code_optional' => null, - 'ira_sep_simple_indicator' => null, - 'total_ira_sep_simple_distribution' => 'double', - 'other' => 'double', - 'other_percent' => null, - 'percentage_total_distribution' => null, + 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'double', + 'net_unrealized_appreciation_in_employer_securities' => 'double', + 'distribution_code' => null, + 'second_distribution_code' => null, + 'ira_sep_simple' => null, + 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'double', + 'other_amount' => 'double', + 'other_percentage' => null, + 'total_distribution_percentage' => null, 'total_employee_contributions' => 'double', - 'amount_allocable_to_irr' => 'double', - 'first_year_designated_roth_contrib' => null, - 'fatca_requirement_indicator' => null, - 'date_of_payment' => null + 'amount_allocable_to_irr_within5_years' => 'double', + 'first_year_of_designated_roth_contribution' => null, + 'date_of_payment' => 'date' ]; /** @@ -380,45 +416,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'federal_efile' => 'federalEfile', - 'federal_efile_status' => 'federalEfileStatus', - 'state_efile' => 'stateEfile', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail' => 'postalMail', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match' => 'tinMatch', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification' => 'addressVerification', - 'address_verification_status' => 'addressVerificationStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'reference_id' => 'referenceId', - 'email' => 'email', 'tin_type' => 'tinType', - 'tin' => 'tin', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'recipient_name' => 'recipientName', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'validation_errors' => 'validationErrors', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding', 'unique_form_id' => 'uniqueFormId', 'recipient_date_of_birth' => 'recipientDateOfBirth', 'recipient_giin' => 'recipientGiin', @@ -442,8 +440,54 @@ public static function openAPIFormats() 'chap4_status_code' => 'chap4StatusCode', 'primary_withholding_agent' => 'primaryWithholdingAgent', 'intermediary_or_flow_through' => 'intermediaryOrFlowThrough', + 'type' => 'type', + 'id' => 'id', + 'issuer_id' => 'issuerId', + 'issuer_reference_id' => 'issuerReferenceId', + 'issuer_tin' => 'issuerTin', + 'tax_year' => 'taxYear', + 'reference_id' => 'referenceId', + 'tin' => 'tin', + 'recipient_name' => 'recipientName', + 'recipient_second_name' => 'recipientSecondName', + 'address' => 'address', + 'address2' => 'address2', + 'city' => 'city', + 'state' => 'state', + 'zip' => 'zip', + 'email' => 'email', + 'account_number' => 'accountNumber', + 'office_code' => 'officeCode', + 'non_us_province' => 'nonUsProvince', + 'country_code' => 'countryCode', + 'federal_efile_date' => 'federalEfileDate', + 'postal_mail' => 'postalMail', + 'state_efile_date' => 'stateEfileDate', + 'recipient_edelivery_date' => 'recipientEdeliveryDate', + 'tin_match' => 'tinMatch', + 'no_tin' => 'noTin', + 'address_verification' => 'addressVerification', + 'state_and_local_withholding' => 'stateAndLocalWithholding', + 'second_tin_notice' => 'secondTinNotice', + 'federal_efile_status' => 'federalEfileStatus', + 'state_efile_status' => 'stateEfileStatus', + 'postal_mail_status' => 'postalMailStatus', + 'tin_match_status' => 'tinMatchStatus', + 'address_verification_status' => 'addressVerificationStatus', + 'e_delivery_status' => 'eDeliveryStatus', + 'validation_errors' => 'validationErrors', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', + 'employee_first_name' => 'employeeFirstName', + 'employee_middle_name' => 'employeeMiddleName', + 'employee_last_name' => 'employeeLastName', + 'employee_name_suffix' => 'employeeNameSuffix', + 'employee_date_of_birth' => 'employeeDateOfBirth', 'origin_of_health_coverage_code' => 'originOfHealthCoverageCode', 'covered_individuals' => 'coveredIndividuals', + 'plan_start_month' => 'planStartMonth', + 'employer_provided_si_coverage' => 'employerProvidedSiCoverage', + 'offer_and_coverages' => 'offerAndCoverages', 'total_ordinary_dividends' => 'totalOrdinaryDividends', 'qualified_dividends' => 'qualifiedDividends', 'total_capital_gain_distributions' => 'totalCapitalGainDistributions', @@ -462,6 +506,18 @@ public static function openAPIFormats() 'noncash_liquidation_distributions' => 'noncashLiquidationDistributions', 'exempt_interest_dividends' => 'exemptInterestDividends', 'specified_private_activity_bond_interest_dividends' => 'specifiedPrivateActivityBondInterestDividends', + 'fatca_filing_requirement' => 'fatcaFilingRequirement', + 'interest_income' => 'interestIncome', + 'early_withdrawal_penalty' => 'earlyWithdrawalPenalty', + 'us_savings_bonds_interest' => 'usSavingsBondsInterest', + 'foreign_country' => 'foreignCountry', + 'tax_exempt_interest' => 'taxExemptInterest', + 'specified_private_activity_bond_interest' => 'specifiedPrivateActivityBondInterest', + 'market_discount' => 'marketDiscount', + 'bond_premium' => 'bondPremium', + 'bond_premium_on_treasury_obligations' => 'bondPremiumOnTreasuryObligations', + 'bond_premium_on_tax_exempt_bond' => 'bondPremiumOnTaxExemptBond', + 'tax_exempt_bond_cusip_number' => 'taxExemptBondCusipNumber', 'filer_type' => 'filerType', 'payment_type' => 'paymentType', 'payment_settlement_entity_name_phone_number' => 'paymentSettlementEntityNamePhoneNumber', @@ -477,43 +533,41 @@ public static function openAPIFormats() 'june' => 'june', 'july' => 'july', 'august' => 'august', - 'sept' => 'sept', + 'september' => 'september', 'october' => 'october', 'november' => 'november', 'december' => 'december', 'rents' => 'rents', 'royalties' => 'royalties', 'other_income' => 'otherIncome', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', 'fishing_boat_proceeds' => 'fishingBoatProceeds', 'medical_and_health_care_payments' => 'medicalAndHealthCarePayments', - 'substitute_payments' => 'substitutePayments', 'direct_sales_indicator' => 'directSalesIndicator', + 'substitute_payments' => 'substitutePayments', 'crop_insurance_proceeds' => 'cropInsuranceProceeds', - 'excess_golden_parachute_payments' => 'excessGoldenParachutePayments', 'gross_proceeds_paid_to_attorney' => 'grossProceedsPaidToAttorney', 'fish_purchased_for_resale' => 'fishPurchasedForResale', 'section409_a_deferrals' => 'section409ADeferrals', + 'excess_golden_parachute_payments' => 'excessGoldenParachutePayments', 'nonqualified_deferred_compensation' => 'nonqualifiedDeferredCompensation', 'nonemployee_compensation' => 'nonemployeeCompensation', - 'gross_distributions' => 'grossDistributions', + 'gross_distribution' => 'grossDistribution', 'taxable_amount' => 'taxableAmount', 'taxable_amount_not_determined' => 'taxableAmountNotDetermined', - 'total_distribution_indicator' => 'totalDistributionIndicator', + 'total_distribution_determined' => 'totalDistributionDetermined', 'capital_gain' => 'capitalGain', - 'employee_contributions' => 'employeeContributions', - 'net_unrealized_appreciation' => 'netUnrealizedAppreciation', - 'distribution_code_required' => 'distributionCodeRequired', - 'distribution_code_optional' => 'distributionCodeOptional', - 'ira_sep_simple_indicator' => 'iraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'totalIraSepSimpleDistribution', - 'other' => 'other', - 'other_percent' => 'otherPercent', - 'percentage_total_distribution' => 'percentageTotalDistribution', + 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'employeeContributionsOrDesignatedRothOrInsurancePremiums', + 'net_unrealized_appreciation_in_employer_securities' => 'netUnrealizedAppreciationInEmployerSecurities', + 'distribution_code' => 'distributionCode', + 'second_distribution_code' => 'secondDistributionCode', + 'ira_sep_simple' => 'iraSepSimple', + 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'traditionalIraSepSimpleOrRothConversionAmount', + 'other_amount' => 'otherAmount', + 'other_percentage' => 'otherPercentage', + 'total_distribution_percentage' => 'totalDistributionPercentage', 'total_employee_contributions' => 'totalEmployeeContributions', - 'amount_allocable_to_irr' => 'amountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'firstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'fatcaRequirementIndicator', + 'amount_allocable_to_irr_within5_years' => 'amountAllocableToIrrWithin5Years', + 'first_year_of_designated_roth_contribution' => 'firstYearOfDesignatedRothContribution', 'date_of_payment' => 'dateOfPayment' ]; @@ -523,45 +577,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'federal_efile' => 'setFederalEfile', - 'federal_efile_status' => 'setFederalEfileStatus', - 'state_efile' => 'setStateEfile', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail' => 'setPostalMail', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match' => 'setTinMatch', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification' => 'setAddressVerification', - 'address_verification_status' => 'setAddressVerificationStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', 'tin_type' => 'setTinType', - 'tin' => 'setTin', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'recipient_name' => 'setRecipientName', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'validation_errors' => 'setValidationErrors', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', 'unique_form_id' => 'setUniqueFormId', 'recipient_date_of_birth' => 'setRecipientDateOfBirth', 'recipient_giin' => 'setRecipientGiin', @@ -585,18 +601,64 @@ public static function openAPIFormats() 'chap4_status_code' => 'setChap4StatusCode', 'primary_withholding_agent' => 'setPrimaryWithholdingAgent', 'intermediary_or_flow_through' => 'setIntermediaryOrFlowThrough', - 'origin_of_health_coverage_code' => 'setOriginOfHealthCoverageCode', - 'covered_individuals' => 'setCoveredIndividuals', - 'total_ordinary_dividends' => 'setTotalOrdinaryDividends', - 'qualified_dividends' => 'setQualifiedDividends', - 'total_capital_gain_distributions' => 'setTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'setUnrecapturedSection1250Gain', - 'section1202_gain' => 'setSection1202Gain', - 'collectibles_gain' => 'setCollectiblesGain', - 'section897_ordinary_dividends' => 'setSection897OrdinaryDividends', - 'section897_capital_gain' => 'setSection897CapitalGain', - 'nondividend_distributions' => 'setNondividendDistributions', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', + 'type' => 'setType', + 'id' => 'setId', + 'issuer_id' => 'setIssuerId', + 'issuer_reference_id' => 'setIssuerReferenceId', + 'issuer_tin' => 'setIssuerTin', + 'tax_year' => 'setTaxYear', + 'reference_id' => 'setReferenceId', + 'tin' => 'setTin', + 'recipient_name' => 'setRecipientName', + 'recipient_second_name' => 'setRecipientSecondName', + 'address' => 'setAddress', + 'address2' => 'setAddress2', + 'city' => 'setCity', + 'state' => 'setState', + 'zip' => 'setZip', + 'email' => 'setEmail', + 'account_number' => 'setAccountNumber', + 'office_code' => 'setOfficeCode', + 'non_us_province' => 'setNonUsProvince', + 'country_code' => 'setCountryCode', + 'federal_efile_date' => 'setFederalEfileDate', + 'postal_mail' => 'setPostalMail', + 'state_efile_date' => 'setStateEfileDate', + 'recipient_edelivery_date' => 'setRecipientEdeliveryDate', + 'tin_match' => 'setTinMatch', + 'no_tin' => 'setNoTin', + 'address_verification' => 'setAddressVerification', + 'state_and_local_withholding' => 'setStateAndLocalWithholding', + 'second_tin_notice' => 'setSecondTinNotice', + 'federal_efile_status' => 'setFederalEfileStatus', + 'state_efile_status' => 'setStateEfileStatus', + 'postal_mail_status' => 'setPostalMailStatus', + 'tin_match_status' => 'setTinMatchStatus', + 'address_verification_status' => 'setAddressVerificationStatus', + 'e_delivery_status' => 'setEDeliveryStatus', + 'validation_errors' => 'setValidationErrors', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'employee_first_name' => 'setEmployeeFirstName', + 'employee_middle_name' => 'setEmployeeMiddleName', + 'employee_last_name' => 'setEmployeeLastName', + 'employee_name_suffix' => 'setEmployeeNameSuffix', + 'employee_date_of_birth' => 'setEmployeeDateOfBirth', + 'origin_of_health_coverage_code' => 'setOriginOfHealthCoverageCode', + 'covered_individuals' => 'setCoveredIndividuals', + 'plan_start_month' => 'setPlanStartMonth', + 'employer_provided_si_coverage' => 'setEmployerProvidedSiCoverage', + 'offer_and_coverages' => 'setOfferAndCoverages', + 'total_ordinary_dividends' => 'setTotalOrdinaryDividends', + 'qualified_dividends' => 'setQualifiedDividends', + 'total_capital_gain_distributions' => 'setTotalCapitalGainDistributions', + 'unrecaptured_section1250_gain' => 'setUnrecapturedSection1250Gain', + 'section1202_gain' => 'setSection1202Gain', + 'collectibles_gain' => 'setCollectiblesGain', + 'section897_ordinary_dividends' => 'setSection897OrdinaryDividends', + 'section897_capital_gain' => 'setSection897CapitalGain', + 'nondividend_distributions' => 'setNondividendDistributions', + 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', 'section199_a_dividends' => 'setSection199ADividends', 'investment_expenses' => 'setInvestmentExpenses', 'foreign_tax_paid' => 'setForeignTaxPaid', @@ -605,6 +667,18 @@ public static function openAPIFormats() 'noncash_liquidation_distributions' => 'setNoncashLiquidationDistributions', 'exempt_interest_dividends' => 'setExemptInterestDividends', 'specified_private_activity_bond_interest_dividends' => 'setSpecifiedPrivateActivityBondInterestDividends', + 'fatca_filing_requirement' => 'setFatcaFilingRequirement', + 'interest_income' => 'setInterestIncome', + 'early_withdrawal_penalty' => 'setEarlyWithdrawalPenalty', + 'us_savings_bonds_interest' => 'setUsSavingsBondsInterest', + 'foreign_country' => 'setForeignCountry', + 'tax_exempt_interest' => 'setTaxExemptInterest', + 'specified_private_activity_bond_interest' => 'setSpecifiedPrivateActivityBondInterest', + 'market_discount' => 'setMarketDiscount', + 'bond_premium' => 'setBondPremium', + 'bond_premium_on_treasury_obligations' => 'setBondPremiumOnTreasuryObligations', + 'bond_premium_on_tax_exempt_bond' => 'setBondPremiumOnTaxExemptBond', + 'tax_exempt_bond_cusip_number' => 'setTaxExemptBondCusipNumber', 'filer_type' => 'setFilerType', 'payment_type' => 'setPaymentType', 'payment_settlement_entity_name_phone_number' => 'setPaymentSettlementEntityNamePhoneNumber', @@ -620,43 +694,41 @@ public static function openAPIFormats() 'june' => 'setJune', 'july' => 'setJuly', 'august' => 'setAugust', - 'sept' => 'setSept', + 'september' => 'setSeptember', 'october' => 'setOctober', 'november' => 'setNovember', 'december' => 'setDecember', 'rents' => 'setRents', 'royalties' => 'setRoyalties', 'other_income' => 'setOtherIncome', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', 'fishing_boat_proceeds' => 'setFishingBoatProceeds', 'medical_and_health_care_payments' => 'setMedicalAndHealthCarePayments', - 'substitute_payments' => 'setSubstitutePayments', 'direct_sales_indicator' => 'setDirectSalesIndicator', + 'substitute_payments' => 'setSubstitutePayments', 'crop_insurance_proceeds' => 'setCropInsuranceProceeds', - 'excess_golden_parachute_payments' => 'setExcessGoldenParachutePayments', 'gross_proceeds_paid_to_attorney' => 'setGrossProceedsPaidToAttorney', 'fish_purchased_for_resale' => 'setFishPurchasedForResale', 'section409_a_deferrals' => 'setSection409ADeferrals', + 'excess_golden_parachute_payments' => 'setExcessGoldenParachutePayments', 'nonqualified_deferred_compensation' => 'setNonqualifiedDeferredCompensation', 'nonemployee_compensation' => 'setNonemployeeCompensation', - 'gross_distributions' => 'setGrossDistributions', + 'gross_distribution' => 'setGrossDistribution', 'taxable_amount' => 'setTaxableAmount', 'taxable_amount_not_determined' => 'setTaxableAmountNotDetermined', - 'total_distribution_indicator' => 'setTotalDistributionIndicator', + 'total_distribution_determined' => 'setTotalDistributionDetermined', 'capital_gain' => 'setCapitalGain', - 'employee_contributions' => 'setEmployeeContributions', - 'net_unrealized_appreciation' => 'setNetUnrealizedAppreciation', - 'distribution_code_required' => 'setDistributionCodeRequired', - 'distribution_code_optional' => 'setDistributionCodeOptional', - 'ira_sep_simple_indicator' => 'setIraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'setTotalIraSepSimpleDistribution', - 'other' => 'setOther', - 'other_percent' => 'setOtherPercent', - 'percentage_total_distribution' => 'setPercentageTotalDistribution', + 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'setEmployeeContributionsOrDesignatedRothOrInsurancePremiums', + 'net_unrealized_appreciation_in_employer_securities' => 'setNetUnrealizedAppreciationInEmployerSecurities', + 'distribution_code' => 'setDistributionCode', + 'second_distribution_code' => 'setSecondDistributionCode', + 'ira_sep_simple' => 'setIraSepSimple', + 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'setTraditionalIraSepSimpleOrRothConversionAmount', + 'other_amount' => 'setOtherAmount', + 'other_percentage' => 'setOtherPercentage', + 'total_distribution_percentage' => 'setTotalDistributionPercentage', 'total_employee_contributions' => 'setTotalEmployeeContributions', - 'amount_allocable_to_irr' => 'setAmountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'setFirstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'setFatcaRequirementIndicator', + 'amount_allocable_to_irr_within5_years' => 'setAmountAllocableToIrrWithin5Years', + 'first_year_of_designated_roth_contribution' => 'setFirstYearOfDesignatedRothContribution', 'date_of_payment' => 'setDateOfPayment' ]; @@ -666,45 +738,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'federal_efile' => 'getFederalEfile', - 'federal_efile_status' => 'getFederalEfileStatus', - 'state_efile' => 'getStateEfile', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail' => 'getPostalMail', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match' => 'getTinMatch', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification' => 'getAddressVerification', - 'address_verification_status' => 'getAddressVerificationStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', 'tin_type' => 'getTinType', - 'tin' => 'getTin', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'recipient_name' => 'getRecipientName', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'validation_errors' => 'getValidationErrors', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', 'unique_form_id' => 'getUniqueFormId', 'recipient_date_of_birth' => 'getRecipientDateOfBirth', 'recipient_giin' => 'getRecipientGiin', @@ -728,8 +762,54 @@ public static function openAPIFormats() 'chap4_status_code' => 'getChap4StatusCode', 'primary_withholding_agent' => 'getPrimaryWithholdingAgent', 'intermediary_or_flow_through' => 'getIntermediaryOrFlowThrough', + 'type' => 'getType', + 'id' => 'getId', + 'issuer_id' => 'getIssuerId', + 'issuer_reference_id' => 'getIssuerReferenceId', + 'issuer_tin' => 'getIssuerTin', + 'tax_year' => 'getTaxYear', + 'reference_id' => 'getReferenceId', + 'tin' => 'getTin', + 'recipient_name' => 'getRecipientName', + 'recipient_second_name' => 'getRecipientSecondName', + 'address' => 'getAddress', + 'address2' => 'getAddress2', + 'city' => 'getCity', + 'state' => 'getState', + 'zip' => 'getZip', + 'email' => 'getEmail', + 'account_number' => 'getAccountNumber', + 'office_code' => 'getOfficeCode', + 'non_us_province' => 'getNonUsProvince', + 'country_code' => 'getCountryCode', + 'federal_efile_date' => 'getFederalEfileDate', + 'postal_mail' => 'getPostalMail', + 'state_efile_date' => 'getStateEfileDate', + 'recipient_edelivery_date' => 'getRecipientEdeliveryDate', + 'tin_match' => 'getTinMatch', + 'no_tin' => 'getNoTin', + 'address_verification' => 'getAddressVerification', + 'state_and_local_withholding' => 'getStateAndLocalWithholding', + 'second_tin_notice' => 'getSecondTinNotice', + 'federal_efile_status' => 'getFederalEfileStatus', + 'state_efile_status' => 'getStateEfileStatus', + 'postal_mail_status' => 'getPostalMailStatus', + 'tin_match_status' => 'getTinMatchStatus', + 'address_verification_status' => 'getAddressVerificationStatus', + 'e_delivery_status' => 'getEDeliveryStatus', + 'validation_errors' => 'getValidationErrors', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'employee_first_name' => 'getEmployeeFirstName', + 'employee_middle_name' => 'getEmployeeMiddleName', + 'employee_last_name' => 'getEmployeeLastName', + 'employee_name_suffix' => 'getEmployeeNameSuffix', + 'employee_date_of_birth' => 'getEmployeeDateOfBirth', 'origin_of_health_coverage_code' => 'getOriginOfHealthCoverageCode', 'covered_individuals' => 'getCoveredIndividuals', + 'plan_start_month' => 'getPlanStartMonth', + 'employer_provided_si_coverage' => 'getEmployerProvidedSiCoverage', + 'offer_and_coverages' => 'getOfferAndCoverages', 'total_ordinary_dividends' => 'getTotalOrdinaryDividends', 'qualified_dividends' => 'getQualifiedDividends', 'total_capital_gain_distributions' => 'getTotalCapitalGainDistributions', @@ -748,6 +828,18 @@ public static function openAPIFormats() 'noncash_liquidation_distributions' => 'getNoncashLiquidationDistributions', 'exempt_interest_dividends' => 'getExemptInterestDividends', 'specified_private_activity_bond_interest_dividends' => 'getSpecifiedPrivateActivityBondInterestDividends', + 'fatca_filing_requirement' => 'getFatcaFilingRequirement', + 'interest_income' => 'getInterestIncome', + 'early_withdrawal_penalty' => 'getEarlyWithdrawalPenalty', + 'us_savings_bonds_interest' => 'getUsSavingsBondsInterest', + 'foreign_country' => 'getForeignCountry', + 'tax_exempt_interest' => 'getTaxExemptInterest', + 'specified_private_activity_bond_interest' => 'getSpecifiedPrivateActivityBondInterest', + 'market_discount' => 'getMarketDiscount', + 'bond_premium' => 'getBondPremium', + 'bond_premium_on_treasury_obligations' => 'getBondPremiumOnTreasuryObligations', + 'bond_premium_on_tax_exempt_bond' => 'getBondPremiumOnTaxExemptBond', + 'tax_exempt_bond_cusip_number' => 'getTaxExemptBondCusipNumber', 'filer_type' => 'getFilerType', 'payment_type' => 'getPaymentType', 'payment_settlement_entity_name_phone_number' => 'getPaymentSettlementEntityNamePhoneNumber', @@ -763,43 +855,41 @@ public static function openAPIFormats() 'june' => 'getJune', 'july' => 'getJuly', 'august' => 'getAugust', - 'sept' => 'getSept', + 'september' => 'getSeptember', 'october' => 'getOctober', 'november' => 'getNovember', 'december' => 'getDecember', 'rents' => 'getRents', 'royalties' => 'getRoyalties', 'other_income' => 'getOtherIncome', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', 'fishing_boat_proceeds' => 'getFishingBoatProceeds', 'medical_and_health_care_payments' => 'getMedicalAndHealthCarePayments', - 'substitute_payments' => 'getSubstitutePayments', 'direct_sales_indicator' => 'getDirectSalesIndicator', + 'substitute_payments' => 'getSubstitutePayments', 'crop_insurance_proceeds' => 'getCropInsuranceProceeds', - 'excess_golden_parachute_payments' => 'getExcessGoldenParachutePayments', 'gross_proceeds_paid_to_attorney' => 'getGrossProceedsPaidToAttorney', 'fish_purchased_for_resale' => 'getFishPurchasedForResale', 'section409_a_deferrals' => 'getSection409ADeferrals', + 'excess_golden_parachute_payments' => 'getExcessGoldenParachutePayments', 'nonqualified_deferred_compensation' => 'getNonqualifiedDeferredCompensation', 'nonemployee_compensation' => 'getNonemployeeCompensation', - 'gross_distributions' => 'getGrossDistributions', + 'gross_distribution' => 'getGrossDistribution', 'taxable_amount' => 'getTaxableAmount', 'taxable_amount_not_determined' => 'getTaxableAmountNotDetermined', - 'total_distribution_indicator' => 'getTotalDistributionIndicator', + 'total_distribution_determined' => 'getTotalDistributionDetermined', 'capital_gain' => 'getCapitalGain', - 'employee_contributions' => 'getEmployeeContributions', - 'net_unrealized_appreciation' => 'getNetUnrealizedAppreciation', - 'distribution_code_required' => 'getDistributionCodeRequired', - 'distribution_code_optional' => 'getDistributionCodeOptional', - 'ira_sep_simple_indicator' => 'getIraSepSimpleIndicator', - 'total_ira_sep_simple_distribution' => 'getTotalIraSepSimpleDistribution', - 'other' => 'getOther', - 'other_percent' => 'getOtherPercent', - 'percentage_total_distribution' => 'getPercentageTotalDistribution', + 'employee_contributions_or_designated_roth_or_insurance_premiums' => 'getEmployeeContributionsOrDesignatedRothOrInsurancePremiums', + 'net_unrealized_appreciation_in_employer_securities' => 'getNetUnrealizedAppreciationInEmployerSecurities', + 'distribution_code' => 'getDistributionCode', + 'second_distribution_code' => 'getSecondDistributionCode', + 'ira_sep_simple' => 'getIraSepSimple', + 'traditional_ira_sep_simple_or_roth_conversion_amount' => 'getTraditionalIraSepSimpleOrRothConversionAmount', + 'other_amount' => 'getOtherAmount', + 'other_percentage' => 'getOtherPercentage', + 'total_distribution_percentage' => 'getTotalDistributionPercentage', 'total_employee_contributions' => 'getTotalEmployeeContributions', - 'amount_allocable_to_irr' => 'getAmountAllocableToIrr', - 'first_year_designated_roth_contrib' => 'getFirstYearDesignatedRothContrib', - 'fatca_requirement_indicator' => 'getFatcaRequirementIndicator', + 'amount_allocable_to_irr_within5_years' => 'getAmountAllocableToIrrWithin5Years', + 'first_year_of_designated_roth_contribution' => 'getFirstYearOfDesignatedRothContribution', 'date_of_payment' => 'getDateOfPayment' ]; @@ -844,12 +934,616 @@ public function getModelName() return self::$openAPIModelName; } + const TIN_TYPE__EMPTY = 'Empty'; + const TIN_TYPE_EIN = 'EIN'; + const TIN_TYPE_SSN = 'SSN'; + const TIN_TYPE_ITIN = 'ITIN'; + const TIN_TYPE_ATIN = 'ATIN'; + const LOB_CODE__01 = '01'; + const LOB_CODE__02 = '02'; + const LOB_CODE__03 = '03'; + const LOB_CODE__04 = '04'; + const LOB_CODE__05 = '05'; + const LOB_CODE__06 = '06'; + const LOB_CODE__07 = '07'; + const LOB_CODE__08 = '08'; + const LOB_CODE__09 = '09'; + const LOB_CODE__10 = '10'; + const LOB_CODE__11 = '11'; + const LOB_CODE__12 = '12'; + const INCOME_CODE__01 = '01'; + const INCOME_CODE__02 = '02'; + const INCOME_CODE__03 = '03'; + const INCOME_CODE__04 = '04'; + const INCOME_CODE__05 = '05'; + const INCOME_CODE__22 = '22'; + const INCOME_CODE__29 = '29'; + const INCOME_CODE__30 = '30'; + const INCOME_CODE__31 = '31'; + const INCOME_CODE__33 = '33'; + const INCOME_CODE__51 = '51'; + const INCOME_CODE__54 = '54'; + const INCOME_CODE__06 = '06'; + const INCOME_CODE__07 = '07'; + const INCOME_CODE__08 = '08'; + const INCOME_CODE__34 = '34'; + const INCOME_CODE__40 = '40'; + const INCOME_CODE__52 = '52'; + const INCOME_CODE__53 = '53'; + const INCOME_CODE__56 = '56'; + const INCOME_CODE__09 = '09'; + const INCOME_CODE__10 = '10'; + const INCOME_CODE__11 = '11'; + const INCOME_CODE__12 = '12'; + const INCOME_CODE__13 = '13'; + const INCOME_CODE__14 = '14'; + const INCOME_CODE__15 = '15'; + const INCOME_CODE__16 = '16'; + const INCOME_CODE__17 = '17'; + const INCOME_CODE__18 = '18'; + const INCOME_CODE__19 = '19'; + const INCOME_CODE__20 = '20'; + const INCOME_CODE__23 = '23'; + const INCOME_CODE__24 = '24'; + const INCOME_CODE__25 = '25'; + const INCOME_CODE__26 = '26'; + const INCOME_CODE__27 = '27'; + const INCOME_CODE__28 = '28'; + const INCOME_CODE__32 = '32'; + const INCOME_CODE__35 = '35'; + const INCOME_CODE__36 = '36'; + const INCOME_CODE__37 = '37'; + const INCOME_CODE__38 = '38'; + const INCOME_CODE__39 = '39'; + const INCOME_CODE__41 = '41'; + const INCOME_CODE__42 = '42'; + const INCOME_CODE__43 = '43'; + const INCOME_CODE__44 = '44'; + const INCOME_CODE__50 = '50'; + const INCOME_CODE__55 = '55'; + const INCOME_CODE__57 = '57'; + const INCOME_CODE__58 = '58'; + const WITHHOLDING_INDICATOR__3 = '3'; + const WITHHOLDING_INDICATOR__4 = '4'; + const EXEMPTION_CODE_CHAP3__00 = '00'; + const EXEMPTION_CODE_CHAP3__01 = '01'; + const EXEMPTION_CODE_CHAP3__02 = '02'; + const EXEMPTION_CODE_CHAP3__03 = '03'; + const EXEMPTION_CODE_CHAP3__04 = '04'; + const EXEMPTION_CODE_CHAP3__05 = '05'; + const EXEMPTION_CODE_CHAP3__06 = '06'; + const EXEMPTION_CODE_CHAP3__07 = '07'; + const EXEMPTION_CODE_CHAP3__08 = '08'; + const EXEMPTION_CODE_CHAP3__09 = '09'; + const EXEMPTION_CODE_CHAP3__10 = '10'; + const EXEMPTION_CODE_CHAP3__11 = '11'; + const EXEMPTION_CODE_CHAP3__12 = '12'; + const EXEMPTION_CODE_CHAP3__22 = '22'; + const EXEMPTION_CODE_CHAP3__23 = '23'; + const EXEMPTION_CODE_CHAP3__24 = '24'; + const EXEMPTION_CODE_CHAP4__00 = '00'; + const EXEMPTION_CODE_CHAP4__13 = '13'; + const EXEMPTION_CODE_CHAP4__14 = '14'; + const EXEMPTION_CODE_CHAP4__15 = '15'; + const EXEMPTION_CODE_CHAP4__16 = '16'; + const EXEMPTION_CODE_CHAP4__17 = '17'; + const EXEMPTION_CODE_CHAP4__18 = '18'; + const EXEMPTION_CODE_CHAP4__19 = '19'; + const EXEMPTION_CODE_CHAP4__20 = '20'; + const EXEMPTION_CODE_CHAP4__21 = '21'; + const TAX_RATE_CHAP3__00_00 = '00.00'; + const TAX_RATE_CHAP3__02_00 = '02.00'; + const TAX_RATE_CHAP3__04_00 = '04.00'; + const TAX_RATE_CHAP3__04_90 = '04.90'; + const TAX_RATE_CHAP3__04_95 = '04.95'; + const TAX_RATE_CHAP3__05_00 = '05.00'; + const TAX_RATE_CHAP3__07_00 = '07.00'; + const TAX_RATE_CHAP3__08_00 = '08.00'; + const TAX_RATE_CHAP3__10_00 = '10.00'; + const TAX_RATE_CHAP3__12_00 = '12.00'; + const TAX_RATE_CHAP3__12_50 = '12.50'; + const TAX_RATE_CHAP3__14_00 = '14.00'; + const TAX_RATE_CHAP3__15_00 = '15.00'; + const TAX_RATE_CHAP3__17_50 = '17.50'; + const TAX_RATE_CHAP3__20_00 = '20.00'; + const TAX_RATE_CHAP3__21_00 = '21.00'; + const TAX_RATE_CHAP3__24_00 = '24.00'; + const TAX_RATE_CHAP3__25_00 = '25.00'; + const TAX_RATE_CHAP3__27_50 = '27.50'; + const TAX_RATE_CHAP3__28_00 = '28.00'; + const TAX_RATE_CHAP3__30_00 = '30.00'; + const TAX_RATE_CHAP3__37_00 = '37.00'; + const CHAP3_STATUS_CODE__01 = '01'; + const CHAP3_STATUS_CODE__02 = '02'; + const CHAP3_STATUS_CODE__34 = '34'; + const CHAP3_STATUS_CODE__03 = '03'; + const CHAP3_STATUS_CODE__04 = '04'; + const CHAP3_STATUS_CODE__05 = '05'; + const CHAP3_STATUS_CODE__06 = '06'; + const CHAP3_STATUS_CODE__07 = '07'; + const CHAP3_STATUS_CODE__08 = '08'; + const CHAP3_STATUS_CODE__09 = '09'; + const CHAP3_STATUS_CODE__10 = '10'; + const CHAP3_STATUS_CODE__11 = '11'; + const CHAP3_STATUS_CODE__12 = '12'; + const CHAP3_STATUS_CODE__13 = '13'; + const CHAP3_STATUS_CODE__14 = '14'; + const CHAP3_STATUS_CODE__15 = '15'; + const CHAP3_STATUS_CODE__16 = '16'; + const CHAP3_STATUS_CODE__17 = '17'; + const CHAP3_STATUS_CODE__18 = '18'; + const CHAP3_STATUS_CODE__19 = '19'; + const CHAP3_STATUS_CODE__20 = '20'; + const CHAP3_STATUS_CODE__21 = '21'; + const CHAP3_STATUS_CODE__22 = '22'; + const CHAP3_STATUS_CODE__23 = '23'; + const CHAP3_STATUS_CODE__24 = '24'; + const CHAP3_STATUS_CODE__25 = '25'; + const CHAP3_STATUS_CODE__26 = '26'; + const CHAP3_STATUS_CODE__27 = '27'; + const CHAP3_STATUS_CODE__28 = '28'; + const CHAP3_STATUS_CODE__29 = '29'; + const CHAP3_STATUS_CODE__30 = '30'; + const CHAP3_STATUS_CODE__31 = '31'; + const CHAP3_STATUS_CODE__32 = '32'; + const CHAP3_STATUS_CODE__35 = '35'; + const CHAP3_STATUS_CODE__36 = '36'; + const CHAP3_STATUS_CODE__37 = '37'; + const CHAP3_STATUS_CODE__38 = '38'; + const CHAP3_STATUS_CODE__39 = '39'; + const CHAP4_STATUS_CODE__01 = '01'; + const CHAP4_STATUS_CODE__02 = '02'; + const CHAP4_STATUS_CODE__03 = '03'; + const CHAP4_STATUS_CODE__04 = '04'; + const CHAP4_STATUS_CODE__05 = '05'; + const CHAP4_STATUS_CODE__06 = '06'; + const CHAP4_STATUS_CODE__07 = '07'; + const CHAP4_STATUS_CODE__08 = '08'; + const CHAP4_STATUS_CODE__09 = '09'; + const CHAP4_STATUS_CODE__10 = '10'; + const CHAP4_STATUS_CODE__11 = '11'; + const CHAP4_STATUS_CODE__12 = '12'; + const CHAP4_STATUS_CODE__13 = '13'; + const CHAP4_STATUS_CODE__14 = '14'; + const CHAP4_STATUS_CODE__15 = '15'; + const CHAP4_STATUS_CODE__16 = '16'; + const CHAP4_STATUS_CODE__17 = '17'; + const CHAP4_STATUS_CODE__18 = '18'; + const CHAP4_STATUS_CODE__19 = '19'; + const CHAP4_STATUS_CODE__20 = '20'; + const CHAP4_STATUS_CODE__21 = '21'; + const CHAP4_STATUS_CODE__22 = '22'; + const CHAP4_STATUS_CODE__23 = '23'; + const CHAP4_STATUS_CODE__24 = '24'; + const CHAP4_STATUS_CODE__25 = '25'; + const CHAP4_STATUS_CODE__26 = '26'; + const CHAP4_STATUS_CODE__27 = '27'; + const CHAP4_STATUS_CODE__28 = '28'; + const CHAP4_STATUS_CODE__29 = '29'; + const CHAP4_STATUS_CODE__30 = '30'; + const CHAP4_STATUS_CODE__31 = '31'; + const CHAP4_STATUS_CODE__32 = '32'; + const CHAP4_STATUS_CODE__33 = '33'; + const CHAP4_STATUS_CODE__34 = '34'; + const CHAP4_STATUS_CODE__35 = '35'; + const CHAP4_STATUS_CODE__36 = '36'; + const CHAP4_STATUS_CODE__37 = '37'; + const CHAP4_STATUS_CODE__38 = '38'; + const CHAP4_STATUS_CODE__39 = '39'; + const CHAP4_STATUS_CODE__40 = '40'; + const CHAP4_STATUS_CODE__41 = '41'; + const CHAP4_STATUS_CODE__42 = '42'; + const CHAP4_STATUS_CODE__43 = '43'; + const CHAP4_STATUS_CODE__44 = '44'; + const CHAP4_STATUS_CODE__45 = '45'; + const CHAP4_STATUS_CODE__46 = '46'; + const CHAP4_STATUS_CODE__47 = '47'; + const CHAP4_STATUS_CODE__48 = '48'; + const CHAP4_STATUS_CODE__49 = '49'; + const CHAP4_STATUS_CODE__50 = '50'; + const TYPE__1099_NEC = '1099-NEC'; + const TYPE__1099_MISC = '1099-MISC'; + const TYPE__1099_DIV = '1099-DIV'; + const TYPE__1099_R = '1099-R'; + const TYPE__1099_K = '1099-K'; + const TYPE__1095_B = '1095-B'; + const TYPE__1042_S = '1042-S'; + const TYPE__1095_C = '1095-C'; + const TYPE__1099_INT = '1099-INT'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_A = 'A'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_B = 'B'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_C = 'C'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_D = 'D'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_E = 'E'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_F = 'F'; + const ORIGIN_OF_HEALTH_COVERAGE_CODE_G = 'G'; + const PLAN_START_MONTH__00 = '00'; + const PLAN_START_MONTH__01 = '01'; + const PLAN_START_MONTH__02 = '02'; + const PLAN_START_MONTH__03 = '03'; + const PLAN_START_MONTH__04 = '04'; + const PLAN_START_MONTH__05 = '05'; + const PLAN_START_MONTH__06 = '06'; + const PLAN_START_MONTH__07 = '07'; + const PLAN_START_MONTH__08 = '08'; + const PLAN_START_MONTH__09 = '09'; + const PLAN_START_MONTH__10 = '10'; + const PLAN_START_MONTH__11 = '11'; + const PLAN_START_MONTH__12 = '12'; const FILER_TYPE_PSE = 'PSE'; const FILER_TYPE_EPF = 'EPF'; const FILER_TYPE_OTHER = 'Other'; const PAYMENT_TYPE_MERCHANT_PAYMENT_CARD = 'MerchantPaymentCard'; const PAYMENT_TYPE_THIRD_PARTY_NETWORK = 'ThirdPartyNetwork'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTinTypeAllowableValues() + { + return [ + self::TIN_TYPE__EMPTY, + self::TIN_TYPE_EIN, + self::TIN_TYPE_SSN, + self::TIN_TYPE_ITIN, + self::TIN_TYPE_ATIN, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLobCodeAllowableValues() + { + return [ + self::LOB_CODE__01, + self::LOB_CODE__02, + self::LOB_CODE__03, + self::LOB_CODE__04, + self::LOB_CODE__05, + self::LOB_CODE__06, + self::LOB_CODE__07, + self::LOB_CODE__08, + self::LOB_CODE__09, + self::LOB_CODE__10, + self::LOB_CODE__11, + self::LOB_CODE__12, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIncomeCodeAllowableValues() + { + return [ + self::INCOME_CODE__01, + self::INCOME_CODE__02, + self::INCOME_CODE__03, + self::INCOME_CODE__04, + self::INCOME_CODE__05, + self::INCOME_CODE__22, + self::INCOME_CODE__29, + self::INCOME_CODE__30, + self::INCOME_CODE__31, + self::INCOME_CODE__33, + self::INCOME_CODE__51, + self::INCOME_CODE__54, + self::INCOME_CODE__06, + self::INCOME_CODE__07, + self::INCOME_CODE__08, + self::INCOME_CODE__34, + self::INCOME_CODE__40, + self::INCOME_CODE__52, + self::INCOME_CODE__53, + self::INCOME_CODE__56, + self::INCOME_CODE__09, + self::INCOME_CODE__10, + self::INCOME_CODE__11, + self::INCOME_CODE__12, + self::INCOME_CODE__13, + self::INCOME_CODE__14, + self::INCOME_CODE__15, + self::INCOME_CODE__16, + self::INCOME_CODE__17, + self::INCOME_CODE__18, + self::INCOME_CODE__19, + self::INCOME_CODE__20, + self::INCOME_CODE__23, + self::INCOME_CODE__24, + self::INCOME_CODE__25, + self::INCOME_CODE__26, + self::INCOME_CODE__27, + self::INCOME_CODE__28, + self::INCOME_CODE__32, + self::INCOME_CODE__35, + self::INCOME_CODE__36, + self::INCOME_CODE__37, + self::INCOME_CODE__38, + self::INCOME_CODE__39, + self::INCOME_CODE__41, + self::INCOME_CODE__42, + self::INCOME_CODE__43, + self::INCOME_CODE__44, + self::INCOME_CODE__50, + self::INCOME_CODE__55, + self::INCOME_CODE__57, + self::INCOME_CODE__58, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getWithholdingIndicatorAllowableValues() + { + return [ + self::WITHHOLDING_INDICATOR__3, + self::WITHHOLDING_INDICATOR__4, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getExemptionCodeChap3AllowableValues() + { + return [ + self::EXEMPTION_CODE_CHAP3__00, + self::EXEMPTION_CODE_CHAP3__01, + self::EXEMPTION_CODE_CHAP3__02, + self::EXEMPTION_CODE_CHAP3__03, + self::EXEMPTION_CODE_CHAP3__04, + self::EXEMPTION_CODE_CHAP3__05, + self::EXEMPTION_CODE_CHAP3__06, + self::EXEMPTION_CODE_CHAP3__07, + self::EXEMPTION_CODE_CHAP3__08, + self::EXEMPTION_CODE_CHAP3__09, + self::EXEMPTION_CODE_CHAP3__10, + self::EXEMPTION_CODE_CHAP3__11, + self::EXEMPTION_CODE_CHAP3__12, + self::EXEMPTION_CODE_CHAP3__22, + self::EXEMPTION_CODE_CHAP3__23, + self::EXEMPTION_CODE_CHAP3__24, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getExemptionCodeChap4AllowableValues() + { + return [ + self::EXEMPTION_CODE_CHAP4__00, + self::EXEMPTION_CODE_CHAP4__13, + self::EXEMPTION_CODE_CHAP4__14, + self::EXEMPTION_CODE_CHAP4__15, + self::EXEMPTION_CODE_CHAP4__16, + self::EXEMPTION_CODE_CHAP4__17, + self::EXEMPTION_CODE_CHAP4__18, + self::EXEMPTION_CODE_CHAP4__19, + self::EXEMPTION_CODE_CHAP4__20, + self::EXEMPTION_CODE_CHAP4__21, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTaxRateChap3AllowableValues() + { + return [ + self::TAX_RATE_CHAP3__00_00, + self::TAX_RATE_CHAP3__02_00, + self::TAX_RATE_CHAP3__04_00, + self::TAX_RATE_CHAP3__04_90, + self::TAX_RATE_CHAP3__04_95, + self::TAX_RATE_CHAP3__05_00, + self::TAX_RATE_CHAP3__07_00, + self::TAX_RATE_CHAP3__08_00, + self::TAX_RATE_CHAP3__10_00, + self::TAX_RATE_CHAP3__12_00, + self::TAX_RATE_CHAP3__12_50, + self::TAX_RATE_CHAP3__14_00, + self::TAX_RATE_CHAP3__15_00, + self::TAX_RATE_CHAP3__17_50, + self::TAX_RATE_CHAP3__20_00, + self::TAX_RATE_CHAP3__21_00, + self::TAX_RATE_CHAP3__24_00, + self::TAX_RATE_CHAP3__25_00, + self::TAX_RATE_CHAP3__27_50, + self::TAX_RATE_CHAP3__28_00, + self::TAX_RATE_CHAP3__30_00, + self::TAX_RATE_CHAP3__37_00, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChap3StatusCodeAllowableValues() + { + return [ + self::CHAP3_STATUS_CODE__01, + self::CHAP3_STATUS_CODE__02, + self::CHAP3_STATUS_CODE__34, + self::CHAP3_STATUS_CODE__03, + self::CHAP3_STATUS_CODE__04, + self::CHAP3_STATUS_CODE__05, + self::CHAP3_STATUS_CODE__06, + self::CHAP3_STATUS_CODE__07, + self::CHAP3_STATUS_CODE__08, + self::CHAP3_STATUS_CODE__09, + self::CHAP3_STATUS_CODE__10, + self::CHAP3_STATUS_CODE__11, + self::CHAP3_STATUS_CODE__12, + self::CHAP3_STATUS_CODE__13, + self::CHAP3_STATUS_CODE__14, + self::CHAP3_STATUS_CODE__15, + self::CHAP3_STATUS_CODE__16, + self::CHAP3_STATUS_CODE__17, + self::CHAP3_STATUS_CODE__18, + self::CHAP3_STATUS_CODE__19, + self::CHAP3_STATUS_CODE__20, + self::CHAP3_STATUS_CODE__21, + self::CHAP3_STATUS_CODE__22, + self::CHAP3_STATUS_CODE__23, + self::CHAP3_STATUS_CODE__24, + self::CHAP3_STATUS_CODE__25, + self::CHAP3_STATUS_CODE__26, + self::CHAP3_STATUS_CODE__27, + self::CHAP3_STATUS_CODE__28, + self::CHAP3_STATUS_CODE__29, + self::CHAP3_STATUS_CODE__30, + self::CHAP3_STATUS_CODE__31, + self::CHAP3_STATUS_CODE__32, + self::CHAP3_STATUS_CODE__35, + self::CHAP3_STATUS_CODE__36, + self::CHAP3_STATUS_CODE__37, + self::CHAP3_STATUS_CODE__38, + self::CHAP3_STATUS_CODE__39, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChap4StatusCodeAllowableValues() + { + return [ + self::CHAP4_STATUS_CODE__01, + self::CHAP4_STATUS_CODE__02, + self::CHAP4_STATUS_CODE__03, + self::CHAP4_STATUS_CODE__04, + self::CHAP4_STATUS_CODE__05, + self::CHAP4_STATUS_CODE__06, + self::CHAP4_STATUS_CODE__07, + self::CHAP4_STATUS_CODE__08, + self::CHAP4_STATUS_CODE__09, + self::CHAP4_STATUS_CODE__10, + self::CHAP4_STATUS_CODE__11, + self::CHAP4_STATUS_CODE__12, + self::CHAP4_STATUS_CODE__13, + self::CHAP4_STATUS_CODE__14, + self::CHAP4_STATUS_CODE__15, + self::CHAP4_STATUS_CODE__16, + self::CHAP4_STATUS_CODE__17, + self::CHAP4_STATUS_CODE__18, + self::CHAP4_STATUS_CODE__19, + self::CHAP4_STATUS_CODE__20, + self::CHAP4_STATUS_CODE__21, + self::CHAP4_STATUS_CODE__22, + self::CHAP4_STATUS_CODE__23, + self::CHAP4_STATUS_CODE__24, + self::CHAP4_STATUS_CODE__25, + self::CHAP4_STATUS_CODE__26, + self::CHAP4_STATUS_CODE__27, + self::CHAP4_STATUS_CODE__28, + self::CHAP4_STATUS_CODE__29, + self::CHAP4_STATUS_CODE__30, + self::CHAP4_STATUS_CODE__31, + self::CHAP4_STATUS_CODE__32, + self::CHAP4_STATUS_CODE__33, + self::CHAP4_STATUS_CODE__34, + self::CHAP4_STATUS_CODE__35, + self::CHAP4_STATUS_CODE__36, + self::CHAP4_STATUS_CODE__37, + self::CHAP4_STATUS_CODE__38, + self::CHAP4_STATUS_CODE__39, + self::CHAP4_STATUS_CODE__40, + self::CHAP4_STATUS_CODE__41, + self::CHAP4_STATUS_CODE__42, + self::CHAP4_STATUS_CODE__43, + self::CHAP4_STATUS_CODE__44, + self::CHAP4_STATUS_CODE__45, + self::CHAP4_STATUS_CODE__46, + self::CHAP4_STATUS_CODE__47, + self::CHAP4_STATUS_CODE__48, + self::CHAP4_STATUS_CODE__49, + self::CHAP4_STATUS_CODE__50, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE__1099_NEC, + self::TYPE__1099_MISC, + self::TYPE__1099_DIV, + self::TYPE__1099_R, + self::TYPE__1099_K, + self::TYPE__1095_B, + self::TYPE__1042_S, + self::TYPE__1095_C, + self::TYPE__1099_INT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOriginOfHealthCoverageCodeAllowableValues() + { + return [ + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_A, + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_B, + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_C, + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_D, + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_E, + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_F, + self::ORIGIN_OF_HEALTH_COVERAGE_CODE_G, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPlanStartMonthAllowableValues() + { + return [ + self::PLAN_START_MONTH__00, + self::PLAN_START_MONTH__01, + self::PLAN_START_MONTH__02, + self::PLAN_START_MONTH__03, + self::PLAN_START_MONTH__04, + self::PLAN_START_MONTH__05, + self::PLAN_START_MONTH__06, + self::PLAN_START_MONTH__07, + self::PLAN_START_MONTH__08, + self::PLAN_START_MONTH__09, + self::PLAN_START_MONTH__10, + self::PLAN_START_MONTH__11, + self::PLAN_START_MONTH__12, + ]; + } + /** * Gets allowable values of the enum * @@ -892,45 +1586,7 @@ public function getPaymentTypeAllowableValues() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['federal_efile'] = $data['federal_efile'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['state_efile'] = $data['state_efile'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['tin'] = $data['tin'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; $this->container['unique_form_id'] = $data['unique_form_id'] ?? null; $this->container['recipient_date_of_birth'] = $data['recipient_date_of_birth'] ?? null; $this->container['recipient_giin'] = $data['recipient_giin'] ?? null; @@ -954,8 +1610,54 @@ public function __construct(array $data = null) $this->container['chap4_status_code'] = $data['chap4_status_code'] ?? null; $this->container['primary_withholding_agent'] = $data['primary_withholding_agent'] ?? null; $this->container['intermediary_or_flow_through'] = $data['intermediary_or_flow_through'] ?? null; + $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['issuer_id'] = $data['issuer_id'] ?? null; + $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; + $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; + $this->container['tax_year'] = $data['tax_year'] ?? null; + $this->container['reference_id'] = $data['reference_id'] ?? null; + $this->container['tin'] = $data['tin'] ?? null; + $this->container['recipient_name'] = $data['recipient_name'] ?? null; + $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; + $this->container['address'] = $data['address'] ?? null; + $this->container['address2'] = $data['address2'] ?? null; + $this->container['city'] = $data['city'] ?? null; + $this->container['state'] = $data['state'] ?? null; + $this->container['zip'] = $data['zip'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['account_number'] = $data['account_number'] ?? null; + $this->container['office_code'] = $data['office_code'] ?? null; + $this->container['non_us_province'] = $data['non_us_province'] ?? null; + $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['federal_efile_date'] = $data['federal_efile_date'] ?? null; + $this->container['postal_mail'] = $data['postal_mail'] ?? null; + $this->container['state_efile_date'] = $data['state_efile_date'] ?? null; + $this->container['recipient_edelivery_date'] = $data['recipient_edelivery_date'] ?? null; + $this->container['tin_match'] = $data['tin_match'] ?? null; + $this->container['no_tin'] = $data['no_tin'] ?? null; + $this->container['address_verification'] = $data['address_verification'] ?? null; + $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; + $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; + $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; + $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; + $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; + $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; + $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; + $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; + $this->container['validation_errors'] = $data['validation_errors'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; + $this->container['employee_first_name'] = $data['employee_first_name'] ?? null; + $this->container['employee_middle_name'] = $data['employee_middle_name'] ?? null; + $this->container['employee_last_name'] = $data['employee_last_name'] ?? null; + $this->container['employee_name_suffix'] = $data['employee_name_suffix'] ?? null; + $this->container['employee_date_of_birth'] = $data['employee_date_of_birth'] ?? null; $this->container['origin_of_health_coverage_code'] = $data['origin_of_health_coverage_code'] ?? null; $this->container['covered_individuals'] = $data['covered_individuals'] ?? null; + $this->container['plan_start_month'] = $data['plan_start_month'] ?? null; + $this->container['employer_provided_si_coverage'] = $data['employer_provided_si_coverage'] ?? null; + $this->container['offer_and_coverages'] = $data['offer_and_coverages'] ?? null; $this->container['total_ordinary_dividends'] = $data['total_ordinary_dividends'] ?? null; $this->container['qualified_dividends'] = $data['qualified_dividends'] ?? null; $this->container['total_capital_gain_distributions'] = $data['total_capital_gain_distributions'] ?? null; @@ -974,6 +1676,18 @@ public function __construct(array $data = null) $this->container['noncash_liquidation_distributions'] = $data['noncash_liquidation_distributions'] ?? null; $this->container['exempt_interest_dividends'] = $data['exempt_interest_dividends'] ?? null; $this->container['specified_private_activity_bond_interest_dividends'] = $data['specified_private_activity_bond_interest_dividends'] ?? null; + $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; + $this->container['interest_income'] = $data['interest_income'] ?? null; + $this->container['early_withdrawal_penalty'] = $data['early_withdrawal_penalty'] ?? null; + $this->container['us_savings_bonds_interest'] = $data['us_savings_bonds_interest'] ?? null; + $this->container['foreign_country'] = $data['foreign_country'] ?? null; + $this->container['tax_exempt_interest'] = $data['tax_exempt_interest'] ?? null; + $this->container['specified_private_activity_bond_interest'] = $data['specified_private_activity_bond_interest'] ?? null; + $this->container['market_discount'] = $data['market_discount'] ?? null; + $this->container['bond_premium'] = $data['bond_premium'] ?? null; + $this->container['bond_premium_on_treasury_obligations'] = $data['bond_premium_on_treasury_obligations'] ?? null; + $this->container['bond_premium_on_tax_exempt_bond'] = $data['bond_premium_on_tax_exempt_bond'] ?? null; + $this->container['tax_exempt_bond_cusip_number'] = $data['tax_exempt_bond_cusip_number'] ?? null; $this->container['filer_type'] = $data['filer_type'] ?? null; $this->container['payment_type'] = $data['payment_type'] ?? null; $this->container['payment_settlement_entity_name_phone_number'] = $data['payment_settlement_entity_name_phone_number'] ?? null; @@ -989,43 +1703,41 @@ public function __construct(array $data = null) $this->container['june'] = $data['june'] ?? null; $this->container['july'] = $data['july'] ?? null; $this->container['august'] = $data['august'] ?? null; - $this->container['sept'] = $data['sept'] ?? null; + $this->container['september'] = $data['september'] ?? null; $this->container['october'] = $data['october'] ?? null; $this->container['november'] = $data['november'] ?? null; $this->container['december'] = $data['december'] ?? null; $this->container['rents'] = $data['rents'] ?? null; $this->container['royalties'] = $data['royalties'] ?? null; $this->container['other_income'] = $data['other_income'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; $this->container['fishing_boat_proceeds'] = $data['fishing_boat_proceeds'] ?? null; $this->container['medical_and_health_care_payments'] = $data['medical_and_health_care_payments'] ?? null; - $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; + $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; $this->container['crop_insurance_proceeds'] = $data['crop_insurance_proceeds'] ?? null; - $this->container['excess_golden_parachute_payments'] = $data['excess_golden_parachute_payments'] ?? null; $this->container['gross_proceeds_paid_to_attorney'] = $data['gross_proceeds_paid_to_attorney'] ?? null; $this->container['fish_purchased_for_resale'] = $data['fish_purchased_for_resale'] ?? null; $this->container['section409_a_deferrals'] = $data['section409_a_deferrals'] ?? null; + $this->container['excess_golden_parachute_payments'] = $data['excess_golden_parachute_payments'] ?? null; $this->container['nonqualified_deferred_compensation'] = $data['nonqualified_deferred_compensation'] ?? null; $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - $this->container['gross_distributions'] = $data['gross_distributions'] ?? null; + $this->container['gross_distribution'] = $data['gross_distribution'] ?? null; $this->container['taxable_amount'] = $data['taxable_amount'] ?? null; $this->container['taxable_amount_not_determined'] = $data['taxable_amount_not_determined'] ?? null; - $this->container['total_distribution_indicator'] = $data['total_distribution_indicator'] ?? null; + $this->container['total_distribution_determined'] = $data['total_distribution_determined'] ?? null; $this->container['capital_gain'] = $data['capital_gain'] ?? null; - $this->container['employee_contributions'] = $data['employee_contributions'] ?? null; - $this->container['net_unrealized_appreciation'] = $data['net_unrealized_appreciation'] ?? null; - $this->container['distribution_code_required'] = $data['distribution_code_required'] ?? null; - $this->container['distribution_code_optional'] = $data['distribution_code_optional'] ?? null; - $this->container['ira_sep_simple_indicator'] = $data['ira_sep_simple_indicator'] ?? null; - $this->container['total_ira_sep_simple_distribution'] = $data['total_ira_sep_simple_distribution'] ?? null; - $this->container['other'] = $data['other'] ?? null; - $this->container['other_percent'] = $data['other_percent'] ?? null; - $this->container['percentage_total_distribution'] = $data['percentage_total_distribution'] ?? null; + $this->container['employee_contributions_or_designated_roth_or_insurance_premiums'] = $data['employee_contributions_or_designated_roth_or_insurance_premiums'] ?? null; + $this->container['net_unrealized_appreciation_in_employer_securities'] = $data['net_unrealized_appreciation_in_employer_securities'] ?? null; + $this->container['distribution_code'] = $data['distribution_code'] ?? null; + $this->container['second_distribution_code'] = $data['second_distribution_code'] ?? null; + $this->container['ira_sep_simple'] = $data['ira_sep_simple'] ?? null; + $this->container['traditional_ira_sep_simple_or_roth_conversion_amount'] = $data['traditional_ira_sep_simple_or_roth_conversion_amount'] ?? null; + $this->container['other_amount'] = $data['other_amount'] ?? null; + $this->container['other_percentage'] = $data['other_percentage'] ?? null; + $this->container['total_distribution_percentage'] = $data['total_distribution_percentage'] ?? null; $this->container['total_employee_contributions'] = $data['total_employee_contributions'] ?? null; - $this->container['amount_allocable_to_irr'] = $data['amount_allocable_to_irr'] ?? null; - $this->container['first_year_designated_roth_contrib'] = $data['first_year_designated_roth_contrib'] ?? null; - $this->container['fatca_requirement_indicator'] = $data['fatca_requirement_indicator'] ?? null; + $this->container['amount_allocable_to_irr_within5_years'] = $data['amount_allocable_to_irr_within5_years'] ?? null; + $this->container['first_year_of_designated_roth_contribution'] = $data['first_year_of_designated_roth_contribution'] ?? null; $this->container['date_of_payment'] = $data['date_of_payment'] ?? null; } @@ -1038,37 +1750,158 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tin_type', must be one of '%s'", + $this->container['tin_type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['unique_form_id'] === null) { + $invalidProperties[] = "'unique_form_id' can't be null"; + } + $allowedValues = $this->getLobCodeAllowableValues(); + if (!is_null($this->container['lob_code']) && !in_array($this->container['lob_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'lob_code', must be one of '%s'", + $this->container['lob_code'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['income_code'] === null) { + $invalidProperties[] = "'income_code' can't be null"; + } + $allowedValues = $this->getIncomeCodeAllowableValues(); + if (!is_null($this->container['income_code']) && !in_array($this->container['income_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'income_code', must be one of '%s'", + $this->container['income_code'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['gross_income'] === null) { + $invalidProperties[] = "'gross_income' can't be null"; + } + if ($this->container['withholding_indicator'] === null) { + $invalidProperties[] = "'withholding_indicator' can't be null"; + } + $allowedValues = $this->getWithholdingIndicatorAllowableValues(); + if (!is_null($this->container['withholding_indicator']) && !in_array($this->container['withholding_indicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'withholding_indicator', must be one of '%s'", + $this->container['withholding_indicator'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['tax_country_code'] === null) { + $invalidProperties[] = "'tax_country_code' can't be null"; + } + $allowedValues = $this->getExemptionCodeChap3AllowableValues(); + if (!is_null($this->container['exemption_code_chap3']) && !in_array($this->container['exemption_code_chap3'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'exemption_code_chap3', must be one of '%s'", + $this->container['exemption_code_chap3'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getExemptionCodeChap4AllowableValues(); + if (!is_null($this->container['exemption_code_chap4']) && !in_array($this->container['exemption_code_chap4'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'exemption_code_chap4', must be one of '%s'", + $this->container['exemption_code_chap4'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTaxRateChap3AllowableValues(); + if (!is_null($this->container['tax_rate_chap3']) && !in_array($this->container['tax_rate_chap3'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'tax_rate_chap3', must be one of '%s'", + $this->container['tax_rate_chap3'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getChap3StatusCodeAllowableValues(); + if (!is_null($this->container['chap3_status_code']) && !in_array($this->container['chap3_status_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'chap3_status_code', must be one of '%s'", + $this->container['chap3_status_code'], + implode("', '", $allowedValues) + ); } - if ((mb_strlen($this->container['id']) < 1)) { - $invalidProperties[] = "invalid value for 'id', the character length must be bigger than or equal to 1."; + + $allowedValues = $this->getChap4StatusCodeAllowableValues(); + if (!is_null($this->container['chap4_status_code']) && !in_array($this->container['chap4_status_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'chap4_status_code', must be one of '%s'", + $this->container['chap4_status_code'], + implode("', '", $allowedValues) + ); } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } - if ((mb_strlen($this->container['type']) < 1)) { - $invalidProperties[] = "invalid value for 'type', the character length must be bigger than or equal to 1."; + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); } - if ($this->container['issuer_id'] === null) { - $invalidProperties[] = "'issuer_id' can't be null"; + if ($this->container['recipient_name'] === null) { + $invalidProperties[] = "'recipient_name' can't be null"; + } + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; } - if ($this->container['federal_efile'] === null) { - $invalidProperties[] = "'federal_efile' can't be null"; + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; } - if ($this->container['state_efile'] === null) { - $invalidProperties[] = "'state_efile' can't be null"; + if ($this->container['employee_first_name'] === null) { + $invalidProperties[] = "'employee_first_name' can't be null"; } - if ($this->container['postal_mail'] === null) { - $invalidProperties[] = "'postal_mail' can't be null"; + if ($this->container['employee_last_name'] === null) { + $invalidProperties[] = "'employee_last_name' can't be null"; } - if ($this->container['tin_match'] === null) { - $invalidProperties[] = "'tin_match' can't be null"; + if ($this->container['origin_of_health_coverage_code'] === null) { + $invalidProperties[] = "'origin_of_health_coverage_code' can't be null"; + } + $allowedValues = $this->getOriginOfHealthCoverageCodeAllowableValues(); + if (!is_null($this->container['origin_of_health_coverage_code']) && !in_array($this->container['origin_of_health_coverage_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'origin_of_health_coverage_code', must be one of '%s'", + $this->container['origin_of_health_coverage_code'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['plan_start_month'] === null) { + $invalidProperties[] = "'plan_start_month' can't be null"; + } + $allowedValues = $this->getPlanStartMonthAllowableValues(); + if (!is_null($this->container['plan_start_month']) && !in_array($this->container['plan_start_month'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'plan_start_month', must be one of '%s'", + $this->container['plan_start_month'], + implode("', '", $allowedValues) + ); } - if ($this->container['address_verification'] === null) { - $invalidProperties[] = "'address_verification' can't be null"; + + if ($this->container['offer_and_coverages'] === null) { + $invalidProperties[] = "'offer_and_coverages' can't be null"; } $allowedValues = $this->getFilerTypeAllowableValues(); if (!is_null($this->container['filer_type']) && !in_array($this->container['filer_type'], $allowedValues, true)) { @@ -1088,6 +1921,9 @@ public function listInvalidProperties() ); } + if ($this->container['nonemployee_compensation'] === null) { + $invalidProperties[] = "'nonemployee_compensation' can't be null"; + } return $invalidProperties; } @@ -1104,1985 +1940,2577 @@ public function valid() /** - * Gets id + * Gets tin_type * - * @return string + * @return string|null */ - public function getId() + public function getTinType() { - return $this->container['id']; + return $this->container['tin_type']; } /** - * Sets id + * Sets tin_type * - * @param string $id ID of the form + * @param string|null $tin_type Type of TIN (Tax ID Number) * * @return self */ - public function setId($id) + public function setTinType($tin_type) { - - if ((mb_strlen($id) < 1)) { - throw new \InvalidArgumentException('invalid length for $id when calling Get1099Form200Response., must be bigger than or equal to 1.'); + $allowedValues = $this->getTinTypeAllowableValues(); + if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tin_type', must be one of '%s'", + $tin_type, + implode("', '", $allowedValues) + ) + ); } - - $this->container['id'] = $id; + $this->container['tin_type'] = $tin_type; return $this; } /** - * Gets type + * Gets unique_form_id * * @return string */ - public function getType() + public function getUniqueFormId() { - return $this->container['type']; + return $this->container['unique_form_id']; } /** - * Sets type + * Sets unique_form_id * - * @param string $type Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC + * @param string $unique_form_id Unique form identifier * * @return self */ - public function setType($type) + public function setUniqueFormId($unique_form_id) { + $this->container['unique_form_id'] = $unique_form_id; - if ((mb_strlen($type) < 1)) { - throw new \InvalidArgumentException('invalid length for $type when calling Get1099Form200Response., must be bigger than or equal to 1.'); - } + return $this; + } - $this->container['type'] = $type; + /** + * Gets recipient_date_of_birth + * + * @return \DateTime|null + */ + public function getRecipientDateOfBirth() + { + return $this->container['recipient_date_of_birth']; + } + + /** + * Sets recipient_date_of_birth + * + * @param \DateTime|null $recipient_date_of_birth Recipient's date of birth + * + * @return self + */ + public function setRecipientDateOfBirth($recipient_date_of_birth) + { + $this->container['recipient_date_of_birth'] = $recipient_date_of_birth; return $this; } /** - * Gets issuer_id + * Gets recipient_giin * - * @return int + * @return string|null */ - public function getIssuerId() + public function getRecipientGiin() { - return $this->container['issuer_id']; + return $this->container['recipient_giin']; } /** - * Sets issuer_id + * Sets recipient_giin * - * @param int $issuer_id Issuer ID + * @param string|null $recipient_giin Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'. * * @return self */ - public function setIssuerId($issuer_id) + public function setRecipientGiin($recipient_giin) { - $this->container['issuer_id'] = $issuer_id; + $this->container['recipient_giin'] = $recipient_giin; return $this; } /** - * Gets issuer_reference_id + * Gets recipient_foreign_tin * * @return string|null */ - public function getIssuerReferenceId() + public function getRecipientForeignTin() { - return $this->container['issuer_reference_id']; + return $this->container['recipient_foreign_tin']; } /** - * Sets issuer_reference_id + * Sets recipient_foreign_tin * - * @param string|null $issuer_reference_id Issuer Reference ID + * @param string|null $recipient_foreign_tin Recipient's foreign TIN. Required if email is specified, must fill either this or Chap3StatusCode. * * @return self */ - public function setIssuerReferenceId($issuer_reference_id) + public function setRecipientForeignTin($recipient_foreign_tin) { - $this->container['issuer_reference_id'] = $issuer_reference_id; + $this->container['recipient_foreign_tin'] = $recipient_foreign_tin; return $this; } /** - * Gets issuer_tin + * Gets lob_code * * @return string|null */ - public function getIssuerTin() + public function getLobCode() { - return $this->container['issuer_tin']; + return $this->container['lob_code']; } /** - * Sets issuer_tin + * Sets lob_code * - * @param string|null $issuer_tin Issuer TIN + * @param string|null $lob_code Limitation on Benefits (LOB) code for tax treaty purposes. Available values: - 01: Individual (Deprecated - valid only for tax years prior to 2019) - 02: Government - contracting state/political subdivision/local authority - 03: Tax exempt pension trust/Pension fund - 04: Tax exempt/Charitable organization - 05: Publicly-traded corporation - 06: Subsidiary of publicly-traded corporation - 07: Company that meets the ownership and base erosion test - 08: Company that meets the derivative benefits test - 09: Company with an item of income that meets the active trade or business test - 10: Discretionary determination - 11: Other - 12: No LOB article in treaty * * @return self */ - public function setIssuerTin($issuer_tin) + public function setLobCode($lob_code) { - $this->container['issuer_tin'] = $issuer_tin; + $allowedValues = $this->getLobCodeAllowableValues(); + if (!is_null($lob_code) && !in_array($lob_code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'lob_code', must be one of '%s'", + $lob_code, + implode("', '", $allowedValues) + ) + ); + } + $this->container['lob_code'] = $lob_code; return $this; } /** - * Gets tax_year + * Gets income_code * - * @return int|null + * @return string */ - public function getTaxYear() + public function getIncomeCode() { - return $this->container['tax_year']; + return $this->container['income_code']; } /** - * Sets tax_year + * Sets income_code * - * @param int|null $tax_year Tax year + * @param string $income_code Income code. Available values: Interest: - 01: Interest paid by US obligors - general - 02: Interest paid on real property mortgages - 03: Interest paid to controlling foreign corporations - 04: Interest paid by foreign corporations - 05: Interest on tax-free covenant bonds - 22: Interest paid on deposit with a foreign branch of a domestic corporation or partnership - 29: Deposit interest - 30: Original issue discount (OID) - 31: Short-term OID - 33: Substitute payment - interest - 51: Interest paid on certain actively traded or publicly offered securities(1) - 54: Substitute payments - interest from certain actively traded or publicly offered securities(1) Dividend: - 06: Dividends paid by U.S. corporations - general - 07: Dividends qualifying for direct dividend rate - 08: Dividends paid by foreign corporations - 34: Substitute payment - dividends - 40: Other dividend equivalents under IRC section 871(m) (formerly 871(l)) - 52: Dividends paid on certain actively traded or publicly offered securities(1) - 53: Substitute payments - dividends from certain actively traded or publicly offered securities(1) - 56: Dividend equivalents under IRC section 871(m) as a result of applying the combined transaction rules Other: - 09: Capital gains - 10: Industrial royalties - 11: Motion picture or television copyright royalties - 12: Other royalties (for example, copyright, software, broadcasting, endorsement payments) - 13: Royalties paid on certain publicly offered securities(1) - 14: Real property income and natural resources royalties - 15: Pensions, annuities, alimony, and/or insurance premiums - 16: Scholarship or fellowship grants - 17: Compensation for independent personal services(2) - 18: Compensation for dependent personal services(2) - 19: Compensation for teaching(2) - 20: Compensation during studying and training(2) - 23: Other income - 24: Qualified investment entity (QIE) distributions of capital gains - 25: Trust distributions subject to IRC section 1445 - 26: Unsevered growing crops and timber distributions by a trust subject to IRC section 1445 - 27: Publicly traded partnership distributions subject to IRC section 1446 - 28: Gambling winnings(3) - 32: Notional principal contract income(4) - 35: Substitute payment - other - 36: Capital gains distributions - 37: Return of capital - 38: Eligible deferred compensation items subject to IRC section 877A(d)(1) - 39: Distributions from a nongrantor trust subject to IRC section 877A(f)(1) - 41: Guarantee of indebtedness - 42: Earnings as an artist or athlete - no central withholding agreement(5) - 43: Earnings as an artist or athlete - central withholding agreement(5) - 44: Specified Federal procurement payments - 50: Income previously reported under escrow procedure(6) - 55: Taxable death benefits on life insurance contracts - 57: Amount realized under IRC section 1446(f) - 58: Publicly traded partnership distributions-undetermined * * @return self */ - public function setTaxYear($tax_year) + public function setIncomeCode($income_code) + { + $allowedValues = $this->getIncomeCodeAllowableValues(); + if (!in_array($income_code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'income_code', must be one of '%s'", + $income_code, + implode("', '", $allowedValues) + ) + ); + } + $this->container['income_code'] = $income_code; + + return $this; + } + + /** + * Gets gross_income + * + * @return float + */ + public function getGrossIncome() + { + return $this->container['gross_income']; + } + + /** + * Sets gross_income + * + * @param float $gross_income Gross income + * + * @return self + */ + public function setGrossIncome($gross_income) + { + $this->container['gross_income'] = $gross_income; + + return $this; + } + + /** + * Gets withholding_indicator + * + * @return string + */ + public function getWithholdingIndicator() + { + return $this->container['withholding_indicator']; + } + + /** + * Sets withholding_indicator + * + * @param string $withholding_indicator Withholding indicator Available values: - 3: Chapter 3 - 4: Chapter 4 + * + * @return self + */ + public function setWithholdingIndicator($withholding_indicator) + { + $allowedValues = $this->getWithholdingIndicatorAllowableValues(); + if (!in_array($withholding_indicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'withholding_indicator', must be one of '%s'", + $withholding_indicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['withholding_indicator'] = $withholding_indicator; + + return $this; + } + + /** + * Gets tax_country_code + * + * @return string + */ + public function getTaxCountryCode() + { + return $this->container['tax_country_code']; + } + + /** + * Sets tax_country_code + * + * @param string $tax_country_code Country code + * + * @return self + */ + public function setTaxCountryCode($tax_country_code) + { + $this->container['tax_country_code'] = $tax_country_code; + + return $this; + } + + /** + * Gets exemption_code_chap3 + * + * @return string|null + */ + public function getExemptionCodeChap3() + { + return $this->container['exemption_code_chap3']; + } + + /** + * Sets exemption_code_chap3 + * + * @param string|null $exemption_code_chap3 Exemption code (Chapter 3). Required if WithholdingIndicator is 3 (Chapter 3). Required when using TaxRateChap3. Available values: - Empty: Tax rate is due to backup withholding - 00: Not exempt - 01: Effectively connected income - 02: Exempt under IRC (other than portfolio interest) - 03: Income is not from US sources - 04: Exempt under tax treaty - 05: Portfolio interest exempt under IRC - 06: QI that assumes primary withholding responsibility - 07: WFP or WFT - 08: U.S. branch treated as U.S. Person - 09: Territory FI treated as U.S. Person - 10: QI represents that income is exempt - 11: QSL that assumes primary withholding responsibility - 12: Payee subjected to chapter 4 withholding - 22: QDD that assumes primary withholding responsibility - 23: Exempt under section 897(l) - 24: Exempt under section 892 + * + * @return self + */ + public function setExemptionCodeChap3($exemption_code_chap3) + { + $allowedValues = $this->getExemptionCodeChap3AllowableValues(); + if (!is_null($exemption_code_chap3) && !in_array($exemption_code_chap3, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'exemption_code_chap3', must be one of '%s'", + $exemption_code_chap3, + implode("', '", $allowedValues) + ) + ); + } + $this->container['exemption_code_chap3'] = $exemption_code_chap3; + + return $this; + } + + /** + * Gets exemption_code_chap4 + * + * @return string|null + */ + public function getExemptionCodeChap4() + { + return $this->container['exemption_code_chap4']; + } + + /** + * Sets exemption_code_chap4 + * + * @param string|null $exemption_code_chap4 Exemption code (Chapter 4). Required if WithholdingIndicator is 4 (Chapter 4). Available values: - 00: Not exempt - 13: Grandfathered payment - 14: Effectively connected income - 15: Payee not subject to chapter 4 withholding - 16: Excluded nonfinancial payment - 17: Foreign Entity that assumes primary withholding responsibility - 18: U.S. Payees - of participating FFI or registered deemed - compliant FFI - 19: Exempt from withholding under IGA(6) - 20: Dormant account(7) - 21: Other - payment not subject to chapter 4 withholding + * + * @return self + */ + public function setExemptionCodeChap4($exemption_code_chap4) + { + $allowedValues = $this->getExemptionCodeChap4AllowableValues(); + if (!is_null($exemption_code_chap4) && !in_array($exemption_code_chap4, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'exemption_code_chap4', must be one of '%s'", + $exemption_code_chap4, + implode("', '", $allowedValues) + ) + ); + } + $this->container['exemption_code_chap4'] = $exemption_code_chap4; + + return $this; + } + + /** + * Gets tax_rate_chap3 + * + * @return string|null + */ + public function getTaxRateChap3() + { + return $this->container['tax_rate_chap3']; + } + + /** + * Sets tax_rate_chap3 + * + * @param string|null $tax_rate_chap3 Tax rate (Chapter 3) - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 00.00: 0.00% - 02.00: 2.00% - 04.00: 4.00% - 04.90: 4.90% - 04.95: 4.95% - 05.00: 5.00% - 07.00: 7.00% - 08.00: 8.00% - 10.00: 10.00% - 12.00: 12.00% - 12.50: 12.50% - 14.00: 14.00% - 15.00: 15.00% - 17.50: 17.50% - 20.00: 20.00% - 21.00: 21.00% - 24.00: 24.00% - 25.00: 25.00% - 27.50: 27.50% - 28.00: 28.00% - 30.00: 30.00% - 37.00: 37.00% + * + * @return self + */ + public function setTaxRateChap3($tax_rate_chap3) + { + $allowedValues = $this->getTaxRateChap3AllowableValues(); + if (!is_null($tax_rate_chap3) && !in_array($tax_rate_chap3, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'tax_rate_chap3', must be one of '%s'", + $tax_rate_chap3, + implode("', '", $allowedValues) + ) + ); + } + $this->container['tax_rate_chap3'] = $tax_rate_chap3; + + return $this; + } + + /** + * Gets withholding_allowance + * + * @return float|null + */ + public function getWithholdingAllowance() + { + return $this->container['withholding_allowance']; + } + + /** + * Sets withholding_allowance + * + * @param float|null $withholding_allowance Withholding allowance + * + * @return self + */ + public function setWithholdingAllowance($withholding_allowance) + { + $this->container['withholding_allowance'] = $withholding_allowance; + + return $this; + } + + /** + * Gets federal_tax_withheld + * + * @return float|null + */ + public function getFederalTaxWithheld() + { + return $this->container['federal_tax_withheld']; + } + + /** + * Sets federal_tax_withheld + * + * @param float|null $federal_tax_withheld Federal tax withheld + * + * @return self + */ + public function setFederalTaxWithheld($federal_tax_withheld) + { + $this->container['federal_tax_withheld'] = $federal_tax_withheld; + + return $this; + } + + /** + * Gets tax_not_deposited_indicator + * + * @return bool|null + */ + public function getTaxNotDepositedIndicator() + { + return $this->container['tax_not_deposited_indicator']; + } + + /** + * Sets tax_not_deposited_indicator + * + * @param bool|null $tax_not_deposited_indicator Tax not deposited indicator + * + * @return self + */ + public function setTaxNotDepositedIndicator($tax_not_deposited_indicator) + { + $this->container['tax_not_deposited_indicator'] = $tax_not_deposited_indicator; + + return $this; + } + + /** + * Gets academic_indicator + * + * @return bool|null + */ + public function getAcademicIndicator() + { + return $this->container['academic_indicator']; + } + + /** + * Sets academic_indicator + * + * @param bool|null $academic_indicator Academic indicator + * + * @return self + */ + public function setAcademicIndicator($academic_indicator) + { + $this->container['academic_indicator'] = $academic_indicator; + + return $this; + } + + /** + * Gets tax_withheld_other_agents + * + * @return float|null + */ + public function getTaxWithheldOtherAgents() + { + return $this->container['tax_withheld_other_agents']; + } + + /** + * Sets tax_withheld_other_agents + * + * @param float|null $tax_withheld_other_agents Tax withheld by other agents + * + * @return self + */ + public function setTaxWithheldOtherAgents($tax_withheld_other_agents) + { + $this->container['tax_withheld_other_agents'] = $tax_withheld_other_agents; + + return $this; + } + + /** + * Gets amount_repaid + * + * @return float|null + */ + public function getAmountRepaid() + { + return $this->container['amount_repaid']; + } + + /** + * Sets amount_repaid + * + * @param float|null $amount_repaid Amount repaid to recipient + * + * @return self + */ + public function setAmountRepaid($amount_repaid) + { + $this->container['amount_repaid'] = $amount_repaid; + + return $this; + } + + /** + * Gets tax_paid_agent + * + * @return float|null + */ + public function getTaxPaidAgent() + { + return $this->container['tax_paid_agent']; + } + + /** + * Sets tax_paid_agent + * + * @param float|null $tax_paid_agent Tax paid by withholding agent + * + * @return self + */ + public function setTaxPaidAgent($tax_paid_agent) + { + $this->container['tax_paid_agent'] = $tax_paid_agent; + + return $this; + } + + /** + * Gets chap3_status_code + * + * @return string|null + */ + public function getChap3StatusCode() + { + return $this->container['chap3_status_code']; + } + + /** + * Sets chap3_status_code + * + * @param string|null $chap3_status_code Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3) Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary + * + * @return self + */ + public function setChap3StatusCode($chap3_status_code) + { + $allowedValues = $this->getChap3StatusCodeAllowableValues(); + if (!is_null($chap3_status_code) && !in_array($chap3_status_code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'chap3_status_code', must be one of '%s'", + $chap3_status_code, + implode("', '", $allowedValues) + ) + ); + } + $this->container['chap3_status_code'] = $chap3_status_code; + + return $this; + } + + /** + * Gets chap4_status_code + * + * @return string|null + */ + public function getChap4StatusCode() + { + return $this->container['chap4_status_code']; + } + + /** + * Sets chap4_status_code + * + * @param string|null $chap4_status_code Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI + * + * @return self + */ + public function setChap4StatusCode($chap4_status_code) + { + $allowedValues = $this->getChap4StatusCodeAllowableValues(); + if (!is_null($chap4_status_code) && !in_array($chap4_status_code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'chap4_status_code', must be one of '%s'", + $chap4_status_code, + implode("', '", $allowedValues) + ) + ); + } + $this->container['chap4_status_code'] = $chap4_status_code; + + return $this; + } + + /** + * Gets primary_withholding_agent + * + * @return \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgent|null + */ + public function getPrimaryWithholdingAgent() + { + return $this->container['primary_withholding_agent']; + } + + /** + * Sets primary_withholding_agent + * + * @param \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgent|null $primary_withholding_agent Primary withholding agent information + * + * @return self + */ + public function setPrimaryWithholdingAgent($primary_withholding_agent) + { + $this->container['primary_withholding_agent'] = $primary_withholding_agent; + + return $this; + } + + /** + * Gets intermediary_or_flow_through + * + * @return \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThrough|null + */ + public function getIntermediaryOrFlowThrough() + { + return $this->container['intermediary_or_flow_through']; + } + + /** + * Sets intermediary_or_flow_through + * + * @param \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThrough|null $intermediary_or_flow_through Intermediary or flow-through entity information + * + * @return self + */ + public function setIntermediaryOrFlowThrough($intermediary_or_flow_through) + { + $this->container['intermediary_or_flow_through'] = $intermediary_or_flow_through; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Form type + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Form ID. Unique identifier set when the record is created. + * + * @return self + */ + public function setId($id) { - $this->container['tax_year'] = $tax_year; + $this->container['id'] = $id; return $this; } /** - * Gets federal_efile + * Gets issuer_id * - * @return bool + * @return string|null */ - public function getFederalEfile() + public function getIssuerId() { - return $this->container['federal_efile']; + return $this->container['issuer_id']; } /** - * Sets federal_efile + * Sets issuer_id * - * @param bool $federal_efile Boolean indicating that federal e-filing has been scheduled for this form + * @param string|null $issuer_id Issuer ID - only required when creating forms * * @return self */ - public function setFederalEfile($federal_efile) + public function setIssuerId($issuer_id) { - $this->container['federal_efile'] = $federal_efile; + $this->container['issuer_id'] = $issuer_id; return $this; } /** - * Gets federal_efile_status + * Gets issuer_reference_id * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getFederalEfileStatus() + public function getIssuerReferenceId() { - return $this->container['federal_efile_status']; + return $this->container['issuer_reference_id']; } /** - * Sets federal_efile_status + * Sets issuer_reference_id * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status Federal e-file status + * @param string|null $issuer_reference_id Issuer Reference ID - only required when creating forms * * @return self */ - public function setFederalEfileStatus($federal_efile_status) + public function setIssuerReferenceId($issuer_reference_id) { - $this->container['federal_efile_status'] = $federal_efile_status; + $this->container['issuer_reference_id'] = $issuer_reference_id; return $this; } /** - * Gets state_efile + * Gets issuer_tin * - * @return bool + * @return string|null */ - public function getStateEfile() + public function getIssuerTin() { - return $this->container['state_efile']; + return $this->container['issuer_tin']; } /** - * Sets state_efile + * Sets issuer_tin * - * @param bool $state_efile Boolean indicating that state e-filing has been scheduled for this form + * @param string|null $issuer_tin Issuer TIN - readonly * * @return self */ - public function setStateEfile($state_efile) + public function setIssuerTin($issuer_tin) { - $this->container['state_efile'] = $state_efile; + $this->container['issuer_tin'] = $issuer_tin; return $this; } /** - * Gets state_efile_status + * Gets tax_year * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null + * @return int|null */ - public function getStateEfileStatus() + public function getTaxYear() { - return $this->container['state_efile_status']; + return $this->container['tax_year']; } /** - * Sets state_efile_status + * Sets tax_year * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status State e-file status + * @param int|null $tax_year Tax Year - only required when creating forms * * @return self */ - public function setStateEfileStatus($state_efile_status) + public function setTaxYear($tax_year) { - - - $this->container['state_efile_status'] = $state_efile_status; + $this->container['tax_year'] = $tax_year; return $this; } /** - * Gets postal_mail + * Gets reference_id * - * @return bool + * @return string|null */ - public function getPostalMail() + public function getReferenceId() { - return $this->container['postal_mail']; + return $this->container['reference_id']; } /** - * Sets postal_mail + * Sets reference_id * - * @param bool $postal_mail Boolean indicating that postal mailing to the recipient has been scheduled for this form + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. * * @return self */ - public function setPostalMail($postal_mail) + public function setReferenceId($reference_id) { - $this->container['postal_mail'] = $postal_mail; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets postal_mail_status + * Gets tin * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getPostalMailStatus() + public function getTin() { - return $this->container['postal_mail_status']; + return $this->container['tin']; } /** - * Sets postal_mail_status + * Sets tin * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status Postal mail to recipient status + * @param string|null $tin Recipient's Federal Tax Identification Number (TIN). * * @return self */ - public function setPostalMailStatus($postal_mail_status) + public function setTin($tin) { - $this->container['postal_mail_status'] = $postal_mail_status; + $this->container['tin'] = $tin; return $this; } /** - * Gets tin_match + * Gets recipient_name * - * @return bool + * @return string */ - public function getTinMatch() + public function getRecipientName() { - return $this->container['tin_match']; + return $this->container['recipient_name']; } /** - * Sets tin_match + * Sets recipient_name * - * @param bool $tin_match Boolean indicating that TIN Matching has been scheduled for this form + * @param string $recipient_name Recipient name * * @return self */ - public function setTinMatch($tin_match) + public function setRecipientName($recipient_name) { - $this->container['tin_match'] = $tin_match; + $this->container['recipient_name'] = $recipient_name; return $this; } /** - * Gets tin_match_status + * Gets recipient_second_name * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getTinMatchStatus() + public function getRecipientSecondName() { - return $this->container['tin_match_status']; + return $this->container['recipient_second_name']; } /** - * Sets tin_match_status + * Sets recipient_second_name * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status TIN Match status + * @param string|null $recipient_second_name Recipient second name * * @return self */ - public function setTinMatchStatus($tin_match_status) + public function setRecipientSecondName($recipient_second_name) { - $this->container['tin_match_status'] = $tin_match_status; + $this->container['recipient_second_name'] = $recipient_second_name; return $this; } /** - * Gets address_verification + * Gets address * - * @return bool + * @return string */ - public function getAddressVerification() + public function getAddress() { - return $this->container['address_verification']; + return $this->container['address']; } /** - * Sets address_verification + * Sets address * - * @param bool $address_verification Boolean indicating that address verification has been scheduled for this form + * @param string $address Address. * * @return self */ - public function setAddressVerification($address_verification) + public function setAddress($address) { - $this->container['address_verification'] = $address_verification; + $this->container['address'] = $address; return $this; } /** - * Gets address_verification_status + * Gets address2 * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string|null */ - public function getAddressVerificationStatus() + public function getAddress2() { - return $this->container['address_verification_status']; + return $this->container['address2']; } /** - * Sets address_verification_status + * Sets address2 * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status Address verification status + * @param string|null $address2 Address line 2. * * @return self */ - public function setAddressVerificationStatus($address_verification_status) + public function setAddress2($address2) { - $this->container['address_verification_status'] = $address_verification_status; + $this->container['address2'] = $address2; return $this; } /** - * Gets e_delivery_status + * Gets city * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null + * @return string */ - public function getEDeliveryStatus() + public function getCity() { - return $this->container['e_delivery_status']; + return $this->container['city']; } /** - * Sets e_delivery_status + * Sets city * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status EDelivery status + * @param string $city City. * * @return self */ - public function setEDeliveryStatus($e_delivery_status) + public function setCity($city) { - $this->container['e_delivery_status'] = $e_delivery_status; + $this->container['city'] = $city; return $this; } /** - * Gets reference_id + * Gets state * * @return string|null */ - public function getReferenceId() + public function getState() { - return $this->container['reference_id']; + return $this->container['state']; } /** - * Sets reference_id + * Sets state * - * @param string|null $reference_id Reference ID + * @param string|null $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ - public function setReferenceId($reference_id) + public function setState($state) { - $this->container['reference_id'] = $reference_id; + $this->container['state'] = $state; return $this; } /** - * Gets email + * Gets zip * * @return string|null */ - public function getEmail() + public function getZip() { - return $this->container['email']; + return $this->container['zip']; } /** - * Sets email + * Sets zip * - * @param string|null $email Recipient email address + * @param string|null $zip ZIP/postal code. * * @return self */ - public function setEmail($email) + public function setZip($zip) { - $this->container['email'] = $email; + $this->container['zip'] = $zip; return $this; } /** - * Gets tin_type + * Gets email * * @return string|null */ - public function getTinType() + public function getEmail() { - return $this->container['tin_type']; + return $this->container['email']; } /** - * Sets tin_type + * Sets email * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN + * @param string|null $email Recipient's Contact email address. * * @return self */ - public function setTinType($tin_type) + public function setEmail($email) { - $this->container['tin_type'] = $tin_type; + $this->container['email'] = $email; return $this; } /** - * Gets tin + * Gets account_number * * @return string|null */ - public function getTin() + public function getAccountNumber() { - return $this->container['tin']; + return $this->container['account_number']; } /** - * Sets tin + * Sets account_number * - * @param string|null $tin Recipient Tax ID Number + * @param string|null $account_number Account number * * @return self */ - public function setTin($tin) + public function setAccountNumber($account_number) { - $this->container['tin'] = $tin; + $this->container['account_number'] = $account_number; return $this; } /** - * Gets no_tin + * Gets office_code * - * @return bool|null + * @return string|null */ - public function getNoTin() + public function getOfficeCode() { - return $this->container['no_tin']; + return $this->container['office_code']; } /** - * Sets no_tin + * Sets office_code * - * @param bool|null $no_tin Indicates whether the recipient has no TIN + * @param string|null $office_code Office code * * @return self */ - public function setNoTin($no_tin) + public function setOfficeCode($office_code) { - $this->container['no_tin'] = $no_tin; + $this->container['office_code'] = $office_code; return $this; } /** - * Gets second_tin_notice + * Gets non_us_province * - * @return bool|null + * @return string|null */ - public function getSecondTinNotice() + public function getNonUsProvince() { - return $this->container['second_tin_notice']; + return $this->container['non_us_province']; } /** - * Sets second_tin_notice + * Sets non_us_province * - * @param bool|null $second_tin_notice Second Tin Notice + * @param string|null $non_us_province Province or region for non-US/CA addresses. * * @return self */ - public function setSecondTinNotice($second_tin_notice) + public function setNonUsProvince($non_us_province) { - $this->container['second_tin_notice'] = $second_tin_notice; + $this->container['non_us_province'] = $non_us_province; return $this; } /** - * Gets recipient_name + * Gets country_code * - * @return string|null + * @return string */ - public function getRecipientName() + public function getCountryCode() { - return $this->container['recipient_name']; + return $this->container['country_code']; } /** - * Sets recipient_name + * Sets country_code * - * @param string|null $recipient_name Recipient name + * @param string $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * * @return self */ - public function setRecipientName($recipient_name) + public function setCountryCode($country_code) { - $this->container['recipient_name'] = $recipient_name; + $this->container['country_code'] = $country_code; return $this; } /** - * Gets recipient_second_name + * Gets federal_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getRecipientSecondName() + public function getFederalEfileDate() { - return $this->container['recipient_second_name']; + return $this->container['federal_efile_date']; } /** - * Sets recipient_second_name + * Sets federal_efile_date * - * @param string|null $recipient_second_name Recipient second name + * @param \DateTime|null $federal_efile_date Date when federal e-filing should be scheduled for this form * * @return self */ - public function setRecipientSecondName($recipient_second_name) + public function setFederalEfileDate($federal_efile_date) { - $this->container['recipient_second_name'] = $recipient_second_name; + $this->container['federal_efile_date'] = $federal_efile_date; return $this; } /** - * Gets address + * Gets postal_mail * - * @return string|null + * @return bool|null */ - public function getAddress() + public function getPostalMail() { - return $this->container['address']; + return $this->container['postal_mail']; } /** - * Sets address + * Sets postal_mail * - * @param string|null $address Address + * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form * * @return self */ - public function setAddress($address) + public function setPostalMail($postal_mail) { - $this->container['address'] = $address; + $this->container['postal_mail'] = $postal_mail; return $this; } /** - * Gets address2 + * Gets state_efile_date * - * @return string|null + * @return \DateTime|null */ - public function getAddress2() + public function getStateEfileDate() { - return $this->container['address2']; + return $this->container['state_efile_date']; } /** - * Sets address2 + * Sets state_efile_date * - * @param string|null $address2 Address line 2 + * @param \DateTime|null $state_efile_date Date when state e-filing should be scheduled for this form * * @return self */ - public function setAddress2($address2) + public function setStateEfileDate($state_efile_date) { - $this->container['address2'] = $address2; + $this->container['state_efile_date'] = $state_efile_date; return $this; } /** - * Gets city + * Gets recipient_edelivery_date * - * @return string|null + * @return \DateTime|null */ - public function getCity() + public function getRecipientEdeliveryDate() { - return $this->container['city']; + return $this->container['recipient_edelivery_date']; } /** - * Sets city + * Sets recipient_edelivery_date * - * @param string|null $city City + * @param \DateTime|null $recipient_edelivery_date Date when recipient e-delivery should be scheduled for this form * * @return self */ - public function setCity($city) + public function setRecipientEdeliveryDate($recipient_edelivery_date) { - $this->container['city'] = $city; + $this->container['recipient_edelivery_date'] = $recipient_edelivery_date; return $this; } /** - * Gets state + * Gets tin_match * - * @return string|null + * @return bool|null */ - public function getState() + public function getTinMatch() { - return $this->container['state']; + return $this->container['tin_match']; } /** - * Sets state + * Sets tin_match * - * @param string|null $state US state + * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form * * @return self */ - public function setState($state) + public function setTinMatch($tin_match) { - $this->container['state'] = $state; + $this->container['tin_match'] = $tin_match; return $this; } /** - * Gets zip + * Gets no_tin * - * @return string|null + * @return bool|null */ - public function getZip() + public function getNoTin() { - return $this->container['zip']; + return $this->container['no_tin']; } /** - * Sets zip + * Sets no_tin * - * @param string|null $zip Zip/postal code + * @param bool|null $no_tin No TIN indicator * * @return self */ - public function setZip($zip) + public function setNoTin($no_tin) { - $this->container['zip'] = $zip; + $this->container['no_tin'] = $no_tin; return $this; } /** - * Gets non_us_province + * Gets address_verification * - * @return string|null + * @return bool|null */ - public function getNonUsProvince() + public function getAddressVerification() { - return $this->container['non_us_province']; + return $this->container['address_verification']; } /** - * Sets non_us_province + * Sets address_verification * - * @param string|null $non_us_province Foreign province + * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form * * @return self */ - public function setNonUsProvince($non_us_province) + public function setAddressVerification($address_verification) { - $this->container['non_us_province'] = $non_us_province; + $this->container['address_verification'] = $address_verification; return $this; } /** - * Gets country_code + * Gets state_and_local_withholding * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null */ - public function getCountryCode() + public function getStateAndLocalWithholding() { - return $this->container['country_code']; + return $this->container['state_and_local_withholding']; } /** - * Sets country_code + * Sets state_and_local_withholding * - * @param string|null $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes + * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholding|null $state_and_local_withholding State and local withholding information * * @return self */ - public function setCountryCode($country_code) + public function setStateAndLocalWithholding($state_and_local_withholding) { - $this->container['country_code'] = $country_code; + $this->container['state_and_local_withholding'] = $state_and_local_withholding; return $this; } /** - * Gets account_number + * Gets second_tin_notice * - * @return string|null + * @return bool|null */ - public function getAccountNumber() + public function getSecondTinNotice() { - return $this->container['account_number']; + return $this->container['second_tin_notice']; } /** - * Sets account_number + * Sets second_tin_notice * - * @param string|null $account_number Account Number + * @param bool|null $second_tin_notice Second TIN notice * * @return self */ - public function setAccountNumber($account_number) + public function setSecondTinNotice($second_tin_notice) { - $this->container['account_number'] = $account_number; + $this->container['second_tin_notice'] = $second_tin_notice; return $this; } /** - * Gets office_code + * Gets federal_efile_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getOfficeCode() + public function getFederalEfileStatus() { - return $this->container['office_code']; + return $this->container['federal_efile_status']; } /** - * Sets office_code + * Sets federal_efile_status * - * @param string|null $office_code Office Code + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $federal_efile_status Federal e-file status * * @return self */ - public function setOfficeCode($office_code) + public function setFederalEfileStatus($federal_efile_status) { - $this->container['office_code'] = $office_code; + $this->container['federal_efile_status'] = $federal_efile_status; return $this; } /** - * Gets fatca_filing_requirement + * Gets state_efile_status * - * @return bool|null + * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null */ - public function getFatcaFilingRequirement() + public function getStateEfileStatus() { - return $this->container['fatca_filing_requirement']; + return $this->container['state_efile_status']; } /** - * Sets fatca_filing_requirement + * Sets state_efile_status * - * @param bool|null $fatca_filing_requirement FATCA filing requirement + * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetail[]|null $state_efile_status State e-file status * * @return self */ - public function setFatcaFilingRequirement($fatca_filing_requirement) + public function setStateEfileStatus($state_efile_status) { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; + + + $this->container['state_efile_status'] = $state_efile_status; return $this; } /** - * Gets validation_errors + * Gets postal_mail_status * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getValidationErrors() + public function getPostalMailStatus() { - return $this->container['validation_errors']; + return $this->container['postal_mail_status']; } /** - * Sets validation_errors + * Sets postal_mail_status * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors Validation errors + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $postal_mail_status Postal mail to recipient status * * @return self */ - public function setValidationErrors($validation_errors) + public function setPostalMailStatus($postal_mail_status) { - - - $this->container['validation_errors'] = $validation_errors; + $this->container['postal_mail_status'] = $postal_mail_status; return $this; } /** - * Gets created_at + * Gets tin_match_status * - * @return \DateTime|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getCreatedAt() + public function getTinMatchStatus() { - return $this->container['created_at']; + return $this->container['tin_match_status']; } /** - * Sets created_at + * Sets tin_match_status * - * @param \DateTime|null $created_at Creation time + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $tin_match_status TIN Match status * * @return self */ - public function setCreatedAt($created_at) + public function setTinMatchStatus($tin_match_status) { - $this->container['created_at'] = $created_at; + $this->container['tin_match_status'] = $tin_match_status; return $this; } /** - * Gets updated_at + * Gets address_verification_status * - * @return \DateTime|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getUpdatedAt() + public function getAddressVerificationStatus() { - return $this->container['updated_at']; + return $this->container['address_verification_status']; } /** - * Sets updated_at + * Sets address_verification_status * - * @param \DateTime|null $updated_at Update time + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $address_verification_status Address verification status * * @return self */ - public function setUpdatedAt($updated_at) + public function setAddressVerificationStatus($address_verification_status) { - $this->container['updated_at'] = $updated_at; + $this->container['address_verification_status'] = $address_verification_status; return $this; } /** - * Gets state_and_local_withholding + * Gets e_delivery_status * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null + * @return \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null */ - public function getStateAndLocalWithholding() + public function getEDeliveryStatus() { - return $this->container['state_and_local_withholding']; + return $this->container['e_delivery_status']; } /** - * Sets state_and_local_withholding + * Sets e_delivery_status * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding + * @param \Avalara\SDK\Model\A1099\V2\Form1099StatusDetail|null $e_delivery_status EDelivery status * * @return self */ - public function setStateAndLocalWithholding($state_and_local_withholding) + public function setEDeliveryStatus($e_delivery_status) { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; + $this->container['e_delivery_status'] = $e_delivery_status; return $this; } /** - * Gets unique_form_id + * Gets validation_errors * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\ValidationError[]|null */ - public function getUniqueFormId() + public function getValidationErrors() { - return $this->container['unique_form_id']; + return $this->container['validation_errors']; } /** - * Sets unique_form_id + * Sets validation_errors * - * @param string|null $unique_form_id Unique form identifier + * @param \Avalara\SDK\Model\A1099\V2\ValidationError[]|null $validation_errors Validation errors * * @return self */ - public function setUniqueFormId($unique_form_id) + public function setValidationErrors($validation_errors) { - $this->container['unique_form_id'] = $unique_form_id; + + + $this->container['validation_errors'] = $validation_errors; return $this; } /** - * Gets recipient_date_of_birth + * Gets created_at * * @return \DateTime|null */ - public function getRecipientDateOfBirth() + public function getCreatedAt() { - return $this->container['recipient_date_of_birth']; + return $this->container['created_at']; } /** - * Sets recipient_date_of_birth + * Sets created_at * - * @param \DateTime|null $recipient_date_of_birth Recipient's date of birth + * @param \DateTime|null $created_at Date time when the record was created. * * @return self */ - public function setRecipientDateOfBirth($recipient_date_of_birth) + public function setCreatedAt($created_at) { - $this->container['recipient_date_of_birth'] = $recipient_date_of_birth; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets recipient_giin + * Gets updated_at * - * @return string|null + * @return \DateTime|null */ - public function getRecipientGiin() + public function getUpdatedAt() { - return $this->container['recipient_giin']; + return $this->container['updated_at']; } /** - * Sets recipient_giin + * Sets updated_at * - * @param string|null $recipient_giin Recipient's GIIN (Global Intermediary Identification Number) + * @param \DateTime|null $updated_at Date time when the record was last updated. * * @return self */ - public function setRecipientGiin($recipient_giin) + public function setUpdatedAt($updated_at) { - $this->container['recipient_giin'] = $recipient_giin; + $this->container['updated_at'] = $updated_at; return $this; } /** - * Gets recipient_foreign_tin + * Gets employee_first_name * - * @return string|null + * @return string */ - public function getRecipientForeignTin() + public function getEmployeeFirstName() { - return $this->container['recipient_foreign_tin']; + return $this->container['employee_first_name']; } /** - * Sets recipient_foreign_tin + * Sets employee_first_name * - * @param string|null $recipient_foreign_tin Recipient's foreign TIN + * @param string $employee_first_name Employee's first name * * @return self */ - public function setRecipientForeignTin($recipient_foreign_tin) + public function setEmployeeFirstName($employee_first_name) { - $this->container['recipient_foreign_tin'] = $recipient_foreign_tin; + $this->container['employee_first_name'] = $employee_first_name; return $this; } /** - * Gets lob_code + * Gets employee_middle_name * * @return string|null */ - public function getLobCode() + public function getEmployeeMiddleName() { - return $this->container['lob_code']; + return $this->container['employee_middle_name']; } /** - * Sets lob_code + * Sets employee_middle_name * - * @param string|null $lob_code Limitation on benefits code + * @param string|null $employee_middle_name Employee's middle name * * @return self */ - public function setLobCode($lob_code) + public function setEmployeeMiddleName($employee_middle_name) { - $this->container['lob_code'] = $lob_code; + $this->container['employee_middle_name'] = $employee_middle_name; return $this; } /** - * Gets income_code + * Gets employee_last_name * - * @return string|null + * @return string */ - public function getIncomeCode() + public function getEmployeeLastName() { - return $this->container['income_code']; + return $this->container['employee_last_name']; } /** - * Sets income_code + * Sets employee_last_name * - * @param string|null $income_code Income code + * @param string $employee_last_name Employee's last name * * @return self */ - public function setIncomeCode($income_code) + public function setEmployeeLastName($employee_last_name) { - $this->container['income_code'] = $income_code; + $this->container['employee_last_name'] = $employee_last_name; return $this; } /** - * Gets gross_income + * Gets employee_name_suffix * - * @return float|null + * @return string|null */ - public function getGrossIncome() + public function getEmployeeNameSuffix() { - return $this->container['gross_income']; + return $this->container['employee_name_suffix']; } /** - * Sets gross_income + * Sets employee_name_suffix * - * @param float|null $gross_income Gross income + * @param string|null $employee_name_suffix Employee's name suffix * * @return self */ - public function setGrossIncome($gross_income) + public function setEmployeeNameSuffix($employee_name_suffix) { - $this->container['gross_income'] = $gross_income; + $this->container['employee_name_suffix'] = $employee_name_suffix; return $this; } /** - * Gets withholding_indicator + * Gets employee_date_of_birth * - * @return string|null + * @return \DateTime|null */ - public function getWithholdingIndicator() + public function getEmployeeDateOfBirth() { - return $this->container['withholding_indicator']; + return $this->container['employee_date_of_birth']; } /** - * Sets withholding_indicator + * Sets employee_date_of_birth * - * @param string|null $withholding_indicator Withholding indicator + * @param \DateTime|null $employee_date_of_birth Employee's date of birth * * @return self */ - public function setWithholdingIndicator($withholding_indicator) + public function setEmployeeDateOfBirth($employee_date_of_birth) { - $this->container['withholding_indicator'] = $withholding_indicator; + $this->container['employee_date_of_birth'] = $employee_date_of_birth; return $this; } /** - * Gets tax_country_code + * Gets origin_of_health_coverage_code * - * @return string|null + * @return string */ - public function getTaxCountryCode() + public function getOriginOfHealthCoverageCode() { - return $this->container['tax_country_code']; + return $this->container['origin_of_health_coverage_code']; } /** - * Sets tax_country_code + * Sets origin_of_health_coverage_code * - * @param string|null $tax_country_code Country code + * @param string $origin_of_health_coverage_code Origin of health coverage code Available values: - A: Small Business Health Options Program (SHOP) - B: Employer-sponsored coverage - C: Government-sponsored program - D: Individual market insurance - E: Multiemployer plan - F: Other designated minimum essential coverage - G: Employer-sponsored coverage that is an individual coverage HRA (valid for tax years 2020 and later) * * @return self */ - public function setTaxCountryCode($tax_country_code) + public function setOriginOfHealthCoverageCode($origin_of_health_coverage_code) { - $this->container['tax_country_code'] = $tax_country_code; + $allowedValues = $this->getOriginOfHealthCoverageCodeAllowableValues(); + if (!in_array($origin_of_health_coverage_code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'origin_of_health_coverage_code', must be one of '%s'", + $origin_of_health_coverage_code, + implode("', '", $allowedValues) + ) + ); + } + $this->container['origin_of_health_coverage_code'] = $origin_of_health_coverage_code; return $this; } /** - * Gets exemption_code_chap3 + * Gets covered_individuals * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\CoveredIndividual[]|null */ - public function getExemptionCodeChap3() + public function getCoveredIndividuals() { - return $this->container['exemption_code_chap3']; + return $this->container['covered_individuals']; } /** - * Sets exemption_code_chap3 + * Sets covered_individuals * - * @param string|null $exemption_code_chap3 Exemption code (Chapter 3) + * @param \Avalara\SDK\Model\A1099\V2\CoveredIndividual[]|null $covered_individuals Covered individuals information * * @return self */ - public function setExemptionCodeChap3($exemption_code_chap3) + public function setCoveredIndividuals($covered_individuals) { - $this->container['exemption_code_chap3'] = $exemption_code_chap3; + + + $this->container['covered_individuals'] = $covered_individuals; return $this; } /** - * Gets exemption_code_chap4 + * Gets plan_start_month * - * @return string|null + * @return string */ - public function getExemptionCodeChap4() + public function getPlanStartMonth() { - return $this->container['exemption_code_chap4']; + return $this->container['plan_start_month']; } /** - * Sets exemption_code_chap4 + * Sets plan_start_month * - * @param string|null $exemption_code_chap4 Exemption code (Chapter 4) + * @param string $plan_start_month Plan start month. The calendar month during which the plan year begins of the health plan in which the employee is offered coverage (or would be offered coverage if the employee were eligible to participate in the plan). Available values: - 00: None - 01: January - 02: February - 03: March - 04: April - 05: May - 06: June - 07: July - 08: August - 09: September - 10: October - 11: November - 12: December * * @return self */ - public function setExemptionCodeChap4($exemption_code_chap4) + public function setPlanStartMonth($plan_start_month) { - $this->container['exemption_code_chap4'] = $exemption_code_chap4; + $allowedValues = $this->getPlanStartMonthAllowableValues(); + if (!in_array($plan_start_month, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'plan_start_month', must be one of '%s'", + $plan_start_month, + implode("', '", $allowedValues) + ) + ); + } + $this->container['plan_start_month'] = $plan_start_month; return $this; } /** - * Gets tax_rate_chap3 + * Gets employer_provided_si_coverage * - * @return string|null + * @return bool|null */ - public function getTaxRateChap3() + public function getEmployerProvidedSiCoverage() { - return $this->container['tax_rate_chap3']; + return $this->container['employer_provided_si_coverage']; } /** - * Sets tax_rate_chap3 + * Sets employer_provided_si_coverage * - * @param string|null $tax_rate_chap3 Tax rate (Chapter 3) + * @param bool|null $employer_provided_si_coverage Employer provided self-insured coverage * * @return self */ - public function setTaxRateChap3($tax_rate_chap3) + public function setEmployerProvidedSiCoverage($employer_provided_si_coverage) { - $this->container['tax_rate_chap3'] = $tax_rate_chap3; + $this->container['employer_provided_si_coverage'] = $employer_provided_si_coverage; return $this; } /** - * Gets withholding_allowance + * Gets offer_and_coverages * - * @return float|null + * @return \Avalara\SDK\Model\A1099\V2\OfferAndCoverage[] */ - public function getWithholdingAllowance() + public function getOfferAndCoverages() { - return $this->container['withholding_allowance']; + return $this->container['offer_and_coverages']; } /** - * Sets withholding_allowance + * Sets offer_and_coverages * - * @param float|null $withholding_allowance Withholding allowance + * @param \Avalara\SDK\Model\A1099\V2\OfferAndCoverage[] $offer_and_coverages Offer and coverage information * * @return self */ - public function setWithholdingAllowance($withholding_allowance) + public function setOfferAndCoverages($offer_and_coverages) { - $this->container['withholding_allowance'] = $withholding_allowance; + + + $this->container['offer_and_coverages'] = $offer_and_coverages; return $this; } /** - * Gets federal_tax_withheld + * Gets total_ordinary_dividends * * @return float|null */ - public function getFederalTaxWithheld() + public function getTotalOrdinaryDividends() { - return $this->container['federal_tax_withheld']; + return $this->container['total_ordinary_dividends']; } /** - * Sets federal_tax_withheld + * Sets total_ordinary_dividends * - * @param float|null $federal_tax_withheld Federal tax withheld + * @param float|null $total_ordinary_dividends Total ordinary dividends * * @return self */ - public function setFederalTaxWithheld($federal_tax_withheld) + public function setTotalOrdinaryDividends($total_ordinary_dividends) { - $this->container['federal_tax_withheld'] = $federal_tax_withheld; + $this->container['total_ordinary_dividends'] = $total_ordinary_dividends; return $this; } /** - * Gets tax_not_deposited_indicator + * Gets qualified_dividends * - * @return bool|null + * @return float|null */ - public function getTaxNotDepositedIndicator() + public function getQualifiedDividends() { - return $this->container['tax_not_deposited_indicator']; + return $this->container['qualified_dividends']; } /** - * Sets tax_not_deposited_indicator + * Sets qualified_dividends * - * @param bool|null $tax_not_deposited_indicator Tax not deposited indicator + * @param float|null $qualified_dividends Qualified dividends * * @return self */ - public function setTaxNotDepositedIndicator($tax_not_deposited_indicator) + public function setQualifiedDividends($qualified_dividends) { - $this->container['tax_not_deposited_indicator'] = $tax_not_deposited_indicator; + $this->container['qualified_dividends'] = $qualified_dividends; return $this; } /** - * Gets academic_indicator + * Gets total_capital_gain_distributions * - * @return bool|null + * @return float|null */ - public function getAcademicIndicator() + public function getTotalCapitalGainDistributions() { - return $this->container['academic_indicator']; + return $this->container['total_capital_gain_distributions']; } /** - * Sets academic_indicator + * Sets total_capital_gain_distributions * - * @param bool|null $academic_indicator Academic indicator + * @param float|null $total_capital_gain_distributions Total capital gain distributions * * @return self */ - public function setAcademicIndicator($academic_indicator) + public function setTotalCapitalGainDistributions($total_capital_gain_distributions) { - $this->container['academic_indicator'] = $academic_indicator; + $this->container['total_capital_gain_distributions'] = $total_capital_gain_distributions; return $this; } /** - * Gets tax_withheld_other_agents + * Gets unrecaptured_section1250_gain * * @return float|null */ - public function getTaxWithheldOtherAgents() + public function getUnrecapturedSection1250Gain() { - return $this->container['tax_withheld_other_agents']; + return $this->container['unrecaptured_section1250_gain']; } /** - * Sets tax_withheld_other_agents + * Sets unrecaptured_section1250_gain * - * @param float|null $tax_withheld_other_agents Tax withheld by other agents + * @param float|null $unrecaptured_section1250_gain Unrecaptured Section 1250 gain * * @return self */ - public function setTaxWithheldOtherAgents($tax_withheld_other_agents) + public function setUnrecapturedSection1250Gain($unrecaptured_section1250_gain) { - $this->container['tax_withheld_other_agents'] = $tax_withheld_other_agents; + $this->container['unrecaptured_section1250_gain'] = $unrecaptured_section1250_gain; return $this; } /** - * Gets amount_repaid + * Gets section1202_gain * * @return float|null */ - public function getAmountRepaid() + public function getSection1202Gain() { - return $this->container['amount_repaid']; + return $this->container['section1202_gain']; } /** - * Sets amount_repaid + * Sets section1202_gain * - * @param float|null $amount_repaid Amount repaid to recipient + * @param float|null $section1202_gain Section 1202 gain * * @return self */ - public function setAmountRepaid($amount_repaid) + public function setSection1202Gain($section1202_gain) { - $this->container['amount_repaid'] = $amount_repaid; + $this->container['section1202_gain'] = $section1202_gain; return $this; } /** - * Gets tax_paid_agent + * Gets collectibles_gain * * @return float|null */ - public function getTaxPaidAgent() + public function getCollectiblesGain() { - return $this->container['tax_paid_agent']; + return $this->container['collectibles_gain']; } /** - * Sets tax_paid_agent + * Sets collectibles_gain * - * @param float|null $tax_paid_agent Tax paid by withholding agent + * @param float|null $collectibles_gain Collectibles (28%) gain * * @return self */ - public function setTaxPaidAgent($tax_paid_agent) + public function setCollectiblesGain($collectibles_gain) { - $this->container['tax_paid_agent'] = $tax_paid_agent; + $this->container['collectibles_gain'] = $collectibles_gain; return $this; } /** - * Gets chap3_status_code + * Gets section897_ordinary_dividends * - * @return string|null + * @return float|null */ - public function getChap3StatusCode() + public function getSection897OrdinaryDividends() { - return $this->container['chap3_status_code']; + return $this->container['section897_ordinary_dividends']; } /** - * Sets chap3_status_code + * Sets section897_ordinary_dividends * - * @param string|null $chap3_status_code Chapter 3 status code + * @param float|null $section897_ordinary_dividends Section 897 ordinary dividends * * @return self */ - public function setChap3StatusCode($chap3_status_code) + public function setSection897OrdinaryDividends($section897_ordinary_dividends) { - $this->container['chap3_status_code'] = $chap3_status_code; + $this->container['section897_ordinary_dividends'] = $section897_ordinary_dividends; return $this; } /** - * Gets chap4_status_code + * Gets section897_capital_gain * - * @return string|null + * @return float|null */ - public function getChap4StatusCode() + public function getSection897CapitalGain() { - return $this->container['chap4_status_code']; + return $this->container['section897_capital_gain']; } /** - * Sets chap4_status_code + * Sets section897_capital_gain * - * @param string|null $chap4_status_code Chapter 4 status code + * @param float|null $section897_capital_gain Section 897 capital gain * * @return self */ - public function setChap4StatusCode($chap4_status_code) + public function setSection897CapitalGain($section897_capital_gain) { - $this->container['chap4_status_code'] = $chap4_status_code; + $this->container['section897_capital_gain'] = $section897_capital_gain; return $this; } /** - * Gets primary_withholding_agent + * Gets nondividend_distributions * - * @return \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentResponse|null + * @return float|null */ - public function getPrimaryWithholdingAgent() + public function getNondividendDistributions() { - return $this->container['primary_withholding_agent']; + return $this->container['nondividend_distributions']; } /** - * Sets primary_withholding_agent + * Sets nondividend_distributions * - * @param \Avalara\SDK\Model\A1099\V2\PrimaryWithholdingAgentResponse|null $primary_withholding_agent Primary withholding agent information + * @param float|null $nondividend_distributions Nondividend distributions * * @return self */ - public function setPrimaryWithholdingAgent($primary_withholding_agent) + public function setNondividendDistributions($nondividend_distributions) { - $this->container['primary_withholding_agent'] = $primary_withholding_agent; + $this->container['nondividend_distributions'] = $nondividend_distributions; return $this; } /** - * Gets intermediary_or_flow_through + * Gets federal_income_tax_withheld * - * @return \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughResponse|null + * @return float|null */ - public function getIntermediaryOrFlowThrough() + public function getFederalIncomeTaxWithheld() { - return $this->container['intermediary_or_flow_through']; + return $this->container['federal_income_tax_withheld']; } /** - * Sets intermediary_or_flow_through + * Sets federal_income_tax_withheld * - * @param \Avalara\SDK\Model\A1099\V2\IntermediaryOrFlowThroughResponse|null $intermediary_or_flow_through Intermediary or flow-through entity information + * @param float|null $federal_income_tax_withheld Federal income tax withheld * * @return self */ - public function setIntermediaryOrFlowThrough($intermediary_or_flow_through) + public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) { - $this->container['intermediary_or_flow_through'] = $intermediary_or_flow_through; + $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; return $this; } /** - * Gets origin_of_health_coverage_code + * Gets section199_a_dividends * - * @return string|null + * @return float|null */ - public function getOriginOfHealthCoverageCode() + public function getSection199ADividends() { - return $this->container['origin_of_health_coverage_code']; + return $this->container['section199_a_dividends']; } /** - * Sets origin_of_health_coverage_code + * Sets section199_a_dividends * - * @param string|null $origin_of_health_coverage_code Origin of health coverage code + * @param float|null $section199_a_dividends Section 199A dividends * * @return self */ - public function setOriginOfHealthCoverageCode($origin_of_health_coverage_code) + public function setSection199ADividends($section199_a_dividends) { - $this->container['origin_of_health_coverage_code'] = $origin_of_health_coverage_code; + $this->container['section199_a_dividends'] = $section199_a_dividends; return $this; } /** - * Gets covered_individuals + * Gets investment_expenses * - * @return \Avalara\SDK\Model\A1099\V2\CoveredIndividualReferenceResponse[]|null + * @return float|null */ - public function getCoveredIndividuals() + public function getInvestmentExpenses() { - return $this->container['covered_individuals']; + return $this->container['investment_expenses']; } /** - * Sets covered_individuals + * Sets investment_expenses * - * @param \Avalara\SDK\Model\A1099\V2\CoveredIndividualReferenceResponse[]|null $covered_individuals Covered individuals information + * @param float|null $investment_expenses Investment Expenses * * @return self */ - public function setCoveredIndividuals($covered_individuals) + public function setInvestmentExpenses($investment_expenses) { - - - $this->container['covered_individuals'] = $covered_individuals; + $this->container['investment_expenses'] = $investment_expenses; return $this; } /** - * Gets total_ordinary_dividends + * Gets foreign_tax_paid * - * @return string|null + * @return float|null */ - public function getTotalOrdinaryDividends() + public function getForeignTaxPaid() { - return $this->container['total_ordinary_dividends']; + return $this->container['foreign_tax_paid']; } /** - * Sets total_ordinary_dividends + * Sets foreign_tax_paid * - * @param string|null $total_ordinary_dividends Total ordinary dividends + * @param float|null $foreign_tax_paid Foreign tax paid * * @return self */ - public function setTotalOrdinaryDividends($total_ordinary_dividends) + public function setForeignTaxPaid($foreign_tax_paid) { - $this->container['total_ordinary_dividends'] = $total_ordinary_dividends; + $this->container['foreign_tax_paid'] = $foreign_tax_paid; return $this; } /** - * Gets qualified_dividends + * Gets foreign_country_or_us_possession * * @return string|null */ - public function getQualifiedDividends() + public function getForeignCountryOrUsPossession() { - return $this->container['qualified_dividends']; + return $this->container['foreign_country_or_us_possession']; } /** - * Sets qualified_dividends + * Sets foreign_country_or_us_possession * - * @param string|null $qualified_dividends Qualified dividends + * @param string|null $foreign_country_or_us_possession Foreign country or U.S. possession * * @return self */ - public function setQualifiedDividends($qualified_dividends) + public function setForeignCountryOrUsPossession($foreign_country_or_us_possession) { - $this->container['qualified_dividends'] = $qualified_dividends; + $this->container['foreign_country_or_us_possession'] = $foreign_country_or_us_possession; return $this; } /** - * Gets total_capital_gain_distributions + * Gets cash_liquidation_distributions * - * @return string|null + * @return float|null */ - public function getTotalCapitalGainDistributions() + public function getCashLiquidationDistributions() { - return $this->container['total_capital_gain_distributions']; + return $this->container['cash_liquidation_distributions']; } /** - * Sets total_capital_gain_distributions + * Sets cash_liquidation_distributions * - * @param string|null $total_capital_gain_distributions Total capital gain distributions + * @param float|null $cash_liquidation_distributions Cash liquidation distributions * * @return self */ - public function setTotalCapitalGainDistributions($total_capital_gain_distributions) + public function setCashLiquidationDistributions($cash_liquidation_distributions) { - $this->container['total_capital_gain_distributions'] = $total_capital_gain_distributions; + $this->container['cash_liquidation_distributions'] = $cash_liquidation_distributions; return $this; } /** - * Gets unrecaptured_section1250_gain + * Gets noncash_liquidation_distributions * - * @return string|null + * @return float|null */ - public function getUnrecapturedSection1250Gain() + public function getNoncashLiquidationDistributions() { - return $this->container['unrecaptured_section1250_gain']; + return $this->container['noncash_liquidation_distributions']; } /** - * Sets unrecaptured_section1250_gain + * Sets noncash_liquidation_distributions * - * @param string|null $unrecaptured_section1250_gain Unrecaptured Section 1250 gain + * @param float|null $noncash_liquidation_distributions Noncash liquidation distributions * * @return self */ - public function setUnrecapturedSection1250Gain($unrecaptured_section1250_gain) + public function setNoncashLiquidationDistributions($noncash_liquidation_distributions) { - $this->container['unrecaptured_section1250_gain'] = $unrecaptured_section1250_gain; + $this->container['noncash_liquidation_distributions'] = $noncash_liquidation_distributions; return $this; } /** - * Gets section1202_gain + * Gets exempt_interest_dividends * - * @return string|null + * @return float|null */ - public function getSection1202Gain() + public function getExemptInterestDividends() { - return $this->container['section1202_gain']; + return $this->container['exempt_interest_dividends']; } /** - * Sets section1202_gain + * Sets exempt_interest_dividends * - * @param string|null $section1202_gain Section 1202 gain + * @param float|null $exempt_interest_dividends Exempt-interest dividends * * @return self */ - public function setSection1202Gain($section1202_gain) + public function setExemptInterestDividends($exempt_interest_dividends) { - $this->container['section1202_gain'] = $section1202_gain; + $this->container['exempt_interest_dividends'] = $exempt_interest_dividends; return $this; } /** - * Gets collectibles_gain + * Gets specified_private_activity_bond_interest_dividends * - * @return string|null + * @return float|null */ - public function getCollectiblesGain() + public function getSpecifiedPrivateActivityBondInterestDividends() { - return $this->container['collectibles_gain']; + return $this->container['specified_private_activity_bond_interest_dividends']; } /** - * Sets collectibles_gain + * Sets specified_private_activity_bond_interest_dividends * - * @param string|null $collectibles_gain Collectibles (28%) gain + * @param float|null $specified_private_activity_bond_interest_dividends Specified private activity bond interest dividends * * @return self */ - public function setCollectiblesGain($collectibles_gain) + public function setSpecifiedPrivateActivityBondInterestDividends($specified_private_activity_bond_interest_dividends) { - $this->container['collectibles_gain'] = $collectibles_gain; + $this->container['specified_private_activity_bond_interest_dividends'] = $specified_private_activity_bond_interest_dividends; return $this; } /** - * Gets section897_ordinary_dividends + * Gets fatca_filing_requirement * - * @return string|null + * @return bool|null */ - public function getSection897OrdinaryDividends() + public function getFatcaFilingRequirement() { - return $this->container['section897_ordinary_dividends']; + return $this->container['fatca_filing_requirement']; } /** - * Sets section897_ordinary_dividends + * Sets fatca_filing_requirement * - * @param string|null $section897_ordinary_dividends Section 897 ordinary dividends + * @param bool|null $fatca_filing_requirement FATCA filing requirement * * @return self */ - public function setSection897OrdinaryDividends($section897_ordinary_dividends) + public function setFatcaFilingRequirement($fatca_filing_requirement) { - $this->container['section897_ordinary_dividends'] = $section897_ordinary_dividends; + $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; return $this; } /** - * Gets section897_capital_gain + * Gets interest_income * - * @return string|null + * @return float|null */ - public function getSection897CapitalGain() + public function getInterestIncome() { - return $this->container['section897_capital_gain']; + return $this->container['interest_income']; } /** - * Sets section897_capital_gain + * Sets interest_income * - * @param string|null $section897_capital_gain Section 897 capital gain + * @param float|null $interest_income Interest Income * * @return self */ - public function setSection897CapitalGain($section897_capital_gain) + public function setInterestIncome($interest_income) { - $this->container['section897_capital_gain'] = $section897_capital_gain; + $this->container['interest_income'] = $interest_income; return $this; } /** - * Gets nondividend_distributions + * Gets early_withdrawal_penalty * - * @return string|null + * @return float|null */ - public function getNondividendDistributions() + public function getEarlyWithdrawalPenalty() { - return $this->container['nondividend_distributions']; + return $this->container['early_withdrawal_penalty']; } /** - * Sets nondividend_distributions + * Sets early_withdrawal_penalty * - * @param string|null $nondividend_distributions Nondividend distributions + * @param float|null $early_withdrawal_penalty Early Withdrawal Penalty * * @return self */ - public function setNondividendDistributions($nondividend_distributions) + public function setEarlyWithdrawalPenalty($early_withdrawal_penalty) { - $this->container['nondividend_distributions'] = $nondividend_distributions; + $this->container['early_withdrawal_penalty'] = $early_withdrawal_penalty; return $this; } /** - * Gets federal_income_tax_withheld + * Gets us_savings_bonds_interest * * @return float|null */ - public function getFederalIncomeTaxWithheld() + public function getUsSavingsBondsInterest() { - return $this->container['federal_income_tax_withheld']; + return $this->container['us_savings_bonds_interest']; } /** - * Sets federal_income_tax_withheld + * Sets us_savings_bonds_interest * - * @param float|null $federal_income_tax_withheld Federal income tax withheld + * @param float|null $us_savings_bonds_interest Interest on U.S. Savings Bonds and Treasury obligations * * @return self */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) + public function setUsSavingsBondsInterest($us_savings_bonds_interest) { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; + $this->container['us_savings_bonds_interest'] = $us_savings_bonds_interest; return $this; } /** - * Gets section199_a_dividends + * Gets foreign_country * * @return string|null */ - public function getSection199ADividends() + public function getForeignCountry() { - return $this->container['section199_a_dividends']; + return $this->container['foreign_country']; } /** - * Sets section199_a_dividends + * Sets foreign_country * - * @param string|null $section199_a_dividends Section 199A dividends + * @param string|null $foreign_country Foreign country or U.S. possession * * @return self */ - public function setSection199ADividends($section199_a_dividends) + public function setForeignCountry($foreign_country) { - $this->container['section199_a_dividends'] = $section199_a_dividends; + $this->container['foreign_country'] = $foreign_country; return $this; } /** - * Gets investment_expenses + * Gets tax_exempt_interest * - * @return string|null + * @return float|null */ - public function getInvestmentExpenses() + public function getTaxExemptInterest() { - return $this->container['investment_expenses']; + return $this->container['tax_exempt_interest']; } /** - * Sets investment_expenses + * Sets tax_exempt_interest * - * @param string|null $investment_expenses Investment expenses + * @param float|null $tax_exempt_interest Tax-Exempt Interest * * @return self */ - public function setInvestmentExpenses($investment_expenses) + public function setTaxExemptInterest($tax_exempt_interest) { - $this->container['investment_expenses'] = $investment_expenses; + $this->container['tax_exempt_interest'] = $tax_exempt_interest; return $this; } /** - * Gets foreign_tax_paid + * Gets specified_private_activity_bond_interest * - * @return string|null + * @return float|null */ - public function getForeignTaxPaid() + public function getSpecifiedPrivateActivityBondInterest() { - return $this->container['foreign_tax_paid']; + return $this->container['specified_private_activity_bond_interest']; } /** - * Sets foreign_tax_paid + * Sets specified_private_activity_bond_interest * - * @param string|null $foreign_tax_paid Foreign tax paid + * @param float|null $specified_private_activity_bond_interest Specified Private activity * * @return self */ - public function setForeignTaxPaid($foreign_tax_paid) + public function setSpecifiedPrivateActivityBondInterest($specified_private_activity_bond_interest) { - $this->container['foreign_tax_paid'] = $foreign_tax_paid; + $this->container['specified_private_activity_bond_interest'] = $specified_private_activity_bond_interest; return $this; } /** - * Gets foreign_country_or_us_possession + * Gets market_discount * - * @return string|null + * @return float|null */ - public function getForeignCountryOrUsPossession() + public function getMarketDiscount() { - return $this->container['foreign_country_or_us_possession']; + return $this->container['market_discount']; } /** - * Sets foreign_country_or_us_possession + * Sets market_discount * - * @param string|null $foreign_country_or_us_possession Foreign country or U.S. possession + * @param float|null $market_discount Market Discount * * @return self */ - public function setForeignCountryOrUsPossession($foreign_country_or_us_possession) + public function setMarketDiscount($market_discount) { - $this->container['foreign_country_or_us_possession'] = $foreign_country_or_us_possession; + $this->container['market_discount'] = $market_discount; return $this; } /** - * Gets cash_liquidation_distributions + * Gets bond_premium * - * @return string|null + * @return float|null */ - public function getCashLiquidationDistributions() + public function getBondPremium() { - return $this->container['cash_liquidation_distributions']; + return $this->container['bond_premium']; } /** - * Sets cash_liquidation_distributions + * Sets bond_premium * - * @param string|null $cash_liquidation_distributions Cash liquidation distributions + * @param float|null $bond_premium Bond Premium * * @return self */ - public function setCashLiquidationDistributions($cash_liquidation_distributions) + public function setBondPremium($bond_premium) { - $this->container['cash_liquidation_distributions'] = $cash_liquidation_distributions; + $this->container['bond_premium'] = $bond_premium; return $this; } /** - * Gets noncash_liquidation_distributions + * Gets bond_premium_on_treasury_obligations * - * @return string|null + * @return float|null */ - public function getNoncashLiquidationDistributions() + public function getBondPremiumOnTreasuryObligations() { - return $this->container['noncash_liquidation_distributions']; + return $this->container['bond_premium_on_treasury_obligations']; } /** - * Sets noncash_liquidation_distributions + * Sets bond_premium_on_treasury_obligations * - * @param string|null $noncash_liquidation_distributions Noncash liquidation distributions + * @param float|null $bond_premium_on_treasury_obligations Bond Premium on Treasury obligations * * @return self */ - public function setNoncashLiquidationDistributions($noncash_liquidation_distributions) + public function setBondPremiumOnTreasuryObligations($bond_premium_on_treasury_obligations) { - $this->container['noncash_liquidation_distributions'] = $noncash_liquidation_distributions; + $this->container['bond_premium_on_treasury_obligations'] = $bond_premium_on_treasury_obligations; return $this; } /** - * Gets exempt_interest_dividends + * Gets bond_premium_on_tax_exempt_bond * - * @return string|null + * @return float|null */ - public function getExemptInterestDividends() + public function getBondPremiumOnTaxExemptBond() { - return $this->container['exempt_interest_dividends']; + return $this->container['bond_premium_on_tax_exempt_bond']; } /** - * Sets exempt_interest_dividends + * Sets bond_premium_on_tax_exempt_bond * - * @param string|null $exempt_interest_dividends Exempt-interest dividends + * @param float|null $bond_premium_on_tax_exempt_bond Bond Premium on tax exempt bond * * @return self */ - public function setExemptInterestDividends($exempt_interest_dividends) + public function setBondPremiumOnTaxExemptBond($bond_premium_on_tax_exempt_bond) { - $this->container['exempt_interest_dividends'] = $exempt_interest_dividends; + $this->container['bond_premium_on_tax_exempt_bond'] = $bond_premium_on_tax_exempt_bond; return $this; } /** - * Gets specified_private_activity_bond_interest_dividends + * Gets tax_exempt_bond_cusip_number * * @return string|null */ - public function getSpecifiedPrivateActivityBondInterestDividends() + public function getTaxExemptBondCusipNumber() { - return $this->container['specified_private_activity_bond_interest_dividends']; + return $this->container['tax_exempt_bond_cusip_number']; } /** - * Sets specified_private_activity_bond_interest_dividends + * Sets tax_exempt_bond_cusip_number * - * @param string|null $specified_private_activity_bond_interest_dividends Specified private activity bond interest dividends + * @param string|null $tax_exempt_bond_cusip_number Tax exempt bond CUSIP no. * * @return self */ - public function setSpecifiedPrivateActivityBondInterestDividends($specified_private_activity_bond_interest_dividends) + public function setTaxExemptBondCusipNumber($tax_exempt_bond_cusip_number) { - $this->container['specified_private_activity_bond_interest_dividends'] = $specified_private_activity_bond_interest_dividends; + $this->container['tax_exempt_bond_cusip_number'] = $tax_exempt_bond_cusip_number; return $this; } @@ -3468,25 +4896,25 @@ public function setAugust($august) } /** - * Gets sept + * Gets september * * @return float|null */ - public function getSept() + public function getSeptember() { - return $this->container['sept']; + return $this->container['september']; } /** - * Sets sept + * Sets september * - * @param float|null $sept September gross payments + * @param float|null $september September gross payments * * @return self */ - public function setSept($sept) + public function setSeptember($september) { - $this->container['sept'] = $sept; + $this->container['september'] = $september; return $this; } @@ -3635,30 +5063,6 @@ public function setOtherIncome($other_income) return $this; } - /** - * Gets fed_income_tax_withheld - * - * @return float|null - */ - public function getFedIncomeTaxWithheld() - { - return $this->container['fed_income_tax_withheld']; - } - - /** - * Sets fed_income_tax_withheld - * - * @param float|null $fed_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) - { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; - - return $this; - } - /** * Gets fishing_boat_proceeds * @@ -3707,30 +5111,6 @@ public function setMedicalAndHealthCarePayments($medical_and_health_care_payment return $this; } - /** - * Gets substitute_payments - * - * @return float|null - */ - public function getSubstitutePayments() - { - return $this->container['substitute_payments']; - } - - /** - * Sets substitute_payments - * - * @param float|null $substitute_payments Substitute payments in lieu of dividends or interest - * - * @return self - */ - public function setSubstitutePayments($substitute_payments) - { - $this->container['substitute_payments'] = $substitute_payments; - - return $this; - } - /** * Gets direct_sales_indicator * @@ -3756,49 +5136,49 @@ public function setDirectSalesIndicator($direct_sales_indicator) } /** - * Gets crop_insurance_proceeds + * Gets substitute_payments * * @return float|null */ - public function getCropInsuranceProceeds() + public function getSubstitutePayments() { - return $this->container['crop_insurance_proceeds']; + return $this->container['substitute_payments']; } /** - * Sets crop_insurance_proceeds + * Sets substitute_payments * - * @param float|null $crop_insurance_proceeds Crop insurance proceeds + * @param float|null $substitute_payments Substitute payments in lieu of dividends or interest * * @return self */ - public function setCropInsuranceProceeds($crop_insurance_proceeds) + public function setSubstitutePayments($substitute_payments) { - $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; + $this->container['substitute_payments'] = $substitute_payments; return $this; } /** - * Gets excess_golden_parachute_payments + * Gets crop_insurance_proceeds * * @return float|null */ - public function getExcessGoldenParachutePayments() + public function getCropInsuranceProceeds() { - return $this->container['excess_golden_parachute_payments']; + return $this->container['crop_insurance_proceeds']; } /** - * Sets excess_golden_parachute_payments + * Sets crop_insurance_proceeds * - * @param float|null $excess_golden_parachute_payments (Legacy field) Excess golden parachute payments + * @param float|null $crop_insurance_proceeds Crop insurance proceeds * * @return self */ - public function setExcessGoldenParachutePayments($excess_golden_parachute_payments) + public function setCropInsuranceProceeds($crop_insurance_proceeds) { - $this->container['excess_golden_parachute_payments'] = $excess_golden_parachute_payments; + $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; return $this; } @@ -3875,6 +5255,30 @@ public function setSection409ADeferrals($section409_a_deferrals) return $this; } + /** + * Gets excess_golden_parachute_payments + * + * @return float|null + */ + public function getExcessGoldenParachutePayments() + { + return $this->container['excess_golden_parachute_payments']; + } + + /** + * Sets excess_golden_parachute_payments + * + * @param float|null $excess_golden_parachute_payments (Legacy field) Excess golden parachute payments + * + * @return self + */ + public function setExcessGoldenParachutePayments($excess_golden_parachute_payments) + { + $this->container['excess_golden_parachute_payments'] = $excess_golden_parachute_payments; + + return $this; + } + /** * Gets nonqualified_deferred_compensation * @@ -3902,7 +5306,7 @@ public function setNonqualifiedDeferredCompensation($nonqualified_deferred_compe /** * Gets nonemployee_compensation * - * @return float|null + * @return float */ public function getNonemployeeCompensation() { @@ -3912,7 +5316,7 @@ public function getNonemployeeCompensation() /** * Sets nonemployee_compensation * - * @param float|null $nonemployee_compensation Nonemployee compensation + * @param float $nonemployee_compensation Nonemployee compensation * * @return self */ @@ -3924,25 +5328,25 @@ public function setNonemployeeCompensation($nonemployee_compensation) } /** - * Gets gross_distributions + * Gets gross_distribution * * @return float|null */ - public function getGrossDistributions() + public function getGrossDistribution() { - return $this->container['gross_distributions']; + return $this->container['gross_distribution']; } /** - * Sets gross_distributions + * Sets gross_distribution * - * @param float|null $gross_distributions Gross distribution + * @param float|null $gross_distribution Gross distribution * * @return self */ - public function setGrossDistributions($gross_distributions) + public function setGrossDistribution($gross_distribution) { - $this->container['gross_distributions'] = $gross_distributions; + $this->container['gross_distribution'] = $gross_distribution; return $this; } @@ -3996,25 +5400,25 @@ public function setTaxableAmountNotDetermined($taxable_amount_not_determined) } /** - * Gets total_distribution_indicator + * Gets total_distribution_determined * * @return bool|null */ - public function getTotalDistributionIndicator() + public function getTotalDistributionDetermined() { - return $this->container['total_distribution_indicator']; + return $this->container['total_distribution_determined']; } /** - * Sets total_distribution_indicator + * Sets total_distribution_determined * - * @param bool|null $total_distribution_indicator Total distribution + * @param bool|null $total_distribution_determined Total distribution * * @return self */ - public function setTotalDistributionIndicator($total_distribution_indicator) + public function setTotalDistributionDetermined($total_distribution_determined) { - $this->container['total_distribution_indicator'] = $total_distribution_indicator; + $this->container['total_distribution_determined'] = $total_distribution_determined; return $this; } @@ -4044,217 +5448,217 @@ public function setCapitalGain($capital_gain) } /** - * Gets employee_contributions + * Gets employee_contributions_or_designated_roth_or_insurance_premiums * * @return float|null */ - public function getEmployeeContributions() + public function getEmployeeContributionsOrDesignatedRothOrInsurancePremiums() { - return $this->container['employee_contributions']; + return $this->container['employee_contributions_or_designated_roth_or_insurance_premiums']; } /** - * Sets employee_contributions + * Sets employee_contributions_or_designated_roth_or_insurance_premiums * - * @param float|null $employee_contributions Employee contributions/Designated Roth contributions or insurance premiums + * @param float|null $employee_contributions_or_designated_roth_or_insurance_premiums Employee contributions/Designated Roth contributions or insurance premiums * * @return self */ - public function setEmployeeContributions($employee_contributions) + public function setEmployeeContributionsOrDesignatedRothOrInsurancePremiums($employee_contributions_or_designated_roth_or_insurance_premiums) { - $this->container['employee_contributions'] = $employee_contributions; + $this->container['employee_contributions_or_designated_roth_or_insurance_premiums'] = $employee_contributions_or_designated_roth_or_insurance_premiums; return $this; } /** - * Gets net_unrealized_appreciation + * Gets net_unrealized_appreciation_in_employer_securities * * @return float|null */ - public function getNetUnrealizedAppreciation() + public function getNetUnrealizedAppreciationInEmployerSecurities() { - return $this->container['net_unrealized_appreciation']; + return $this->container['net_unrealized_appreciation_in_employer_securities']; } /** - * Sets net_unrealized_appreciation + * Sets net_unrealized_appreciation_in_employer_securities * - * @param float|null $net_unrealized_appreciation Net unrealized appreciation in employer's securities + * @param float|null $net_unrealized_appreciation_in_employer_securities Net unrealized appreciation in employer's securities * * @return self */ - public function setNetUnrealizedAppreciation($net_unrealized_appreciation) + public function setNetUnrealizedAppreciationInEmployerSecurities($net_unrealized_appreciation_in_employer_securities) { - $this->container['net_unrealized_appreciation'] = $net_unrealized_appreciation; + $this->container['net_unrealized_appreciation_in_employer_securities'] = $net_unrealized_appreciation_in_employer_securities; return $this; } /** - * Gets distribution_code_required + * Gets distribution_code * * @return string|null */ - public function getDistributionCodeRequired() + public function getDistributionCode() { - return $this->container['distribution_code_required']; + return $this->container['distribution_code']; } /** - * Sets distribution_code_required + * Sets distribution_code * - * @param string|null $distribution_code_required Distribution code + * @param string|null $distribution_code Distribution code * * @return self */ - public function setDistributionCodeRequired($distribution_code_required) + public function setDistributionCode($distribution_code) { - $this->container['distribution_code_required'] = $distribution_code_required; + $this->container['distribution_code'] = $distribution_code; return $this; } /** - * Gets distribution_code_optional + * Gets second_distribution_code * * @return string|null */ - public function getDistributionCodeOptional() + public function getSecondDistributionCode() { - return $this->container['distribution_code_optional']; + return $this->container['second_distribution_code']; } /** - * Sets distribution_code_optional + * Sets second_distribution_code * - * @param string|null $distribution_code_optional Second distribution code + * @param string|null $second_distribution_code Second distribution code * * @return self */ - public function setDistributionCodeOptional($distribution_code_optional) + public function setSecondDistributionCode($second_distribution_code) { - $this->container['distribution_code_optional'] = $distribution_code_optional; + $this->container['second_distribution_code'] = $second_distribution_code; return $this; } /** - * Gets ira_sep_simple_indicator + * Gets ira_sep_simple * * @return bool|null */ - public function getIraSepSimpleIndicator() + public function getIraSepSimple() { - return $this->container['ira_sep_simple_indicator']; + return $this->container['ira_sep_simple']; } /** - * Sets ira_sep_simple_indicator + * Sets ira_sep_simple * - * @param bool|null $ira_sep_simple_indicator IRA/SEP/SIMPLE + * @param bool|null $ira_sep_simple IRA/SEP/SIMPLE * * @return self */ - public function setIraSepSimpleIndicator($ira_sep_simple_indicator) + public function setIraSepSimple($ira_sep_simple) { - $this->container['ira_sep_simple_indicator'] = $ira_sep_simple_indicator; + $this->container['ira_sep_simple'] = $ira_sep_simple; return $this; } /** - * Gets total_ira_sep_simple_distribution + * Gets traditional_ira_sep_simple_or_roth_conversion_amount * * @return float|null */ - public function getTotalIraSepSimpleDistribution() + public function getTraditionalIraSepSimpleOrRothConversionAmount() { - return $this->container['total_ira_sep_simple_distribution']; + return $this->container['traditional_ira_sep_simple_or_roth_conversion_amount']; } /** - * Sets total_ira_sep_simple_distribution + * Sets traditional_ira_sep_simple_or_roth_conversion_amount * - * @param float|null $total_ira_sep_simple_distribution Traditional IRA/SEP/SIMPLE or Roth conversion amount + * @param float|null $traditional_ira_sep_simple_or_roth_conversion_amount Traditional IRA/SEP/SIMPLE or Roth conversion amount * * @return self */ - public function setTotalIraSepSimpleDistribution($total_ira_sep_simple_distribution) + public function setTraditionalIraSepSimpleOrRothConversionAmount($traditional_ira_sep_simple_or_roth_conversion_amount) { - $this->container['total_ira_sep_simple_distribution'] = $total_ira_sep_simple_distribution; + $this->container['traditional_ira_sep_simple_or_roth_conversion_amount'] = $traditional_ira_sep_simple_or_roth_conversion_amount; return $this; } /** - * Gets other + * Gets other_amount * * @return float|null */ - public function getOther() + public function getOtherAmount() { - return $this->container['other']; + return $this->container['other_amount']; } /** - * Sets other + * Sets other_amount * - * @param float|null $other Other amount + * @param float|null $other_amount Other amount * * @return self */ - public function setOther($other) + public function setOtherAmount($other_amount) { - $this->container['other'] = $other; + $this->container['other_amount'] = $other_amount; return $this; } /** - * Gets other_percent + * Gets other_percentage * * @return string|null */ - public function getOtherPercent() + public function getOtherPercentage() { - return $this->container['other_percent']; + return $this->container['other_percentage']; } /** - * Sets other_percent + * Sets other_percentage * - * @param string|null $other_percent Other percentage + * @param string|null $other_percentage Other percentage * * @return self */ - public function setOtherPercent($other_percent) + public function setOtherPercentage($other_percentage) { - $this->container['other_percent'] = $other_percent; + $this->container['other_percentage'] = $other_percentage; return $this; } /** - * Gets percentage_total_distribution + * Gets total_distribution_percentage * * @return string|null */ - public function getPercentageTotalDistribution() + public function getTotalDistributionPercentage() { - return $this->container['percentage_total_distribution']; + return $this->container['total_distribution_percentage']; } /** - * Sets percentage_total_distribution + * Sets total_distribution_percentage * - * @param string|null $percentage_total_distribution Total distribution percentage + * @param string|null $total_distribution_percentage Total distribution percentage * * @return self */ - public function setPercentageTotalDistribution($percentage_total_distribution) + public function setTotalDistributionPercentage($total_distribution_percentage) { - $this->container['percentage_total_distribution'] = $percentage_total_distribution; + $this->container['total_distribution_percentage'] = $total_distribution_percentage; return $this; } @@ -4284,73 +5688,49 @@ public function setTotalEmployeeContributions($total_employee_contributions) } /** - * Gets amount_allocable_to_irr + * Gets amount_allocable_to_irr_within5_years * * @return float|null */ - public function getAmountAllocableToIrr() + public function getAmountAllocableToIrrWithin5Years() { - return $this->container['amount_allocable_to_irr']; + return $this->container['amount_allocable_to_irr_within5_years']; } /** - * Sets amount_allocable_to_irr + * Sets amount_allocable_to_irr_within5_years * - * @param float|null $amount_allocable_to_irr Amount allocable to IRR within 5 years + * @param float|null $amount_allocable_to_irr_within5_years Amount allocable to IRR within 5 years * * @return self */ - public function setAmountAllocableToIrr($amount_allocable_to_irr) + public function setAmountAllocableToIrrWithin5Years($amount_allocable_to_irr_within5_years) { - $this->container['amount_allocable_to_irr'] = $amount_allocable_to_irr; + $this->container['amount_allocable_to_irr_within5_years'] = $amount_allocable_to_irr_within5_years; return $this; } /** - * Gets first_year_designated_roth_contrib + * Gets first_year_of_designated_roth_contribution * * @return string|null */ - public function getFirstYearDesignatedRothContrib() - { - return $this->container['first_year_designated_roth_contrib']; - } - - /** - * Sets first_year_designated_roth_contrib - * - * @param string|null $first_year_designated_roth_contrib First year of designated Roth contribution - * - * @return self - */ - public function setFirstYearDesignatedRothContrib($first_year_designated_roth_contrib) - { - $this->container['first_year_designated_roth_contrib'] = $first_year_designated_roth_contrib; - - return $this; - } - - /** - * Gets fatca_requirement_indicator - * - * @return bool|null - */ - public function getFatcaRequirementIndicator() + public function getFirstYearOfDesignatedRothContribution() { - return $this->container['fatca_requirement_indicator']; + return $this->container['first_year_of_designated_roth_contribution']; } /** - * Sets fatca_requirement_indicator + * Sets first_year_of_designated_roth_contribution * - * @param bool|null $fatca_requirement_indicator FATCA filing requirement + * @param string|null $first_year_of_designated_roth_contribution First year of designated Roth contribution * * @return self */ - public function setFatcaRequirementIndicator($fatca_requirement_indicator) + public function setFirstYearOfDesignatedRothContribution($first_year_of_designated_roth_contribution) { - $this->container['fatca_requirement_indicator'] = $fatca_requirement_indicator; + $this->container['first_year_of_designated_roth_contribution'] = $first_year_of_designated_roth_contribution; return $this; } @@ -4358,7 +5738,7 @@ public function setFatcaRequirementIndicator($fatca_requirement_indicator) /** * Gets date_of_payment * - * @return string|null + * @return \DateTime|null */ public function getDateOfPayment() { @@ -4368,7 +5748,7 @@ public function getDateOfPayment() /** * Sets date_of_payment * - * @param string|null $date_of_payment Date of payment + * @param \DateTime|null $date_of_payment Date of payment * * @return self */ diff --git a/lib/Model/A1099/V2/ICreateForm1099Request.php b/lib/Model/A1099/V2/ICreateForm1099Request.php deleted file mode 100644 index 85a4dc9..0000000 --- a/lib/Model/A1099/V2/ICreateForm1099Request.php +++ /dev/null @@ -1,2835 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * ICreateForm1099Request Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class ICreateForm1099Request implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ICreateForm1099Request'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'total_ordinary_dividends' => 'string', - 'qualified_dividends' => 'string', - 'total_capital_gain_distributions' => 'string', - 'unrecaptured_section1250_gain' => 'string', - 'section1202_gain' => 'string', - 'collectibles_gain' => 'string', - 'section897_ordinary_dividends' => 'string', - 'section897_capital_gain' => 'string', - 'nondividend_distributions' => 'string', - 'federal_income_tax_withheld' => 'float', - 'section199_a_dividends' => 'string', - 'investment_expenses' => 'string', - 'foreign_tax_paid' => 'string', - 'foreign_country_or_us_possession' => 'string', - 'cash_liquidation_distributions' => 'string', - 'noncash_liquidation_distributions' => 'string', - 'exempt_interest_dividends' => 'string', - 'specified_private_activity_bond_interest_dividends' => 'string', - 'fatca_filing_requirement' => 'bool', - 'type' => 'string', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest', - 'rents' => 'float', - 'royalties' => 'float', - 'other_income' => 'float', - 'fed_income_tax_withheld' => 'float', - 'fishing_boat_proceeds' => 'float', - 'medical_and_health_care_payments' => 'float', - 'direct_sales_indicator' => 'bool', - 'substitute_payments' => 'float', - 'crop_insurance_proceeds' => 'float', - 'gross_proceeds_paid_to_attorney' => 'float', - 'fish_purchased_for_resale' => 'float', - 'section409_a_deferrals' => 'float', - 'excess_golden_parachute_payments' => 'float', - 'nonqualified_deferred_compensation' => 'float', - 'filer_type' => 'string', - 'payment_type' => 'string', - 'payment_settlement_entity_name_phone_number' => 'string', - 'gross_amount_payment_card' => 'float', - 'card_not_present_transactions' => 'float', - 'merchant_category_code' => 'string', - 'payment_transaction_number' => 'float', - 'january' => 'float', - 'february' => 'float', - 'march' => 'float', - 'april' => 'float', - 'may' => 'float', - 'june' => 'float', - 'july' => 'float', - 'august' => 'float', - 'sept' => 'float', - 'october' => 'float', - 'november' => 'float', - 'december' => 'float', - 'nonemployee_compensation' => 'float' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'total_ordinary_dividends' => null, - 'qualified_dividends' => null, - 'total_capital_gain_distributions' => null, - 'unrecaptured_section1250_gain' => null, - 'section1202_gain' => null, - 'collectibles_gain' => null, - 'section897_ordinary_dividends' => null, - 'section897_capital_gain' => null, - 'nondividend_distributions' => null, - 'federal_income_tax_withheld' => 'double', - 'section199_a_dividends' => null, - 'investment_expenses' => null, - 'foreign_tax_paid' => null, - 'foreign_country_or_us_possession' => null, - 'cash_liquidation_distributions' => null, - 'noncash_liquidation_distributions' => null, - 'exempt_interest_dividends' => null, - 'specified_private_activity_bond_interest_dividends' => null, - 'fatca_filing_requirement' => null, - 'type' => null, - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null, - 'rents' => 'double', - 'royalties' => 'double', - 'other_income' => 'double', - 'fed_income_tax_withheld' => 'double', - 'fishing_boat_proceeds' => 'double', - 'medical_and_health_care_payments' => 'double', - 'direct_sales_indicator' => null, - 'substitute_payments' => 'double', - 'crop_insurance_proceeds' => 'double', - 'gross_proceeds_paid_to_attorney' => 'double', - 'fish_purchased_for_resale' => 'double', - 'section409_a_deferrals' => 'double', - 'excess_golden_parachute_payments' => 'double', - 'nonqualified_deferred_compensation' => 'double', - 'filer_type' => null, - 'payment_type' => null, - 'payment_settlement_entity_name_phone_number' => null, - 'gross_amount_payment_card' => 'double', - 'card_not_present_transactions' => 'double', - 'merchant_category_code' => null, - 'payment_transaction_number' => 'double', - 'january' => 'double', - 'february' => 'double', - 'march' => 'double', - 'april' => 'double', - 'may' => 'double', - 'june' => 'double', - 'july' => 'double', - 'august' => 'double', - 'sept' => 'double', - 'october' => 'double', - 'november' => 'double', - 'december' => 'double', - 'nonemployee_compensation' => 'double' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'total_ordinary_dividends' => 'totalOrdinaryDividends', - 'qualified_dividends' => 'qualifiedDividends', - 'total_capital_gain_distributions' => 'totalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'unrecapturedSection1250Gain', - 'section1202_gain' => 'section1202Gain', - 'collectibles_gain' => 'collectiblesGain', - 'section897_ordinary_dividends' => 'section897OrdinaryDividends', - 'section897_capital_gain' => 'section897CapitalGain', - 'nondividend_distributions' => 'nondividendDistributions', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'section199_a_dividends' => 'section199ADividends', - 'investment_expenses' => 'investmentExpenses', - 'foreign_tax_paid' => 'foreignTaxPaid', - 'foreign_country_or_us_possession' => 'foreignCountryOrUSPossession', - 'cash_liquidation_distributions' => 'cashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'noncashLiquidationDistributions', - 'exempt_interest_dividends' => 'exemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'specifiedPrivateActivityBondInterestDividends', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'rents' => 'rents', - 'royalties' => 'royalties', - 'other_income' => 'otherIncome', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'fishingBoatProceeds', - 'medical_and_health_care_payments' => 'medicalAndHealthCarePayments', - 'direct_sales_indicator' => 'directSalesIndicator', - 'substitute_payments' => 'substitutePayments', - 'crop_insurance_proceeds' => 'cropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'grossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'fishPurchasedForResale', - 'section409_a_deferrals' => 'section409ADeferrals', - 'excess_golden_parachute_payments' => 'excessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'nonqualifiedDeferredCompensation', - 'filer_type' => 'filerType', - 'payment_type' => 'paymentType', - 'payment_settlement_entity_name_phone_number' => 'paymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'grossAmountPaymentCard', - 'card_not_present_transactions' => 'cardNotPresentTransactions', - 'merchant_category_code' => 'merchantCategoryCode', - 'payment_transaction_number' => 'paymentTransactionNumber', - 'january' => 'january', - 'february' => 'february', - 'march' => 'march', - 'april' => 'april', - 'may' => 'may', - 'june' => 'june', - 'july' => 'july', - 'august' => 'august', - 'sept' => 'sept', - 'october' => 'october', - 'november' => 'november', - 'december' => 'december', - 'nonemployee_compensation' => 'nonemployeeCompensation' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'total_ordinary_dividends' => 'setTotalOrdinaryDividends', - 'qualified_dividends' => 'setQualifiedDividends', - 'total_capital_gain_distributions' => 'setTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'setUnrecapturedSection1250Gain', - 'section1202_gain' => 'setSection1202Gain', - 'collectibles_gain' => 'setCollectiblesGain', - 'section897_ordinary_dividends' => 'setSection897OrdinaryDividends', - 'section897_capital_gain' => 'setSection897CapitalGain', - 'nondividend_distributions' => 'setNondividendDistributions', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'section199_a_dividends' => 'setSection199ADividends', - 'investment_expenses' => 'setInvestmentExpenses', - 'foreign_tax_paid' => 'setForeignTaxPaid', - 'foreign_country_or_us_possession' => 'setForeignCountryOrUsPossession', - 'cash_liquidation_distributions' => 'setCashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'setNoncashLiquidationDistributions', - 'exempt_interest_dividends' => 'setExemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'setSpecifiedPrivateActivityBondInterestDividends', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'rents' => 'setRents', - 'royalties' => 'setRoyalties', - 'other_income' => 'setOtherIncome', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'setFishingBoatProceeds', - 'medical_and_health_care_payments' => 'setMedicalAndHealthCarePayments', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'substitute_payments' => 'setSubstitutePayments', - 'crop_insurance_proceeds' => 'setCropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'setGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'setFishPurchasedForResale', - 'section409_a_deferrals' => 'setSection409ADeferrals', - 'excess_golden_parachute_payments' => 'setExcessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'setNonqualifiedDeferredCompensation', - 'filer_type' => 'setFilerType', - 'payment_type' => 'setPaymentType', - 'payment_settlement_entity_name_phone_number' => 'setPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'setGrossAmountPaymentCard', - 'card_not_present_transactions' => 'setCardNotPresentTransactions', - 'merchant_category_code' => 'setMerchantCategoryCode', - 'payment_transaction_number' => 'setPaymentTransactionNumber', - 'january' => 'setJanuary', - 'february' => 'setFebruary', - 'march' => 'setMarch', - 'april' => 'setApril', - 'may' => 'setMay', - 'june' => 'setJune', - 'july' => 'setJuly', - 'august' => 'setAugust', - 'sept' => 'setSept', - 'october' => 'setOctober', - 'november' => 'setNovember', - 'december' => 'setDecember', - 'nonemployee_compensation' => 'setNonemployeeCompensation' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'total_ordinary_dividends' => 'getTotalOrdinaryDividends', - 'qualified_dividends' => 'getQualifiedDividends', - 'total_capital_gain_distributions' => 'getTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'getUnrecapturedSection1250Gain', - 'section1202_gain' => 'getSection1202Gain', - 'collectibles_gain' => 'getCollectiblesGain', - 'section897_ordinary_dividends' => 'getSection897OrdinaryDividends', - 'section897_capital_gain' => 'getSection897CapitalGain', - 'nondividend_distributions' => 'getNondividendDistributions', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'section199_a_dividends' => 'getSection199ADividends', - 'investment_expenses' => 'getInvestmentExpenses', - 'foreign_tax_paid' => 'getForeignTaxPaid', - 'foreign_country_or_us_possession' => 'getForeignCountryOrUsPossession', - 'cash_liquidation_distributions' => 'getCashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'getNoncashLiquidationDistributions', - 'exempt_interest_dividends' => 'getExemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'getSpecifiedPrivateActivityBondInterestDividends', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'rents' => 'getRents', - 'royalties' => 'getRoyalties', - 'other_income' => 'getOtherIncome', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'getFishingBoatProceeds', - 'medical_and_health_care_payments' => 'getMedicalAndHealthCarePayments', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'substitute_payments' => 'getSubstitutePayments', - 'crop_insurance_proceeds' => 'getCropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'getGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'getFishPurchasedForResale', - 'section409_a_deferrals' => 'getSection409ADeferrals', - 'excess_golden_parachute_payments' => 'getExcessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'getNonqualifiedDeferredCompensation', - 'filer_type' => 'getFilerType', - 'payment_type' => 'getPaymentType', - 'payment_settlement_entity_name_phone_number' => 'getPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'getGrossAmountPaymentCard', - 'card_not_present_transactions' => 'getCardNotPresentTransactions', - 'merchant_category_code' => 'getMerchantCategoryCode', - 'payment_transaction_number' => 'getPaymentTransactionNumber', - 'january' => 'getJanuary', - 'february' => 'getFebruary', - 'march' => 'getMarch', - 'april' => 'getApril', - 'may' => 'getMay', - 'june' => 'getJune', - 'july' => 'getJuly', - 'august' => 'getAugust', - 'sept' => 'getSept', - 'october' => 'getOctober', - 'november' => 'getNovember', - 'december' => 'getDecember', - 'nonemployee_compensation' => 'getNonemployeeCompensation' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - const FILER_TYPE_PSE = 'PSE'; - const FILER_TYPE_EPF = 'EPF'; - const FILER_TYPE_OTHER = 'Other'; - const PAYMENT_TYPE_MERCHANT_PAYMENT_CARD = 'MerchantPaymentCard'; - const PAYMENT_TYPE_THIRD_PARTY_NETWORK = 'ThirdPartyNetwork'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getFilerTypeAllowableValues() - { - return [ - self::FILER_TYPE_PSE, - self::FILER_TYPE_EPF, - self::FILER_TYPE_OTHER, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPaymentTypeAllowableValues() - { - return [ - self::PAYMENT_TYPE_MERCHANT_PAYMENT_CARD, - self::PAYMENT_TYPE_THIRD_PARTY_NETWORK, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['total_ordinary_dividends'] = $data['total_ordinary_dividends'] ?? null; - $this->container['qualified_dividends'] = $data['qualified_dividends'] ?? null; - $this->container['total_capital_gain_distributions'] = $data['total_capital_gain_distributions'] ?? null; - $this->container['unrecaptured_section1250_gain'] = $data['unrecaptured_section1250_gain'] ?? null; - $this->container['section1202_gain'] = $data['section1202_gain'] ?? null; - $this->container['collectibles_gain'] = $data['collectibles_gain'] ?? null; - $this->container['section897_ordinary_dividends'] = $data['section897_ordinary_dividends'] ?? null; - $this->container['section897_capital_gain'] = $data['section897_capital_gain'] ?? null; - $this->container['nondividend_distributions'] = $data['nondividend_distributions'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['section199_a_dividends'] = $data['section199_a_dividends'] ?? null; - $this->container['investment_expenses'] = $data['investment_expenses'] ?? null; - $this->container['foreign_tax_paid'] = $data['foreign_tax_paid'] ?? null; - $this->container['foreign_country_or_us_possession'] = $data['foreign_country_or_us_possession'] ?? null; - $this->container['cash_liquidation_distributions'] = $data['cash_liquidation_distributions'] ?? null; - $this->container['noncash_liquidation_distributions'] = $data['noncash_liquidation_distributions'] ?? null; - $this->container['exempt_interest_dividends'] = $data['exempt_interest_dividends'] ?? null; - $this->container['specified_private_activity_bond_interest_dividends'] = $data['specified_private_activity_bond_interest_dividends'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['rents'] = $data['rents'] ?? null; - $this->container['royalties'] = $data['royalties'] ?? null; - $this->container['other_income'] = $data['other_income'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; - $this->container['fishing_boat_proceeds'] = $data['fishing_boat_proceeds'] ?? null; - $this->container['medical_and_health_care_payments'] = $data['medical_and_health_care_payments'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; - $this->container['crop_insurance_proceeds'] = $data['crop_insurance_proceeds'] ?? null; - $this->container['gross_proceeds_paid_to_attorney'] = $data['gross_proceeds_paid_to_attorney'] ?? null; - $this->container['fish_purchased_for_resale'] = $data['fish_purchased_for_resale'] ?? null; - $this->container['section409_a_deferrals'] = $data['section409_a_deferrals'] ?? null; - $this->container['excess_golden_parachute_payments'] = $data['excess_golden_parachute_payments'] ?? null; - $this->container['nonqualified_deferred_compensation'] = $data['nonqualified_deferred_compensation'] ?? null; - $this->container['filer_type'] = $data['filer_type'] ?? null; - $this->container['payment_type'] = $data['payment_type'] ?? null; - $this->container['payment_settlement_entity_name_phone_number'] = $data['payment_settlement_entity_name_phone_number'] ?? null; - $this->container['gross_amount_payment_card'] = $data['gross_amount_payment_card'] ?? null; - $this->container['card_not_present_transactions'] = $data['card_not_present_transactions'] ?? null; - $this->container['merchant_category_code'] = $data['merchant_category_code'] ?? null; - $this->container['payment_transaction_number'] = $data['payment_transaction_number'] ?? null; - $this->container['january'] = $data['january'] ?? null; - $this->container['february'] = $data['february'] ?? null; - $this->container['march'] = $data['march'] ?? null; - $this->container['april'] = $data['april'] ?? null; - $this->container['may'] = $data['may'] ?? null; - $this->container['june'] = $data['june'] ?? null; - $this->container['july'] = $data['july'] ?? null; - $this->container['august'] = $data['august'] ?? null; - $this->container['sept'] = $data['sept'] ?? null; - $this->container['october'] = $data['october'] ?? null; - $this->container['november'] = $data['november'] ?? null; - $this->container['december'] = $data['december'] ?? null; - $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($this->container['filer_type']) && !in_array($this->container['filer_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'filer_type', must be one of '%s'", - $this->container['filer_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($this->container['payment_type']) && !in_array($this->container['payment_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'payment_type', must be one of '%s'", - $this->container['payment_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['nonemployee_compensation'] === null) { - $invalidProperties[] = "'nonemployee_compensation' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets total_ordinary_dividends - * - * @return string|null - */ - public function getTotalOrdinaryDividends() - { - return $this->container['total_ordinary_dividends']; - } - - /** - * Sets total_ordinary_dividends - * - * @param string|null $total_ordinary_dividends Total ordinary dividends - * - * @return self - */ - public function setTotalOrdinaryDividends($total_ordinary_dividends) - { - $this->container['total_ordinary_dividends'] = $total_ordinary_dividends; - - return $this; - } - - /** - * Gets qualified_dividends - * - * @return string|null - */ - public function getQualifiedDividends() - { - return $this->container['qualified_dividends']; - } - - /** - * Sets qualified_dividends - * - * @param string|null $qualified_dividends Qualified dividends - * - * @return self - */ - public function setQualifiedDividends($qualified_dividends) - { - $this->container['qualified_dividends'] = $qualified_dividends; - - return $this; - } - - /** - * Gets total_capital_gain_distributions - * - * @return string|null - */ - public function getTotalCapitalGainDistributions() - { - return $this->container['total_capital_gain_distributions']; - } - - /** - * Sets total_capital_gain_distributions - * - * @param string|null $total_capital_gain_distributions Total capital gain distributions - * - * @return self - */ - public function setTotalCapitalGainDistributions($total_capital_gain_distributions) - { - $this->container['total_capital_gain_distributions'] = $total_capital_gain_distributions; - - return $this; - } - - /** - * Gets unrecaptured_section1250_gain - * - * @return string|null - */ - public function getUnrecapturedSection1250Gain() - { - return $this->container['unrecaptured_section1250_gain']; - } - - /** - * Sets unrecaptured_section1250_gain - * - * @param string|null $unrecaptured_section1250_gain Unrecaptured Section 1250 gain - * - * @return self - */ - public function setUnrecapturedSection1250Gain($unrecaptured_section1250_gain) - { - $this->container['unrecaptured_section1250_gain'] = $unrecaptured_section1250_gain; - - return $this; - } - - /** - * Gets section1202_gain - * - * @return string|null - */ - public function getSection1202Gain() - { - return $this->container['section1202_gain']; - } - - /** - * Sets section1202_gain - * - * @param string|null $section1202_gain Section 1202 gain - * - * @return self - */ - public function setSection1202Gain($section1202_gain) - { - $this->container['section1202_gain'] = $section1202_gain; - - return $this; - } - - /** - * Gets collectibles_gain - * - * @return string|null - */ - public function getCollectiblesGain() - { - return $this->container['collectibles_gain']; - } - - /** - * Sets collectibles_gain - * - * @param string|null $collectibles_gain Collectibles (28%) gain - * - * @return self - */ - public function setCollectiblesGain($collectibles_gain) - { - $this->container['collectibles_gain'] = $collectibles_gain; - - return $this; - } - - /** - * Gets section897_ordinary_dividends - * - * @return string|null - */ - public function getSection897OrdinaryDividends() - { - return $this->container['section897_ordinary_dividends']; - } - - /** - * Sets section897_ordinary_dividends - * - * @param string|null $section897_ordinary_dividends Section 897 ordinary dividends - * - * @return self - */ - public function setSection897OrdinaryDividends($section897_ordinary_dividends) - { - $this->container['section897_ordinary_dividends'] = $section897_ordinary_dividends; - - return $this; - } - - /** - * Gets section897_capital_gain - * - * @return string|null - */ - public function getSection897CapitalGain() - { - return $this->container['section897_capital_gain']; - } - - /** - * Sets section897_capital_gain - * - * @param string|null $section897_capital_gain Section 897 capital gain - * - * @return self - */ - public function setSection897CapitalGain($section897_capital_gain) - { - $this->container['section897_capital_gain'] = $section897_capital_gain; - - return $this; - } - - /** - * Gets nondividend_distributions - * - * @return string|null - */ - public function getNondividendDistributions() - { - return $this->container['nondividend_distributions']; - } - - /** - * Sets nondividend_distributions - * - * @param string|null $nondividend_distributions Nondividend distributions - * - * @return self - */ - public function setNondividendDistributions($nondividend_distributions) - { - $this->container['nondividend_distributions'] = $nondividend_distributions; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets section199_a_dividends - * - * @return string|null - */ - public function getSection199ADividends() - { - return $this->container['section199_a_dividends']; - } - - /** - * Sets section199_a_dividends - * - * @param string|null $section199_a_dividends Section 199A dividends - * - * @return self - */ - public function setSection199ADividends($section199_a_dividends) - { - $this->container['section199_a_dividends'] = $section199_a_dividends; - - return $this; - } - - /** - * Gets investment_expenses - * - * @return string|null - */ - public function getInvestmentExpenses() - { - return $this->container['investment_expenses']; - } - - /** - * Sets investment_expenses - * - * @param string|null $investment_expenses Investment expenses - * - * @return self - */ - public function setInvestmentExpenses($investment_expenses) - { - $this->container['investment_expenses'] = $investment_expenses; - - return $this; - } - - /** - * Gets foreign_tax_paid - * - * @return string|null - */ - public function getForeignTaxPaid() - { - return $this->container['foreign_tax_paid']; - } - - /** - * Sets foreign_tax_paid - * - * @param string|null $foreign_tax_paid Foreign tax paid - * - * @return self - */ - public function setForeignTaxPaid($foreign_tax_paid) - { - $this->container['foreign_tax_paid'] = $foreign_tax_paid; - - return $this; - } - - /** - * Gets foreign_country_or_us_possession - * - * @return string|null - */ - public function getForeignCountryOrUsPossession() - { - return $this->container['foreign_country_or_us_possession']; - } - - /** - * Sets foreign_country_or_us_possession - * - * @param string|null $foreign_country_or_us_possession Foreign country or U.S. possession - * - * @return self - */ - public function setForeignCountryOrUsPossession($foreign_country_or_us_possession) - { - $this->container['foreign_country_or_us_possession'] = $foreign_country_or_us_possession; - - return $this; - } - - /** - * Gets cash_liquidation_distributions - * - * @return string|null - */ - public function getCashLiquidationDistributions() - { - return $this->container['cash_liquidation_distributions']; - } - - /** - * Sets cash_liquidation_distributions - * - * @param string|null $cash_liquidation_distributions Cash liquidation distributions - * - * @return self - */ - public function setCashLiquidationDistributions($cash_liquidation_distributions) - { - $this->container['cash_liquidation_distributions'] = $cash_liquidation_distributions; - - return $this; - } - - /** - * Gets noncash_liquidation_distributions - * - * @return string|null - */ - public function getNoncashLiquidationDistributions() - { - return $this->container['noncash_liquidation_distributions']; - } - - /** - * Sets noncash_liquidation_distributions - * - * @param string|null $noncash_liquidation_distributions Noncash liquidation distributions - * - * @return self - */ - public function setNoncashLiquidationDistributions($noncash_liquidation_distributions) - { - $this->container['noncash_liquidation_distributions'] = $noncash_liquidation_distributions; - - return $this; - } - - /** - * Gets exempt_interest_dividends - * - * @return string|null - */ - public function getExemptInterestDividends() - { - return $this->container['exempt_interest_dividends']; - } - - /** - * Sets exempt_interest_dividends - * - * @param string|null $exempt_interest_dividends Exempt-interest dividends - * - * @return self - */ - public function setExemptInterestDividends($exempt_interest_dividends) - { - $this->container['exempt_interest_dividends'] = $exempt_interest_dividends; - - return $this; - } - - /** - * Gets specified_private_activity_bond_interest_dividends - * - * @return string|null - */ - public function getSpecifiedPrivateActivityBondInterestDividends() - { - return $this->container['specified_private_activity_bond_interest_dividends']; - } - - /** - * Sets specified_private_activity_bond_interest_dividends - * - * @param string|null $specified_private_activity_bond_interest_dividends Specified private activity bond interest dividends - * - * @return self - */ - public function setSpecifiedPrivateActivityBondInterestDividends($specified_private_activity_bond_interest_dividends) - { - $this->container['specified_private_activity_bond_interest_dividends'] = $specified_private_activity_bond_interest_dividends; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling ICreateForm1099Request., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling ICreateForm1099Request., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling ICreateForm1099Request., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets rents - * - * @return float|null - */ - public function getRents() - { - return $this->container['rents']; - } - - /** - * Sets rents - * - * @param float|null $rents Rents - * - * @return self - */ - public function setRents($rents) - { - $this->container['rents'] = $rents; - - return $this; - } - - /** - * Gets royalties - * - * @return float|null - */ - public function getRoyalties() - { - return $this->container['royalties']; - } - - /** - * Sets royalties - * - * @param float|null $royalties Royalties - * - * @return self - */ - public function setRoyalties($royalties) - { - $this->container['royalties'] = $royalties; - - return $this; - } - - /** - * Gets other_income - * - * @return float|null - */ - public function getOtherIncome() - { - return $this->container['other_income']; - } - - /** - * Sets other_income - * - * @param float|null $other_income Other income - * - * @return self - */ - public function setOtherIncome($other_income) - { - $this->container['other_income'] = $other_income; - - return $this; - } - - /** - * Gets fed_income_tax_withheld - * - * @return float|null - */ - public function getFedIncomeTaxWithheld() - { - return $this->container['fed_income_tax_withheld']; - } - - /** - * Sets fed_income_tax_withheld - * - * @param float|null $fed_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) - { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; - - return $this; - } - - /** - * Gets fishing_boat_proceeds - * - * @return float|null - */ - public function getFishingBoatProceeds() - { - return $this->container['fishing_boat_proceeds']; - } - - /** - * Sets fishing_boat_proceeds - * - * @param float|null $fishing_boat_proceeds Fishing boat proceeds - * - * @return self - */ - public function setFishingBoatProceeds($fishing_boat_proceeds) - { - $this->container['fishing_boat_proceeds'] = $fishing_boat_proceeds; - - return $this; - } - - /** - * Gets medical_and_health_care_payments - * - * @return float|null - */ - public function getMedicalAndHealthCarePayments() - { - return $this->container['medical_and_health_care_payments']; - } - - /** - * Sets medical_and_health_care_payments - * - * @param float|null $medical_and_health_care_payments Medical and health care payments - * - * @return self - */ - public function setMedicalAndHealthCarePayments($medical_and_health_care_payments) - { - $this->container['medical_and_health_care_payments'] = $medical_and_health_care_payments; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets substitute_payments - * - * @return float|null - */ - public function getSubstitutePayments() - { - return $this->container['substitute_payments']; - } - - /** - * Sets substitute_payments - * - * @param float|null $substitute_payments Substitute payments in lieu of dividends or interest - * - * @return self - */ - public function setSubstitutePayments($substitute_payments) - { - $this->container['substitute_payments'] = $substitute_payments; - - return $this; - } - - /** - * Gets crop_insurance_proceeds - * - * @return float|null - */ - public function getCropInsuranceProceeds() - { - return $this->container['crop_insurance_proceeds']; - } - - /** - * Sets crop_insurance_proceeds - * - * @param float|null $crop_insurance_proceeds Crop insurance proceeds - * - * @return self - */ - public function setCropInsuranceProceeds($crop_insurance_proceeds) - { - $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; - - return $this; - } - - /** - * Gets gross_proceeds_paid_to_attorney - * - * @return float|null - */ - public function getGrossProceedsPaidToAttorney() - { - return $this->container['gross_proceeds_paid_to_attorney']; - } - - /** - * Sets gross_proceeds_paid_to_attorney - * - * @param float|null $gross_proceeds_paid_to_attorney Gross proceeds paid to an attorney - * - * @return self - */ - public function setGrossProceedsPaidToAttorney($gross_proceeds_paid_to_attorney) - { - $this->container['gross_proceeds_paid_to_attorney'] = $gross_proceeds_paid_to_attorney; - - return $this; - } - - /** - * Gets fish_purchased_for_resale - * - * @return float|null - */ - public function getFishPurchasedForResale() - { - return $this->container['fish_purchased_for_resale']; - } - - /** - * Sets fish_purchased_for_resale - * - * @param float|null $fish_purchased_for_resale Fish purchased for resale - * - * @return self - */ - public function setFishPurchasedForResale($fish_purchased_for_resale) - { - $this->container['fish_purchased_for_resale'] = $fish_purchased_for_resale; - - return $this; - } - - /** - * Gets section409_a_deferrals - * - * @return float|null - */ - public function getSection409ADeferrals() - { - return $this->container['section409_a_deferrals']; - } - - /** - * Sets section409_a_deferrals - * - * @param float|null $section409_a_deferrals Section 409A deferrals - * - * @return self - */ - public function setSection409ADeferrals($section409_a_deferrals) - { - $this->container['section409_a_deferrals'] = $section409_a_deferrals; - - return $this; - } - - /** - * Gets excess_golden_parachute_payments - * - * @return float|null - */ - public function getExcessGoldenParachutePayments() - { - return $this->container['excess_golden_parachute_payments']; - } - - /** - * Sets excess_golden_parachute_payments - * - * @param float|null $excess_golden_parachute_payments (Legacy field) Excess golden parachute payments - * - * @return self - */ - public function setExcessGoldenParachutePayments($excess_golden_parachute_payments) - { - $this->container['excess_golden_parachute_payments'] = $excess_golden_parachute_payments; - - return $this; - } - - /** - * Gets nonqualified_deferred_compensation - * - * @return float|null - */ - public function getNonqualifiedDeferredCompensation() - { - return $this->container['nonqualified_deferred_compensation']; - } - - /** - * Sets nonqualified_deferred_compensation - * - * @param float|null $nonqualified_deferred_compensation Nonqualified deferred compensation - * - * @return self - */ - public function setNonqualifiedDeferredCompensation($nonqualified_deferred_compensation) - { - $this->container['nonqualified_deferred_compensation'] = $nonqualified_deferred_compensation; - - return $this; - } - - /** - * Gets filer_type - * - * @return string|null - */ - public function getFilerType() - { - return $this->container['filer_type']; - } - - /** - * Sets filer_type - * - * @param string|null $filer_type Filer type (PSE or EPF) - * - * @return self - */ - public function setFilerType($filer_type) - { - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($filer_type) && !in_array($filer_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'filer_type', must be one of '%s'", - $filer_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['filer_type'] = $filer_type; - - return $this; - } - - /** - * Gets payment_type - * - * @return string|null - */ - public function getPaymentType() - { - return $this->container['payment_type']; - } - - /** - * Sets payment_type - * - * @param string|null $payment_type Payment type (payment card or third party network) - * - * @return self - */ - public function setPaymentType($payment_type) - { - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($payment_type) && !in_array($payment_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'payment_type', must be one of '%s'", - $payment_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['payment_type'] = $payment_type; - - return $this; - } - - /** - * Gets payment_settlement_entity_name_phone_number - * - * @return string|null - */ - public function getPaymentSettlementEntityNamePhoneNumber() - { - return $this->container['payment_settlement_entity_name_phone_number']; - } - - /** - * Sets payment_settlement_entity_name_phone_number - * - * @param string|null $payment_settlement_entity_name_phone_number Payment settlement entity name and phone number - * - * @return self - */ - public function setPaymentSettlementEntityNamePhoneNumber($payment_settlement_entity_name_phone_number) - { - $this->container['payment_settlement_entity_name_phone_number'] = $payment_settlement_entity_name_phone_number; - - return $this; - } - - /** - * Gets gross_amount_payment_card - * - * @return float|null - */ - public function getGrossAmountPaymentCard() - { - return $this->container['gross_amount_payment_card']; - } - - /** - * Sets gross_amount_payment_card - * - * @param float|null $gross_amount_payment_card Gross amount of payment card/third party network transactions - * - * @return self - */ - public function setGrossAmountPaymentCard($gross_amount_payment_card) - { - $this->container['gross_amount_payment_card'] = $gross_amount_payment_card; - - return $this; - } - - /** - * Gets card_not_present_transactions - * - * @return float|null - */ - public function getCardNotPresentTransactions() - { - return $this->container['card_not_present_transactions']; - } - - /** - * Sets card_not_present_transactions - * - * @param float|null $card_not_present_transactions Card not present transactions - * - * @return self - */ - public function setCardNotPresentTransactions($card_not_present_transactions) - { - $this->container['card_not_present_transactions'] = $card_not_present_transactions; - - return $this; - } - - /** - * Gets merchant_category_code - * - * @return string|null - */ - public function getMerchantCategoryCode() - { - return $this->container['merchant_category_code']; - } - - /** - * Sets merchant_category_code - * - * @param string|null $merchant_category_code Merchant category code - * - * @return self - */ - public function setMerchantCategoryCode($merchant_category_code) - { - $this->container['merchant_category_code'] = $merchant_category_code; - - return $this; - } - - /** - * Gets payment_transaction_number - * - * @return float|null - */ - public function getPaymentTransactionNumber() - { - return $this->container['payment_transaction_number']; - } - - /** - * Sets payment_transaction_number - * - * @param float|null $payment_transaction_number Number of payment transactions - * - * @return self - */ - public function setPaymentTransactionNumber($payment_transaction_number) - { - $this->container['payment_transaction_number'] = $payment_transaction_number; - - return $this; - } - - /** - * Gets january - * - * @return float|null - */ - public function getJanuary() - { - return $this->container['january']; - } - - /** - * Sets january - * - * @param float|null $january January gross payments - * - * @return self - */ - public function setJanuary($january) - { - $this->container['january'] = $january; - - return $this; - } - - /** - * Gets february - * - * @return float|null - */ - public function getFebruary() - { - return $this->container['february']; - } - - /** - * Sets february - * - * @param float|null $february February gross payments - * - * @return self - */ - public function setFebruary($february) - { - $this->container['february'] = $february; - - return $this; - } - - /** - * Gets march - * - * @return float|null - */ - public function getMarch() - { - return $this->container['march']; - } - - /** - * Sets march - * - * @param float|null $march March gross payments - * - * @return self - */ - public function setMarch($march) - { - $this->container['march'] = $march; - - return $this; - } - - /** - * Gets april - * - * @return float|null - */ - public function getApril() - { - return $this->container['april']; - } - - /** - * Sets april - * - * @param float|null $april April gross payments - * - * @return self - */ - public function setApril($april) - { - $this->container['april'] = $april; - - return $this; - } - - /** - * Gets may - * - * @return float|null - */ - public function getMay() - { - return $this->container['may']; - } - - /** - * Sets may - * - * @param float|null $may May gross payments - * - * @return self - */ - public function setMay($may) - { - $this->container['may'] = $may; - - return $this; - } - - /** - * Gets june - * - * @return float|null - */ - public function getJune() - { - return $this->container['june']; - } - - /** - * Sets june - * - * @param float|null $june June gross payments - * - * @return self - */ - public function setJune($june) - { - $this->container['june'] = $june; - - return $this; - } - - /** - * Gets july - * - * @return float|null - */ - public function getJuly() - { - return $this->container['july']; - } - - /** - * Sets july - * - * @param float|null $july July gross payments - * - * @return self - */ - public function setJuly($july) - { - $this->container['july'] = $july; - - return $this; - } - - /** - * Gets august - * - * @return float|null - */ - public function getAugust() - { - return $this->container['august']; - } - - /** - * Sets august - * - * @param float|null $august August gross payments - * - * @return self - */ - public function setAugust($august) - { - $this->container['august'] = $august; - - return $this; - } - - /** - * Gets sept - * - * @return float|null - */ - public function getSept() - { - return $this->container['sept']; - } - - /** - * Sets sept - * - * @param float|null $sept September gross payments - * - * @return self - */ - public function setSept($sept) - { - $this->container['sept'] = $sept; - - return $this; - } - - /** - * Gets october - * - * @return float|null - */ - public function getOctober() - { - return $this->container['october']; - } - - /** - * Sets october - * - * @param float|null $october October gross payments - * - * @return self - */ - public function setOctober($october) - { - $this->container['october'] = $october; - - return $this; - } - - /** - * Gets november - * - * @return float|null - */ - public function getNovember() - { - return $this->container['november']; - } - - /** - * Sets november - * - * @param float|null $november November gross payments - * - * @return self - */ - public function setNovember($november) - { - $this->container['november'] = $november; - - return $this; - } - - /** - * Gets december - * - * @return float|null - */ - public function getDecember() - { - return $this->container['december']; - } - - /** - * Sets december - * - * @param float|null $december December gross payments - * - * @return self - */ - public function setDecember($december) - { - $this->container['december'] = $december; - - return $this; - } - - /** - * Gets nonemployee_compensation - * - * @return float - */ - public function getNonemployeeCompensation() - { - return $this->container['nonemployee_compensation']; - } - - /** - * Sets nonemployee_compensation - * - * @param float $nonemployee_compensation Nonemployee compensation - * - * @return self - */ - public function setNonemployeeCompensation($nonemployee_compensation) - { - $this->container['nonemployee_compensation'] = $nonemployee_compensation; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/IUpdateForm1099Request.php b/lib/Model/A1099/V2/IUpdateForm1099Request.php deleted file mode 100644 index 6710430..0000000 --- a/lib/Model/A1099/V2/IUpdateForm1099Request.php +++ /dev/null @@ -1,2835 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * IUpdateForm1099Request Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class IUpdateForm1099Request implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'IUpdateForm1099Request'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'total_ordinary_dividends' => 'string', - 'qualified_dividends' => 'string', - 'total_capital_gain_distributions' => 'string', - 'unrecaptured_section1250_gain' => 'string', - 'section1202_gain' => 'string', - 'collectibles_gain' => 'string', - 'section897_ordinary_dividends' => 'string', - 'section897_capital_gain' => 'string', - 'nondividend_distributions' => 'string', - 'federal_income_tax_withheld' => 'float', - 'section199_a_dividends' => 'string', - 'investment_expenses' => 'string', - 'foreign_tax_paid' => 'string', - 'foreign_country_or_us_possession' => 'string', - 'cash_liquidation_distributions' => 'string', - 'noncash_liquidation_distributions' => 'string', - 'exempt_interest_dividends' => 'string', - 'specified_private_activity_bond_interest_dividends' => 'string', - 'fatca_filing_requirement' => 'bool', - 'type' => 'string', - 'issuer_id' => 'string', - 'reference_id' => 'string', - 'recipient_tin' => 'string', - 'recipient_name' => 'string', - 'tin_type' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest', - 'rents' => 'float', - 'royalties' => 'float', - 'other_income' => 'float', - 'fed_income_tax_withheld' => 'float', - 'fishing_boat_proceeds' => 'float', - 'medical_and_health_care_payments' => 'float', - 'direct_sales_indicator' => 'bool', - 'substitute_payments' => 'float', - 'crop_insurance_proceeds' => 'float', - 'gross_proceeds_paid_to_attorney' => 'float', - 'fish_purchased_for_resale' => 'float', - 'section409_a_deferrals' => 'float', - 'excess_golden_parachute_payments' => 'float', - 'nonqualified_deferred_compensation' => 'float', - 'filer_type' => 'string', - 'payment_type' => 'string', - 'payment_settlement_entity_name_phone_number' => 'string', - 'gross_amount_payment_card' => 'float', - 'card_not_present_transactions' => 'float', - 'merchant_category_code' => 'string', - 'payment_transaction_number' => 'float', - 'january' => 'float', - 'february' => 'float', - 'march' => 'float', - 'april' => 'float', - 'may' => 'float', - 'june' => 'float', - 'july' => 'float', - 'august' => 'float', - 'sept' => 'float', - 'october' => 'float', - 'november' => 'float', - 'december' => 'float', - 'nonemployee_compensation' => 'float' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'total_ordinary_dividends' => null, - 'qualified_dividends' => null, - 'total_capital_gain_distributions' => null, - 'unrecaptured_section1250_gain' => null, - 'section1202_gain' => null, - 'collectibles_gain' => null, - 'section897_ordinary_dividends' => null, - 'section897_capital_gain' => null, - 'nondividend_distributions' => null, - 'federal_income_tax_withheld' => 'double', - 'section199_a_dividends' => null, - 'investment_expenses' => null, - 'foreign_tax_paid' => null, - 'foreign_country_or_us_possession' => null, - 'cash_liquidation_distributions' => null, - 'noncash_liquidation_distributions' => null, - 'exempt_interest_dividends' => null, - 'specified_private_activity_bond_interest_dividends' => null, - 'fatca_filing_requirement' => null, - 'type' => null, - 'issuer_id' => null, - 'reference_id' => null, - 'recipient_tin' => null, - 'recipient_name' => null, - 'tin_type' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'state_and_local_withholding' => null, - 'rents' => 'double', - 'royalties' => 'double', - 'other_income' => 'double', - 'fed_income_tax_withheld' => 'double', - 'fishing_boat_proceeds' => 'double', - 'medical_and_health_care_payments' => 'double', - 'direct_sales_indicator' => null, - 'substitute_payments' => 'double', - 'crop_insurance_proceeds' => 'double', - 'gross_proceeds_paid_to_attorney' => 'double', - 'fish_purchased_for_resale' => 'double', - 'section409_a_deferrals' => 'double', - 'excess_golden_parachute_payments' => 'double', - 'nonqualified_deferred_compensation' => 'double', - 'filer_type' => null, - 'payment_type' => null, - 'payment_settlement_entity_name_phone_number' => null, - 'gross_amount_payment_card' => 'double', - 'card_not_present_transactions' => 'double', - 'merchant_category_code' => null, - 'payment_transaction_number' => 'double', - 'january' => 'double', - 'february' => 'double', - 'march' => 'double', - 'april' => 'double', - 'may' => 'double', - 'june' => 'double', - 'july' => 'double', - 'august' => 'double', - 'sept' => 'double', - 'october' => 'double', - 'november' => 'double', - 'december' => 'double', - 'nonemployee_compensation' => 'double' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'total_ordinary_dividends' => 'totalOrdinaryDividends', - 'qualified_dividends' => 'qualifiedDividends', - 'total_capital_gain_distributions' => 'totalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'unrecapturedSection1250Gain', - 'section1202_gain' => 'section1202Gain', - 'collectibles_gain' => 'collectiblesGain', - 'section897_ordinary_dividends' => 'section897OrdinaryDividends', - 'section897_capital_gain' => 'section897CapitalGain', - 'nondividend_distributions' => 'nondividendDistributions', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'section199_a_dividends' => 'section199ADividends', - 'investment_expenses' => 'investmentExpenses', - 'foreign_tax_paid' => 'foreignTaxPaid', - 'foreign_country_or_us_possession' => 'foreignCountryOrUSPossession', - 'cash_liquidation_distributions' => 'cashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'noncashLiquidationDistributions', - 'exempt_interest_dividends' => 'exemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'specifiedPrivateActivityBondInterestDividends', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'type' => 'type', - 'issuer_id' => 'issuerId', - 'reference_id' => 'referenceId', - 'recipient_tin' => 'recipientTin', - 'recipient_name' => 'recipientName', - 'tin_type' => 'tinType', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'rents' => 'rents', - 'royalties' => 'royalties', - 'other_income' => 'otherIncome', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'fishingBoatProceeds', - 'medical_and_health_care_payments' => 'medicalAndHealthCarePayments', - 'direct_sales_indicator' => 'directSalesIndicator', - 'substitute_payments' => 'substitutePayments', - 'crop_insurance_proceeds' => 'cropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'grossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'fishPurchasedForResale', - 'section409_a_deferrals' => 'section409ADeferrals', - 'excess_golden_parachute_payments' => 'excessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'nonqualifiedDeferredCompensation', - 'filer_type' => 'filerType', - 'payment_type' => 'paymentType', - 'payment_settlement_entity_name_phone_number' => 'paymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'grossAmountPaymentCard', - 'card_not_present_transactions' => 'cardNotPresentTransactions', - 'merchant_category_code' => 'merchantCategoryCode', - 'payment_transaction_number' => 'paymentTransactionNumber', - 'january' => 'january', - 'february' => 'february', - 'march' => 'march', - 'april' => 'april', - 'may' => 'may', - 'june' => 'june', - 'july' => 'july', - 'august' => 'august', - 'sept' => 'sept', - 'october' => 'october', - 'november' => 'november', - 'december' => 'december', - 'nonemployee_compensation' => 'nonemployeeCompensation' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'total_ordinary_dividends' => 'setTotalOrdinaryDividends', - 'qualified_dividends' => 'setQualifiedDividends', - 'total_capital_gain_distributions' => 'setTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'setUnrecapturedSection1250Gain', - 'section1202_gain' => 'setSection1202Gain', - 'collectibles_gain' => 'setCollectiblesGain', - 'section897_ordinary_dividends' => 'setSection897OrdinaryDividends', - 'section897_capital_gain' => 'setSection897CapitalGain', - 'nondividend_distributions' => 'setNondividendDistributions', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'section199_a_dividends' => 'setSection199ADividends', - 'investment_expenses' => 'setInvestmentExpenses', - 'foreign_tax_paid' => 'setForeignTaxPaid', - 'foreign_country_or_us_possession' => 'setForeignCountryOrUsPossession', - 'cash_liquidation_distributions' => 'setCashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'setNoncashLiquidationDistributions', - 'exempt_interest_dividends' => 'setExemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'setSpecifiedPrivateActivityBondInterestDividends', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'type' => 'setType', - 'issuer_id' => 'setIssuerId', - 'reference_id' => 'setReferenceId', - 'recipient_tin' => 'setRecipientTin', - 'recipient_name' => 'setRecipientName', - 'tin_type' => 'setTinType', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'rents' => 'setRents', - 'royalties' => 'setRoyalties', - 'other_income' => 'setOtherIncome', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'setFishingBoatProceeds', - 'medical_and_health_care_payments' => 'setMedicalAndHealthCarePayments', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'substitute_payments' => 'setSubstitutePayments', - 'crop_insurance_proceeds' => 'setCropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'setGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'setFishPurchasedForResale', - 'section409_a_deferrals' => 'setSection409ADeferrals', - 'excess_golden_parachute_payments' => 'setExcessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'setNonqualifiedDeferredCompensation', - 'filer_type' => 'setFilerType', - 'payment_type' => 'setPaymentType', - 'payment_settlement_entity_name_phone_number' => 'setPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'setGrossAmountPaymentCard', - 'card_not_present_transactions' => 'setCardNotPresentTransactions', - 'merchant_category_code' => 'setMerchantCategoryCode', - 'payment_transaction_number' => 'setPaymentTransactionNumber', - 'january' => 'setJanuary', - 'february' => 'setFebruary', - 'march' => 'setMarch', - 'april' => 'setApril', - 'may' => 'setMay', - 'june' => 'setJune', - 'july' => 'setJuly', - 'august' => 'setAugust', - 'sept' => 'setSept', - 'october' => 'setOctober', - 'november' => 'setNovember', - 'december' => 'setDecember', - 'nonemployee_compensation' => 'setNonemployeeCompensation' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'total_ordinary_dividends' => 'getTotalOrdinaryDividends', - 'qualified_dividends' => 'getQualifiedDividends', - 'total_capital_gain_distributions' => 'getTotalCapitalGainDistributions', - 'unrecaptured_section1250_gain' => 'getUnrecapturedSection1250Gain', - 'section1202_gain' => 'getSection1202Gain', - 'collectibles_gain' => 'getCollectiblesGain', - 'section897_ordinary_dividends' => 'getSection897OrdinaryDividends', - 'section897_capital_gain' => 'getSection897CapitalGain', - 'nondividend_distributions' => 'getNondividendDistributions', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'section199_a_dividends' => 'getSection199ADividends', - 'investment_expenses' => 'getInvestmentExpenses', - 'foreign_tax_paid' => 'getForeignTaxPaid', - 'foreign_country_or_us_possession' => 'getForeignCountryOrUsPossession', - 'cash_liquidation_distributions' => 'getCashLiquidationDistributions', - 'noncash_liquidation_distributions' => 'getNoncashLiquidationDistributions', - 'exempt_interest_dividends' => 'getExemptInterestDividends', - 'specified_private_activity_bond_interest_dividends' => 'getSpecifiedPrivateActivityBondInterestDividends', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'type' => 'getType', - 'issuer_id' => 'getIssuerId', - 'reference_id' => 'getReferenceId', - 'recipient_tin' => 'getRecipientTin', - 'recipient_name' => 'getRecipientName', - 'tin_type' => 'getTinType', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'rents' => 'getRents', - 'royalties' => 'getRoyalties', - 'other_income' => 'getOtherIncome', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'getFishingBoatProceeds', - 'medical_and_health_care_payments' => 'getMedicalAndHealthCarePayments', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'substitute_payments' => 'getSubstitutePayments', - 'crop_insurance_proceeds' => 'getCropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'getGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'getFishPurchasedForResale', - 'section409_a_deferrals' => 'getSection409ADeferrals', - 'excess_golden_parachute_payments' => 'getExcessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'getNonqualifiedDeferredCompensation', - 'filer_type' => 'getFilerType', - 'payment_type' => 'getPaymentType', - 'payment_settlement_entity_name_phone_number' => 'getPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'getGrossAmountPaymentCard', - 'card_not_present_transactions' => 'getCardNotPresentTransactions', - 'merchant_category_code' => 'getMerchantCategoryCode', - 'payment_transaction_number' => 'getPaymentTransactionNumber', - 'january' => 'getJanuary', - 'february' => 'getFebruary', - 'march' => 'getMarch', - 'april' => 'getApril', - 'may' => 'getMay', - 'june' => 'getJune', - 'july' => 'getJuly', - 'august' => 'getAugust', - 'sept' => 'getSept', - 'october' => 'getOctober', - 'november' => 'getNovember', - 'december' => 'getDecember', - 'nonemployee_compensation' => 'getNonemployeeCompensation' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - const FILER_TYPE_PSE = 'PSE'; - const FILER_TYPE_EPF = 'EPF'; - const FILER_TYPE_OTHER = 'Other'; - const PAYMENT_TYPE_MERCHANT_PAYMENT_CARD = 'MerchantPaymentCard'; - const PAYMENT_TYPE_THIRD_PARTY_NETWORK = 'ThirdPartyNetwork'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getFilerTypeAllowableValues() - { - return [ - self::FILER_TYPE_PSE, - self::FILER_TYPE_EPF, - self::FILER_TYPE_OTHER, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPaymentTypeAllowableValues() - { - return [ - self::PAYMENT_TYPE_MERCHANT_PAYMENT_CARD, - self::PAYMENT_TYPE_THIRD_PARTY_NETWORK, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['total_ordinary_dividends'] = $data['total_ordinary_dividends'] ?? null; - $this->container['qualified_dividends'] = $data['qualified_dividends'] ?? null; - $this->container['total_capital_gain_distributions'] = $data['total_capital_gain_distributions'] ?? null; - $this->container['unrecaptured_section1250_gain'] = $data['unrecaptured_section1250_gain'] ?? null; - $this->container['section1202_gain'] = $data['section1202_gain'] ?? null; - $this->container['collectibles_gain'] = $data['collectibles_gain'] ?? null; - $this->container['section897_ordinary_dividends'] = $data['section897_ordinary_dividends'] ?? null; - $this->container['section897_capital_gain'] = $data['section897_capital_gain'] ?? null; - $this->container['nondividend_distributions'] = $data['nondividend_distributions'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['section199_a_dividends'] = $data['section199_a_dividends'] ?? null; - $this->container['investment_expenses'] = $data['investment_expenses'] ?? null; - $this->container['foreign_tax_paid'] = $data['foreign_tax_paid'] ?? null; - $this->container['foreign_country_or_us_possession'] = $data['foreign_country_or_us_possession'] ?? null; - $this->container['cash_liquidation_distributions'] = $data['cash_liquidation_distributions'] ?? null; - $this->container['noncash_liquidation_distributions'] = $data['noncash_liquidation_distributions'] ?? null; - $this->container['exempt_interest_dividends'] = $data['exempt_interest_dividends'] ?? null; - $this->container['specified_private_activity_bond_interest_dividends'] = $data['specified_private_activity_bond_interest_dividends'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['rents'] = $data['rents'] ?? null; - $this->container['royalties'] = $data['royalties'] ?? null; - $this->container['other_income'] = $data['other_income'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; - $this->container['fishing_boat_proceeds'] = $data['fishing_boat_proceeds'] ?? null; - $this->container['medical_and_health_care_payments'] = $data['medical_and_health_care_payments'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; - $this->container['crop_insurance_proceeds'] = $data['crop_insurance_proceeds'] ?? null; - $this->container['gross_proceeds_paid_to_attorney'] = $data['gross_proceeds_paid_to_attorney'] ?? null; - $this->container['fish_purchased_for_resale'] = $data['fish_purchased_for_resale'] ?? null; - $this->container['section409_a_deferrals'] = $data['section409_a_deferrals'] ?? null; - $this->container['excess_golden_parachute_payments'] = $data['excess_golden_parachute_payments'] ?? null; - $this->container['nonqualified_deferred_compensation'] = $data['nonqualified_deferred_compensation'] ?? null; - $this->container['filer_type'] = $data['filer_type'] ?? null; - $this->container['payment_type'] = $data['payment_type'] ?? null; - $this->container['payment_settlement_entity_name_phone_number'] = $data['payment_settlement_entity_name_phone_number'] ?? null; - $this->container['gross_amount_payment_card'] = $data['gross_amount_payment_card'] ?? null; - $this->container['card_not_present_transactions'] = $data['card_not_present_transactions'] ?? null; - $this->container['merchant_category_code'] = $data['merchant_category_code'] ?? null; - $this->container['payment_transaction_number'] = $data['payment_transaction_number'] ?? null; - $this->container['january'] = $data['january'] ?? null; - $this->container['february'] = $data['february'] ?? null; - $this->container['march'] = $data['march'] ?? null; - $this->container['april'] = $data['april'] ?? null; - $this->container['may'] = $data['may'] ?? null; - $this->container['june'] = $data['june'] ?? null; - $this->container['july'] = $data['july'] ?? null; - $this->container['august'] = $data['august'] ?? null; - $this->container['sept'] = $data['sept'] ?? null; - $this->container['october'] = $data['october'] ?? null; - $this->container['november'] = $data['november'] ?? null; - $this->container['december'] = $data['december'] ?? null; - $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['address'] === null) { - $invalidProperties[] = "'address' can't be null"; - } - if ((mb_strlen($this->container['address']) < 1)) { - $invalidProperties[] = "invalid value for 'address', the character length must be bigger than or equal to 1."; - } - - if ($this->container['city'] === null) { - $invalidProperties[] = "'city' can't be null"; - } - if ((mb_strlen($this->container['city']) < 1)) { - $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; - } - - if ($this->container['country_code'] === null) { - $invalidProperties[] = "'country_code' can't be null"; - } - if ((mb_strlen($this->container['country_code']) < 1)) { - $invalidProperties[] = "invalid value for 'country_code', the character length must be bigger than or equal to 1."; - } - - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($this->container['filer_type']) && !in_array($this->container['filer_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'filer_type', must be one of '%s'", - $this->container['filer_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($this->container['payment_type']) && !in_array($this->container['payment_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'payment_type', must be one of '%s'", - $this->container['payment_type'], - implode("', '", $allowedValues) - ); - } - - if ($this->container['nonemployee_compensation'] === null) { - $invalidProperties[] = "'nonemployee_compensation' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets total_ordinary_dividends - * - * @return string|null - */ - public function getTotalOrdinaryDividends() - { - return $this->container['total_ordinary_dividends']; - } - - /** - * Sets total_ordinary_dividends - * - * @param string|null $total_ordinary_dividends Total ordinary dividends - * - * @return self - */ - public function setTotalOrdinaryDividends($total_ordinary_dividends) - { - $this->container['total_ordinary_dividends'] = $total_ordinary_dividends; - - return $this; - } - - /** - * Gets qualified_dividends - * - * @return string|null - */ - public function getQualifiedDividends() - { - return $this->container['qualified_dividends']; - } - - /** - * Sets qualified_dividends - * - * @param string|null $qualified_dividends Qualified dividends - * - * @return self - */ - public function setQualifiedDividends($qualified_dividends) - { - $this->container['qualified_dividends'] = $qualified_dividends; - - return $this; - } - - /** - * Gets total_capital_gain_distributions - * - * @return string|null - */ - public function getTotalCapitalGainDistributions() - { - return $this->container['total_capital_gain_distributions']; - } - - /** - * Sets total_capital_gain_distributions - * - * @param string|null $total_capital_gain_distributions Total capital gain distributions - * - * @return self - */ - public function setTotalCapitalGainDistributions($total_capital_gain_distributions) - { - $this->container['total_capital_gain_distributions'] = $total_capital_gain_distributions; - - return $this; - } - - /** - * Gets unrecaptured_section1250_gain - * - * @return string|null - */ - public function getUnrecapturedSection1250Gain() - { - return $this->container['unrecaptured_section1250_gain']; - } - - /** - * Sets unrecaptured_section1250_gain - * - * @param string|null $unrecaptured_section1250_gain Unrecaptured Section 1250 gain - * - * @return self - */ - public function setUnrecapturedSection1250Gain($unrecaptured_section1250_gain) - { - $this->container['unrecaptured_section1250_gain'] = $unrecaptured_section1250_gain; - - return $this; - } - - /** - * Gets section1202_gain - * - * @return string|null - */ - public function getSection1202Gain() - { - return $this->container['section1202_gain']; - } - - /** - * Sets section1202_gain - * - * @param string|null $section1202_gain Section 1202 gain - * - * @return self - */ - public function setSection1202Gain($section1202_gain) - { - $this->container['section1202_gain'] = $section1202_gain; - - return $this; - } - - /** - * Gets collectibles_gain - * - * @return string|null - */ - public function getCollectiblesGain() - { - return $this->container['collectibles_gain']; - } - - /** - * Sets collectibles_gain - * - * @param string|null $collectibles_gain Collectibles (28%) gain - * - * @return self - */ - public function setCollectiblesGain($collectibles_gain) - { - $this->container['collectibles_gain'] = $collectibles_gain; - - return $this; - } - - /** - * Gets section897_ordinary_dividends - * - * @return string|null - */ - public function getSection897OrdinaryDividends() - { - return $this->container['section897_ordinary_dividends']; - } - - /** - * Sets section897_ordinary_dividends - * - * @param string|null $section897_ordinary_dividends Section 897 ordinary dividends - * - * @return self - */ - public function setSection897OrdinaryDividends($section897_ordinary_dividends) - { - $this->container['section897_ordinary_dividends'] = $section897_ordinary_dividends; - - return $this; - } - - /** - * Gets section897_capital_gain - * - * @return string|null - */ - public function getSection897CapitalGain() - { - return $this->container['section897_capital_gain']; - } - - /** - * Sets section897_capital_gain - * - * @param string|null $section897_capital_gain Section 897 capital gain - * - * @return self - */ - public function setSection897CapitalGain($section897_capital_gain) - { - $this->container['section897_capital_gain'] = $section897_capital_gain; - - return $this; - } - - /** - * Gets nondividend_distributions - * - * @return string|null - */ - public function getNondividendDistributions() - { - return $this->container['nondividend_distributions']; - } - - /** - * Sets nondividend_distributions - * - * @param string|null $nondividend_distributions Nondividend distributions - * - * @return self - */ - public function setNondividendDistributions($nondividend_distributions) - { - $this->container['nondividend_distributions'] = $nondividend_distributions; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets section199_a_dividends - * - * @return string|null - */ - public function getSection199ADividends() - { - return $this->container['section199_a_dividends']; - } - - /** - * Sets section199_a_dividends - * - * @param string|null $section199_a_dividends Section 199A dividends - * - * @return self - */ - public function setSection199ADividends($section199_a_dividends) - { - $this->container['section199_a_dividends'] = $section199_a_dividends; - - return $this; - } - - /** - * Gets investment_expenses - * - * @return string|null - */ - public function getInvestmentExpenses() - { - return $this->container['investment_expenses']; - } - - /** - * Sets investment_expenses - * - * @param string|null $investment_expenses Investment expenses - * - * @return self - */ - public function setInvestmentExpenses($investment_expenses) - { - $this->container['investment_expenses'] = $investment_expenses; - - return $this; - } - - /** - * Gets foreign_tax_paid - * - * @return string|null - */ - public function getForeignTaxPaid() - { - return $this->container['foreign_tax_paid']; - } - - /** - * Sets foreign_tax_paid - * - * @param string|null $foreign_tax_paid Foreign tax paid - * - * @return self - */ - public function setForeignTaxPaid($foreign_tax_paid) - { - $this->container['foreign_tax_paid'] = $foreign_tax_paid; - - return $this; - } - - /** - * Gets foreign_country_or_us_possession - * - * @return string|null - */ - public function getForeignCountryOrUsPossession() - { - return $this->container['foreign_country_or_us_possession']; - } - - /** - * Sets foreign_country_or_us_possession - * - * @param string|null $foreign_country_or_us_possession Foreign country or U.S. possession - * - * @return self - */ - public function setForeignCountryOrUsPossession($foreign_country_or_us_possession) - { - $this->container['foreign_country_or_us_possession'] = $foreign_country_or_us_possession; - - return $this; - } - - /** - * Gets cash_liquidation_distributions - * - * @return string|null - */ - public function getCashLiquidationDistributions() - { - return $this->container['cash_liquidation_distributions']; - } - - /** - * Sets cash_liquidation_distributions - * - * @param string|null $cash_liquidation_distributions Cash liquidation distributions - * - * @return self - */ - public function setCashLiquidationDistributions($cash_liquidation_distributions) - { - $this->container['cash_liquidation_distributions'] = $cash_liquidation_distributions; - - return $this; - } - - /** - * Gets noncash_liquidation_distributions - * - * @return string|null - */ - public function getNoncashLiquidationDistributions() - { - return $this->container['noncash_liquidation_distributions']; - } - - /** - * Sets noncash_liquidation_distributions - * - * @param string|null $noncash_liquidation_distributions Noncash liquidation distributions - * - * @return self - */ - public function setNoncashLiquidationDistributions($noncash_liquidation_distributions) - { - $this->container['noncash_liquidation_distributions'] = $noncash_liquidation_distributions; - - return $this; - } - - /** - * Gets exempt_interest_dividends - * - * @return string|null - */ - public function getExemptInterestDividends() - { - return $this->container['exempt_interest_dividends']; - } - - /** - * Sets exempt_interest_dividends - * - * @param string|null $exempt_interest_dividends Exempt-interest dividends - * - * @return self - */ - public function setExemptInterestDividends($exempt_interest_dividends) - { - $this->container['exempt_interest_dividends'] = $exempt_interest_dividends; - - return $this; - } - - /** - * Gets specified_private_activity_bond_interest_dividends - * - * @return string|null - */ - public function getSpecifiedPrivateActivityBondInterestDividends() - { - return $this->container['specified_private_activity_bond_interest_dividends']; - } - - /** - * Sets specified_private_activity_bond_interest_dividends - * - * @param string|null $specified_private_activity_bond_interest_dividends Specified private activity bond interest dividends - * - * @return self - */ - public function setSpecifiedPrivateActivityBondInterestDividends($specified_private_activity_bond_interest_dividends) - { - $this->container['specified_private_activity_bond_interest_dividends'] = $specified_private_activity_bond_interest_dividends; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement FATCA filing requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id Issuer ID - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id Reference ID - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin Recipient Tax ID Number - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name Recipient name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name Recipient second name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string $address Address - * - * @return self - */ - public function setAddress($address) - { - - if ((mb_strlen($address) < 1)) { - throw new \InvalidArgumentException('invalid length for $address when calling IUpdateForm1099Request., must be bigger than or equal to 1.'); - } - - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 Address line 2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string $city City - * - * @return self - */ - public function setCity($city) - { - - if ((mb_strlen($city) < 1)) { - throw new \InvalidArgumentException('invalid length for $city when calling IUpdateForm1099Request., must be bigger than or equal to 1.'); - } - - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state. Required if CountryCode is \"US\". - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip Zip/postal code - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Recipient email address - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number Account number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code Office code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province Foreign province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string $country_code Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * - * @return self - */ - public function setCountryCode($country_code) - { - - if ((mb_strlen($country_code) < 1)) { - throw new \InvalidArgumentException('invalid length for $country_code when calling IUpdateForm1099Request., must be bigger than or equal to 1.'); - } - - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file Boolean indicating that federal e-filing should be scheduled for this form - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail Boolean indicating that postal mailing to the recipient should be scheduled for this form - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file Boolean indicating that state e-filing should be scheduled for this form - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match Boolean indicating that TIN Matching should be scheduled for this form - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin Indicates whether the recipient has no TIN - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice Second TIN notice in three years - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification Boolean indicating that address verification should be scheduled for this form - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingRequest|null $state_and_local_withholding State and local withholding information - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets rents - * - * @return float|null - */ - public function getRents() - { - return $this->container['rents']; - } - - /** - * Sets rents - * - * @param float|null $rents Rents - * - * @return self - */ - public function setRents($rents) - { - $this->container['rents'] = $rents; - - return $this; - } - - /** - * Gets royalties - * - * @return float|null - */ - public function getRoyalties() - { - return $this->container['royalties']; - } - - /** - * Sets royalties - * - * @param float|null $royalties Royalties - * - * @return self - */ - public function setRoyalties($royalties) - { - $this->container['royalties'] = $royalties; - - return $this; - } - - /** - * Gets other_income - * - * @return float|null - */ - public function getOtherIncome() - { - return $this->container['other_income']; - } - - /** - * Sets other_income - * - * @param float|null $other_income Other income - * - * @return self - */ - public function setOtherIncome($other_income) - { - $this->container['other_income'] = $other_income; - - return $this; - } - - /** - * Gets fed_income_tax_withheld - * - * @return float|null - */ - public function getFedIncomeTaxWithheld() - { - return $this->container['fed_income_tax_withheld']; - } - - /** - * Sets fed_income_tax_withheld - * - * @param float|null $fed_income_tax_withheld Federal income tax withheld - * - * @return self - */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) - { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; - - return $this; - } - - /** - * Gets fishing_boat_proceeds - * - * @return float|null - */ - public function getFishingBoatProceeds() - { - return $this->container['fishing_boat_proceeds']; - } - - /** - * Sets fishing_boat_proceeds - * - * @param float|null $fishing_boat_proceeds Fishing boat proceeds - * - * @return self - */ - public function setFishingBoatProceeds($fishing_boat_proceeds) - { - $this->container['fishing_boat_proceeds'] = $fishing_boat_proceeds; - - return $this; - } - - /** - * Gets medical_and_health_care_payments - * - * @return float|null - */ - public function getMedicalAndHealthCarePayments() - { - return $this->container['medical_and_health_care_payments']; - } - - /** - * Sets medical_and_health_care_payments - * - * @param float|null $medical_and_health_care_payments Medical and health care payments - * - * @return self - */ - public function setMedicalAndHealthCarePayments($medical_and_health_care_payments) - { - $this->container['medical_and_health_care_payments'] = $medical_and_health_care_payments; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets substitute_payments - * - * @return float|null - */ - public function getSubstitutePayments() - { - return $this->container['substitute_payments']; - } - - /** - * Sets substitute_payments - * - * @param float|null $substitute_payments Substitute payments in lieu of dividends or interest - * - * @return self - */ - public function setSubstitutePayments($substitute_payments) - { - $this->container['substitute_payments'] = $substitute_payments; - - return $this; - } - - /** - * Gets crop_insurance_proceeds - * - * @return float|null - */ - public function getCropInsuranceProceeds() - { - return $this->container['crop_insurance_proceeds']; - } - - /** - * Sets crop_insurance_proceeds - * - * @param float|null $crop_insurance_proceeds Crop insurance proceeds - * - * @return self - */ - public function setCropInsuranceProceeds($crop_insurance_proceeds) - { - $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; - - return $this; - } - - /** - * Gets gross_proceeds_paid_to_attorney - * - * @return float|null - */ - public function getGrossProceedsPaidToAttorney() - { - return $this->container['gross_proceeds_paid_to_attorney']; - } - - /** - * Sets gross_proceeds_paid_to_attorney - * - * @param float|null $gross_proceeds_paid_to_attorney Gross proceeds paid to an attorney - * - * @return self - */ - public function setGrossProceedsPaidToAttorney($gross_proceeds_paid_to_attorney) - { - $this->container['gross_proceeds_paid_to_attorney'] = $gross_proceeds_paid_to_attorney; - - return $this; - } - - /** - * Gets fish_purchased_for_resale - * - * @return float|null - */ - public function getFishPurchasedForResale() - { - return $this->container['fish_purchased_for_resale']; - } - - /** - * Sets fish_purchased_for_resale - * - * @param float|null $fish_purchased_for_resale Fish purchased for resale - * - * @return self - */ - public function setFishPurchasedForResale($fish_purchased_for_resale) - { - $this->container['fish_purchased_for_resale'] = $fish_purchased_for_resale; - - return $this; - } - - /** - * Gets section409_a_deferrals - * - * @return float|null - */ - public function getSection409ADeferrals() - { - return $this->container['section409_a_deferrals']; - } - - /** - * Sets section409_a_deferrals - * - * @param float|null $section409_a_deferrals Section 409A deferrals - * - * @return self - */ - public function setSection409ADeferrals($section409_a_deferrals) - { - $this->container['section409_a_deferrals'] = $section409_a_deferrals; - - return $this; - } - - /** - * Gets excess_golden_parachute_payments - * - * @return float|null - */ - public function getExcessGoldenParachutePayments() - { - return $this->container['excess_golden_parachute_payments']; - } - - /** - * Sets excess_golden_parachute_payments - * - * @param float|null $excess_golden_parachute_payments (Legacy field) Excess golden parachute payments - * - * @return self - */ - public function setExcessGoldenParachutePayments($excess_golden_parachute_payments) - { - $this->container['excess_golden_parachute_payments'] = $excess_golden_parachute_payments; - - return $this; - } - - /** - * Gets nonqualified_deferred_compensation - * - * @return float|null - */ - public function getNonqualifiedDeferredCompensation() - { - return $this->container['nonqualified_deferred_compensation']; - } - - /** - * Sets nonqualified_deferred_compensation - * - * @param float|null $nonqualified_deferred_compensation Nonqualified deferred compensation - * - * @return self - */ - public function setNonqualifiedDeferredCompensation($nonqualified_deferred_compensation) - { - $this->container['nonqualified_deferred_compensation'] = $nonqualified_deferred_compensation; - - return $this; - } - - /** - * Gets filer_type - * - * @return string|null - */ - public function getFilerType() - { - return $this->container['filer_type']; - } - - /** - * Sets filer_type - * - * @param string|null $filer_type Filer type (PSE or EPF) - * - * @return self - */ - public function setFilerType($filer_type) - { - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($filer_type) && !in_array($filer_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'filer_type', must be one of '%s'", - $filer_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['filer_type'] = $filer_type; - - return $this; - } - - /** - * Gets payment_type - * - * @return string|null - */ - public function getPaymentType() - { - return $this->container['payment_type']; - } - - /** - * Sets payment_type - * - * @param string|null $payment_type Payment type (payment card or third party network) - * - * @return self - */ - public function setPaymentType($payment_type) - { - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($payment_type) && !in_array($payment_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'payment_type', must be one of '%s'", - $payment_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['payment_type'] = $payment_type; - - return $this; - } - - /** - * Gets payment_settlement_entity_name_phone_number - * - * @return string|null - */ - public function getPaymentSettlementEntityNamePhoneNumber() - { - return $this->container['payment_settlement_entity_name_phone_number']; - } - - /** - * Sets payment_settlement_entity_name_phone_number - * - * @param string|null $payment_settlement_entity_name_phone_number Payment settlement entity name and phone number - * - * @return self - */ - public function setPaymentSettlementEntityNamePhoneNumber($payment_settlement_entity_name_phone_number) - { - $this->container['payment_settlement_entity_name_phone_number'] = $payment_settlement_entity_name_phone_number; - - return $this; - } - - /** - * Gets gross_amount_payment_card - * - * @return float|null - */ - public function getGrossAmountPaymentCard() - { - return $this->container['gross_amount_payment_card']; - } - - /** - * Sets gross_amount_payment_card - * - * @param float|null $gross_amount_payment_card Gross amount of payment card/third party network transactions - * - * @return self - */ - public function setGrossAmountPaymentCard($gross_amount_payment_card) - { - $this->container['gross_amount_payment_card'] = $gross_amount_payment_card; - - return $this; - } - - /** - * Gets card_not_present_transactions - * - * @return float|null - */ - public function getCardNotPresentTransactions() - { - return $this->container['card_not_present_transactions']; - } - - /** - * Sets card_not_present_transactions - * - * @param float|null $card_not_present_transactions Card not present transactions - * - * @return self - */ - public function setCardNotPresentTransactions($card_not_present_transactions) - { - $this->container['card_not_present_transactions'] = $card_not_present_transactions; - - return $this; - } - - /** - * Gets merchant_category_code - * - * @return string|null - */ - public function getMerchantCategoryCode() - { - return $this->container['merchant_category_code']; - } - - /** - * Sets merchant_category_code - * - * @param string|null $merchant_category_code Merchant category code - * - * @return self - */ - public function setMerchantCategoryCode($merchant_category_code) - { - $this->container['merchant_category_code'] = $merchant_category_code; - - return $this; - } - - /** - * Gets payment_transaction_number - * - * @return float|null - */ - public function getPaymentTransactionNumber() - { - return $this->container['payment_transaction_number']; - } - - /** - * Sets payment_transaction_number - * - * @param float|null $payment_transaction_number Number of payment transactions - * - * @return self - */ - public function setPaymentTransactionNumber($payment_transaction_number) - { - $this->container['payment_transaction_number'] = $payment_transaction_number; - - return $this; - } - - /** - * Gets january - * - * @return float|null - */ - public function getJanuary() - { - return $this->container['january']; - } - - /** - * Sets january - * - * @param float|null $january January gross payments - * - * @return self - */ - public function setJanuary($january) - { - $this->container['january'] = $january; - - return $this; - } - - /** - * Gets february - * - * @return float|null - */ - public function getFebruary() - { - return $this->container['february']; - } - - /** - * Sets february - * - * @param float|null $february February gross payments - * - * @return self - */ - public function setFebruary($february) - { - $this->container['february'] = $february; - - return $this; - } - - /** - * Gets march - * - * @return float|null - */ - public function getMarch() - { - return $this->container['march']; - } - - /** - * Sets march - * - * @param float|null $march March gross payments - * - * @return self - */ - public function setMarch($march) - { - $this->container['march'] = $march; - - return $this; - } - - /** - * Gets april - * - * @return float|null - */ - public function getApril() - { - return $this->container['april']; - } - - /** - * Sets april - * - * @param float|null $april April gross payments - * - * @return self - */ - public function setApril($april) - { - $this->container['april'] = $april; - - return $this; - } - - /** - * Gets may - * - * @return float|null - */ - public function getMay() - { - return $this->container['may']; - } - - /** - * Sets may - * - * @param float|null $may May gross payments - * - * @return self - */ - public function setMay($may) - { - $this->container['may'] = $may; - - return $this; - } - - /** - * Gets june - * - * @return float|null - */ - public function getJune() - { - return $this->container['june']; - } - - /** - * Sets june - * - * @param float|null $june June gross payments - * - * @return self - */ - public function setJune($june) - { - $this->container['june'] = $june; - - return $this; - } - - /** - * Gets july - * - * @return float|null - */ - public function getJuly() - { - return $this->container['july']; - } - - /** - * Sets july - * - * @param float|null $july July gross payments - * - * @return self - */ - public function setJuly($july) - { - $this->container['july'] = $july; - - return $this; - } - - /** - * Gets august - * - * @return float|null - */ - public function getAugust() - { - return $this->container['august']; - } - - /** - * Sets august - * - * @param float|null $august August gross payments - * - * @return self - */ - public function setAugust($august) - { - $this->container['august'] = $august; - - return $this; - } - - /** - * Gets sept - * - * @return float|null - */ - public function getSept() - { - return $this->container['sept']; - } - - /** - * Sets sept - * - * @param float|null $sept September gross payments - * - * @return self - */ - public function setSept($sept) - { - $this->container['sept'] = $sept; - - return $this; - } - - /** - * Gets october - * - * @return float|null - */ - public function getOctober() - { - return $this->container['october']; - } - - /** - * Sets october - * - * @param float|null $october October gross payments - * - * @return self - */ - public function setOctober($october) - { - $this->container['october'] = $october; - - return $this; - } - - /** - * Gets november - * - * @return float|null - */ - public function getNovember() - { - return $this->container['november']; - } - - /** - * Sets november - * - * @param float|null $november November gross payments - * - * @return self - */ - public function setNovember($november) - { - $this->container['november'] = $november; - - return $this; - } - - /** - * Gets december - * - * @return float|null - */ - public function getDecember() - { - return $this->container['december']; - } - - /** - * Sets december - * - * @param float|null $december December gross payments - * - * @return self - */ - public function setDecember($december) - { - $this->container['december'] = $december; - - return $this; - } - - /** - * Gets nonemployee_compensation - * - * @return float - */ - public function getNonemployeeCompensation() - { - return $this->container['nonemployee_compensation']; - } - - /** - * Sets nonemployee_compensation - * - * @param float $nonemployee_compensation Nonemployee compensation - * - * @return self - */ - public function setNonemployeeCompensation($nonemployee_compensation) - { - $this->container['nonemployee_compensation'] = $nonemployee_compensation; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/IncludedBase.php b/lib/Model/A1099/V2/IncludedBase.php deleted file mode 100644 index ef2bec8..0000000 --- a/lib/Model/A1099/V2/IncludedBase.php +++ /dev/null @@ -1,362 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * IncludedBase Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class IncludedBase implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'IncludedBase'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'id' => 'string', - 'type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'id' => null, - 'type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'type' => 'type' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'type' => 'setType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'type' => 'getType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/IntermediaryOrFlowThrough.php b/lib/Model/A1099/V2/IntermediaryOrFlowThrough.php index 84736f9..d9ad7c7 100644 --- a/lib/Model/A1099/V2/IntermediaryOrFlowThrough.php +++ b/lib/Model/A1099/V2/IntermediaryOrFlowThrough.php @@ -47,6 +47,7 @@ * IntermediaryOrFlowThrough Class Doc Comment * * @category Class + * @description Intermediary or flow-through entity information for tax forms * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -290,7 +291,7 @@ public function getEin() /** * Sets ein * - * @param string|null $ein ein + * @param string|null $ein EIN (Employer Identification Number) of the intermediary or flow-through entity * * @return self */ @@ -314,7 +315,7 @@ public function getChap3StatusCode() /** * Sets chap3_status_code * - * @param string|null $chap3_status_code chap3_status_code + * @param string|null $chap3_status_code Chapter 3 status code for the intermediary or flow-through entity * * @return self */ @@ -338,7 +339,7 @@ public function getChap4StatusCode() /** * Sets chap4_status_code * - * @param string|null $chap4_status_code chap4_status_code + * @param string|null $chap4_status_code Chapter 4 status code for the intermediary or flow-through entity * * @return self */ @@ -362,7 +363,7 @@ public function getName() /** * Sets name * - * @param string|null $name name + * @param string|null $name Name of the intermediary or flow-through entity * * @return self */ @@ -386,7 +387,7 @@ public function getGiin() /** * Sets giin * - * @param string|null $giin giin + * @param string|null $giin GIIN (Global Intermediary Identification Number) of the intermediary or flow-through entity * * @return self */ @@ -410,7 +411,7 @@ public function getCountryCode() /** * Sets country_code * - * @param string|null $country_code country_code + * @param string|null $country_code Country code for the intermediary or flow-through entity * * @return self */ @@ -434,7 +435,7 @@ public function getForeignTin() /** * Sets foreign_tin * - * @param string|null $foreign_tin foreign_tin + * @param string|null $foreign_tin Foreign TIN of the intermediary or flow-through entity * * @return self */ @@ -458,7 +459,7 @@ public function getAddress() /** * Sets address * - * @param string|null $address address + * @param string|null $address Address of the intermediary or flow-through entity * * @return self */ @@ -482,7 +483,7 @@ public function getCity() /** * Sets city * - * @param string|null $city city + * @param string|null $city City of the intermediary or flow-through entity * * @return self */ @@ -506,7 +507,7 @@ public function getState() /** * Sets state * - * @param string|null $state state + * @param string|null $state State of the intermediary or flow-through entity * * @return self */ @@ -530,7 +531,7 @@ public function getZip() /** * Sets zip * - * @param string|null $zip zip + * @param string|null $zip Zip code of the intermediary or flow-through entity * * @return self */ diff --git a/lib/Model/A1099/V2/IssuerCommand.php b/lib/Model/A1099/V2/IssuerCommand.php index b707edd..45dfb53 100644 --- a/lib/Model/A1099/V2/IssuerCommand.php +++ b/lib/Model/A1099/V2/IssuerCommand.php @@ -72,7 +72,7 @@ class IssuerCommand implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'name' => 'string', - 'name_dba' => 'string', + 'dba_name' => 'string', 'tin' => 'string', 'reference_id' => 'string', 'telephone' => 'string', @@ -97,7 +97,7 @@ class IssuerCommand implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'name' => null, - 'name_dba' => null, + 'dba_name' => null, 'tin' => null, 'reference_id' => null, 'telephone' => null, @@ -141,7 +141,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'name' => 'name', - 'name_dba' => 'nameDba', + 'dba_name' => 'dbaName', 'tin' => 'tin', 'reference_id' => 'referenceId', 'telephone' => 'telephone', @@ -164,7 +164,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'name' => 'setName', - 'name_dba' => 'setNameDba', + 'dba_name' => 'setDbaName', 'tin' => 'setTin', 'reference_id' => 'setReferenceId', 'telephone' => 'setTelephone', @@ -187,7 +187,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'name' => 'getName', - 'name_dba' => 'getNameDba', + 'dba_name' => 'getDbaName', 'tin' => 'getTin', 'reference_id' => 'getReferenceId', 'telephone' => 'getTelephone', @@ -261,7 +261,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['name'] = $data['name'] ?? null; - $this->container['name_dba'] = $data['name_dba'] ?? null; + $this->container['dba_name'] = $data['dba_name'] ?? null; $this->container['tin'] = $data['tin'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['telephone'] = $data['telephone'] ?? null; @@ -286,6 +286,33 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['telephone'] === null) { + $invalidProperties[] = "'telephone' can't be null"; + } + if ($this->container['tax_year'] === null) { + $invalidProperties[] = "'tax_year' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + if ($this->container['zip'] === null) { + $invalidProperties[] = "'zip' can't be null"; + } + if ($this->container['last_filing'] === null) { + $invalidProperties[] = "'last_filing' can't be null"; + } return $invalidProperties; } @@ -304,7 +331,7 @@ public function valid() /** * Gets name * - * @return string|null + * @return string */ public function getName() { @@ -314,7 +341,7 @@ public function getName() /** * Sets name * - * @param string|null $name Legal name, not DBA + * @param string $name Legal name. Not the DBA name. * * @return self */ @@ -326,25 +353,25 @@ public function setName($name) } /** - * Gets name_dba + * Gets dba_name * * @return string|null */ - public function getNameDba() + public function getDbaName() { - return $this->container['name_dba']; + return $this->container['dba_name']; } /** - * Sets name_dba + * Sets dba_name * - * @param string|null $name_dba Optional DBA name or continuation of a long legal name + * @param string|null $dba_name Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. * * @return self */ - public function setNameDba($name_dba) + public function setDbaName($dba_name) { - $this->container['name_dba'] = $name_dba; + $this->container['dba_name'] = $dba_name; return $this; } @@ -362,7 +389,7 @@ public function getTin() /** * Sets tin * - * @param string|null $tin Tax identification number + * @param string|null $tin Federal Tax Identification Number (TIN). * * @return self */ @@ -386,7 +413,7 @@ public function getReferenceId() /** * Sets reference_id * - * @param string|null $reference_id Optional identifier for your reference, never shown to any agency or recipient. We will also prefix download filenames with this value, if present. Can only include letters, numbers, dashes, underscores and spaces. + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. * * @return self */ @@ -400,7 +427,7 @@ public function setReferenceId($reference_id) /** * Gets telephone * - * @return string|null + * @return string */ public function getTelephone() { @@ -410,7 +437,7 @@ public function getTelephone() /** * Sets telephone * - * @param string|null $telephone Telephone number + * @param string $telephone Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. * * @return self */ @@ -424,7 +451,7 @@ public function setTelephone($telephone) /** * Gets tax_year * - * @return int|null + * @return int */ public function getTaxYear() { @@ -434,7 +461,7 @@ public function getTaxYear() /** * Sets tax_year * - * @param int|null $tax_year Tax year + * @param int $tax_year Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. * * @return self */ @@ -458,7 +485,7 @@ public function getCountryCode() /** * Sets country_code * - * @param string|null $country_code If there is a transfer agent, use the shipping address of the transfer agent. + * @param string|null $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. * * @return self */ @@ -472,7 +499,7 @@ public function setCountryCode($country_code) /** * Gets email * - * @return string|null + * @return string */ public function getEmail() { @@ -482,7 +509,7 @@ public function getEmail() /** * Sets email * - * @param string|null $email Email address + * @param string $email Contact email address. For recipient inquiries. * * @return self */ @@ -496,7 +523,7 @@ public function setEmail($email) /** * Gets address * - * @return string|null + * @return string */ public function getAddress() { @@ -506,7 +533,7 @@ public function getAddress() /** * Sets address * - * @param string|null $address Address + * @param string $address Address. * * @return self */ @@ -520,7 +547,7 @@ public function setAddress($address) /** * Gets city * - * @return string|null + * @return string */ public function getCity() { @@ -530,7 +557,7 @@ public function getCity() /** * Sets city * - * @param string|null $city City + * @param string $city City. * * @return self */ @@ -544,7 +571,7 @@ public function setCity($city) /** * Gets state * - * @return string|null + * @return string */ public function getState() { @@ -554,7 +581,7 @@ public function getState() /** * Sets state * - * @param string|null $state State + * @param string $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ @@ -568,7 +595,7 @@ public function setState($state) /** * Gets zip * - * @return string|null + * @return string */ public function getZip() { @@ -578,7 +605,7 @@ public function getZip() /** * Sets zip * - * @param string|null $zip Zip code + * @param string $zip ZIP/postal code. * * @return self */ @@ -602,7 +629,7 @@ public function getForeignProvince() /** * Sets foreign_province * - * @param string|null $foreign_province Foreign province + * @param string|null $foreign_province Province or region for non-US/CA addresses. * * @return self */ @@ -626,7 +653,7 @@ public function getTransferAgentName() /** * Sets transfer_agent_name * - * @param string|null $transfer_agent_name Transfer Agent's Name + * @param string|null $transfer_agent_name Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. * * @return self */ @@ -640,7 +667,7 @@ public function setTransferAgentName($transfer_agent_name) /** * Gets last_filing * - * @return bool|null + * @return bool */ public function getLastFiling() { @@ -650,7 +677,7 @@ public function getLastFiling() /** * Sets last_filing * - * @param bool|null $last_filing Last year of filing for this payer + * @param bool $last_filing Indicates if this is the issuer's final year filing. * * @return self */ diff --git a/lib/Model/A1099/V2/IssuerResponse.php b/lib/Model/A1099/V2/IssuerResponse.php index 81e0f38..39bd5cc 100644 --- a/lib/Model/A1099/V2/IssuerResponse.php +++ b/lib/Model/A1099/V2/IssuerResponse.php @@ -72,8 +72,10 @@ class IssuerResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'id' => 'string', + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', 'name' => 'string', - 'name_dba' => 'string', + 'dba_name' => 'string', 'tin' => 'string', 'reference_id' => 'string', 'telephone' => 'string', @@ -86,9 +88,7 @@ class IssuerResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'zip' => 'string', 'foreign_province' => 'string', 'transfer_agent_name' => 'string', - 'last_filing' => 'bool', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' + 'last_filing' => 'bool' ]; /** @@ -100,8 +100,10 @@ class IssuerResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'id' => null, + 'created_at' => 'date-time', + 'updated_at' => 'date-time', 'name' => null, - 'name_dba' => null, + 'dba_name' => null, 'tin' => null, 'reference_id' => null, 'telephone' => null, @@ -114,9 +116,7 @@ class IssuerResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'zip' => null, 'foreign_province' => null, 'transfer_agent_name' => null, - 'last_filing' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time' + 'last_filing' => null ]; /** @@ -147,8 +147,10 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'id' => 'id', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', 'name' => 'name', - 'name_dba' => 'nameDba', + 'dba_name' => 'dbaName', 'tin' => 'tin', 'reference_id' => 'referenceId', 'telephone' => 'telephone', @@ -161,9 +163,7 @@ public static function openAPIFormats() 'zip' => 'zip', 'foreign_province' => 'foreignProvince', 'transfer_agent_name' => 'transferAgentName', - 'last_filing' => 'lastFiling', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt' + 'last_filing' => 'lastFiling' ]; /** @@ -173,8 +173,10 @@ public static function openAPIFormats() */ protected static $setters = [ 'id' => 'setId', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', 'name' => 'setName', - 'name_dba' => 'setNameDba', + 'dba_name' => 'setDbaName', 'tin' => 'setTin', 'reference_id' => 'setReferenceId', 'telephone' => 'setTelephone', @@ -187,9 +189,7 @@ public static function openAPIFormats() 'zip' => 'setZip', 'foreign_province' => 'setForeignProvince', 'transfer_agent_name' => 'setTransferAgentName', - 'last_filing' => 'setLastFiling', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' + 'last_filing' => 'setLastFiling' ]; /** @@ -199,8 +199,10 @@ public static function openAPIFormats() */ protected static $getters = [ 'id' => 'getId', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', 'name' => 'getName', - 'name_dba' => 'getNameDba', + 'dba_name' => 'getDbaName', 'tin' => 'getTin', 'reference_id' => 'getReferenceId', 'telephone' => 'getTelephone', @@ -213,9 +215,7 @@ public static function openAPIFormats() 'zip' => 'getZip', 'foreign_province' => 'getForeignProvince', 'transfer_agent_name' => 'getTransferAgentName', - 'last_filing' => 'getLastFiling', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' + 'last_filing' => 'getLastFiling' ]; /** @@ -276,8 +276,10 @@ public function getModelName() public function __construct(array $data = null) { $this->container['id'] = $data['id'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['name'] = $data['name'] ?? null; - $this->container['name_dba'] = $data['name_dba'] ?? null; + $this->container['dba_name'] = $data['dba_name'] ?? null; $this->container['tin'] = $data['tin'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['telephone'] = $data['telephone'] ?? null; @@ -291,8 +293,6 @@ public function __construct(array $data = null) $this->container['foreign_province'] = $data['foreign_province'] ?? null; $this->container['transfer_agent_name'] = $data['transfer_agent_name'] ?? null; $this->container['last_filing'] = $data['last_filing'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -304,6 +304,33 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['telephone'] === null) { + $invalidProperties[] = "'telephone' can't be null"; + } + if ($this->container['tax_year'] === null) { + $invalidProperties[] = "'tax_year' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + if ($this->container['zip'] === null) { + $invalidProperties[] = "'zip' can't be null"; + } + if ($this->container['last_filing'] === null) { + $invalidProperties[] = "'last_filing' can't be null"; + } return $invalidProperties; } @@ -332,7 +359,7 @@ public function getId() /** * Sets id * - * @param string|null $id Unique identifier set when the record is created + * @param string|null $id Unique identifier set when the record is created. * * @return self */ @@ -343,10 +370,58 @@ public function setId($id) return $this; } + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at Date time when the record was created. + * + * @return self + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at Date time when the record was last updated. + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } + /** * Gets name * - * @return string|null + * @return string */ public function getName() { @@ -356,7 +431,7 @@ public function getName() /** * Sets name * - * @param string|null $name Legal name, not DBA + * @param string $name Legal name. Not the DBA name. * * @return self */ @@ -368,25 +443,25 @@ public function setName($name) } /** - * Gets name_dba + * Gets dba_name * * @return string|null */ - public function getNameDba() + public function getDbaName() { - return $this->container['name_dba']; + return $this->container['dba_name']; } /** - * Sets name_dba + * Sets dba_name * - * @param string|null $name_dba Optional DBA name or continuation of a long legal name + * @param string|null $dba_name Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. * * @return self */ - public function setNameDba($name_dba) + public function setDbaName($dba_name) { - $this->container['name_dba'] = $name_dba; + $this->container['dba_name'] = $dba_name; return $this; } @@ -404,7 +479,7 @@ public function getTin() /** * Sets tin * - * @param string|null $tin Tax identification number + * @param string|null $tin Federal Tax Identification Number (TIN). * * @return self */ @@ -428,7 +503,7 @@ public function getReferenceId() /** * Sets reference_id * - * @param string|null $reference_id Optional identifier for your reference, never shown to any agency or recipient. We will also prefix download filenames with this value, if present. Can only include letters, numbers, dashes, underscores and spaces. + * @param string|null $reference_id Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. * * @return self */ @@ -442,7 +517,7 @@ public function setReferenceId($reference_id) /** * Gets telephone * - * @return string|null + * @return string */ public function getTelephone() { @@ -452,7 +527,7 @@ public function getTelephone() /** * Sets telephone * - * @param string|null $telephone Telephone number + * @param string $telephone Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. * * @return self */ @@ -466,7 +541,7 @@ public function setTelephone($telephone) /** * Gets tax_year * - * @return int|null + * @return int */ public function getTaxYear() { @@ -476,7 +551,7 @@ public function getTaxYear() /** * Sets tax_year * - * @param int|null $tax_year Tax year + * @param int $tax_year Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. * * @return self */ @@ -500,7 +575,7 @@ public function getCountryCode() /** * Sets country_code * - * @param string|null $country_code If there is a transfer agent, use the address of the transfer agent. + * @param string|null $country_code Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. * * @return self */ @@ -514,7 +589,7 @@ public function setCountryCode($country_code) /** * Gets email * - * @return string|null + * @return string */ public function getEmail() { @@ -524,7 +599,7 @@ public function getEmail() /** * Sets email * - * @param string|null $email Email address + * @param string $email Contact email address. For recipient inquiries. * * @return self */ @@ -538,7 +613,7 @@ public function setEmail($email) /** * Gets address * - * @return string|null + * @return string */ public function getAddress() { @@ -548,7 +623,7 @@ public function getAddress() /** * Sets address * - * @param string|null $address Address + * @param string $address Address. * * @return self */ @@ -562,7 +637,7 @@ public function setAddress($address) /** * Gets city * - * @return string|null + * @return string */ public function getCity() { @@ -572,7 +647,7 @@ public function getCity() /** * Sets city * - * @param string|null $city City + * @param string $city City. * * @return self */ @@ -586,7 +661,7 @@ public function setCity($city) /** * Gets state * - * @return string|null + * @return string */ public function getState() { @@ -596,7 +671,7 @@ public function getState() /** * Sets state * - * @param string|null $state State + * @param string $state Two-letter US state or Canadian province code (required for US/CA addresses). * * @return self */ @@ -610,7 +685,7 @@ public function setState($state) /** * Gets zip * - * @return string|null + * @return string */ public function getZip() { @@ -620,7 +695,7 @@ public function getZip() /** * Sets zip * - * @param string|null $zip Zip code + * @param string $zip ZIP/postal code. * * @return self */ @@ -644,7 +719,7 @@ public function getForeignProvince() /** * Sets foreign_province * - * @param string|null $foreign_province Foreign province + * @param string|null $foreign_province Province or region for non-US/CA addresses. * * @return self */ @@ -668,7 +743,7 @@ public function getTransferAgentName() /** * Sets transfer_agent_name * - * @param string|null $transfer_agent_name Transfer Agent's Name + * @param string|null $transfer_agent_name Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. * * @return self */ @@ -682,7 +757,7 @@ public function setTransferAgentName($transfer_agent_name) /** * Gets last_filing * - * @return bool|null + * @return bool */ public function getLastFiling() { @@ -692,7 +767,7 @@ public function getLastFiling() /** * Sets last_filing * - * @param bool|null $last_filing Last year of filing for this payer + * @param bool $last_filing Indicates if this is the issuer's final year filing. * * @return self */ @@ -702,54 +777,6 @@ public function setLastFiling($last_filing) return $this; } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Date time when the issuer was created - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Date time when the issuer was updated - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/JobResult.php b/lib/Model/A1099/V2/JobResponse.php similarity index 80% rename from lib/Model/A1099/V2/JobResult.php rename to lib/Model/A1099/V2/JobResponse.php index 0804081..9b39267 100644 --- a/lib/Model/A1099/V2/JobResult.php +++ b/lib/Model/A1099/V2/JobResponse.php @@ -1,6 +1,6 @@ 'string', 'type' => 'string', - 'dry_run' => 'bool', - 'upsert' => 'bool', 'status' => 'string', 'error_message' => 'string', 'total_processed' => 'int', @@ -88,7 +87,11 @@ class JobResult implements ModelInterface, ArrayAccess, \JsonSerializable 'not_found' => 'int', 'created_invalid' => 'int', 'created_no_email' => 'int', - 'created_valid' => 'int' + 'created_valid' => 'int', + 'dry_run' => 'bool', + 'upsert' => 'bool', + 'link' => 'string', + 'processed_forms' => '\Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]' ]; /** @@ -101,8 +104,6 @@ class JobResult implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'id' => null, 'type' => null, - 'dry_run' => null, - 'upsert' => null, 'status' => null, 'error_message' => null, 'total_processed' => 'int32', @@ -116,7 +117,11 @@ class JobResult implements ModelInterface, ArrayAccess, \JsonSerializable 'not_found' => 'int32', 'created_invalid' => 'int32', 'created_no_email' => 'int32', - 'created_valid' => 'int32' + 'created_valid' => 'int32', + 'dry_run' => null, + 'upsert' => null, + 'link' => null, + 'processed_forms' => null ]; /** @@ -148,8 +153,6 @@ public static function openAPIFormats() protected static $attributeMap = [ 'id' => 'id', 'type' => 'type', - 'dry_run' => 'dryRun', - 'upsert' => 'upsert', 'status' => 'status', 'error_message' => 'errorMessage', 'total_processed' => 'totalProcessed', @@ -163,7 +166,11 @@ public static function openAPIFormats() 'not_found' => 'notFound', 'created_invalid' => 'createdInvalid', 'created_no_email' => 'createdNoEmail', - 'created_valid' => 'createdValid' + 'created_valid' => 'createdValid', + 'dry_run' => 'dryRun', + 'upsert' => 'upsert', + 'link' => 'link', + 'processed_forms' => 'processedForms' ]; /** @@ -174,8 +181,6 @@ public static function openAPIFormats() protected static $setters = [ 'id' => 'setId', 'type' => 'setType', - 'dry_run' => 'setDryRun', - 'upsert' => 'setUpsert', 'status' => 'setStatus', 'error_message' => 'setErrorMessage', 'total_processed' => 'setTotalProcessed', @@ -189,7 +194,11 @@ public static function openAPIFormats() 'not_found' => 'setNotFound', 'created_invalid' => 'setCreatedInvalid', 'created_no_email' => 'setCreatedNoEmail', - 'created_valid' => 'setCreatedValid' + 'created_valid' => 'setCreatedValid', + 'dry_run' => 'setDryRun', + 'upsert' => 'setUpsert', + 'link' => 'setLink', + 'processed_forms' => 'setProcessedForms' ]; /** @@ -200,8 +209,6 @@ public static function openAPIFormats() protected static $getters = [ 'id' => 'getId', 'type' => 'getType', - 'dry_run' => 'getDryRun', - 'upsert' => 'getUpsert', 'status' => 'getStatus', 'error_message' => 'getErrorMessage', 'total_processed' => 'getTotalProcessed', @@ -215,7 +222,11 @@ public static function openAPIFormats() 'not_found' => 'getNotFound', 'created_invalid' => 'getCreatedInvalid', 'created_no_email' => 'getCreatedNoEmail', - 'created_valid' => 'getCreatedValid' + 'created_valid' => 'getCreatedValid', + 'dry_run' => 'getDryRun', + 'upsert' => 'getUpsert', + 'link' => 'getLink', + 'processed_forms' => 'getProcessedForms' ]; /** @@ -259,6 +270,23 @@ public function getModelName() return self::$openAPIModelName; } + const STATUS_IN_PROGRESS = 'InProgress'; + const STATUS_SUCCESS = 'Success'; + const STATUS_FAILED = 'Failed'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_IN_PROGRESS, + self::STATUS_SUCCESS, + self::STATUS_FAILED, + ]; + } /** * Associative array for storing property values @@ -277,8 +305,6 @@ public function __construct(array $data = null) { $this->container['id'] = $data['id'] ?? null; $this->container['type'] = $data['type'] ?? null; - $this->container['dry_run'] = $data['dry_run'] ?? null; - $this->container['upsert'] = $data['upsert'] ?? null; $this->container['status'] = $data['status'] ?? null; $this->container['error_message'] = $data['error_message'] ?? null; $this->container['total_processed'] = $data['total_processed'] ?? null; @@ -293,6 +319,10 @@ public function __construct(array $data = null) $this->container['created_invalid'] = $data['created_invalid'] ?? null; $this->container['created_no_email'] = $data['created_no_email'] ?? null; $this->container['created_valid'] = $data['created_valid'] ?? null; + $this->container['dry_run'] = $data['dry_run'] ?? null; + $this->container['upsert'] = $data['upsert'] ?? null; + $this->container['link'] = $data['link'] ?? null; + $this->container['processed_forms'] = $data['processed_forms'] ?? null; } /** @@ -304,6 +334,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -332,7 +371,7 @@ public function getId() /** * Sets id * - * @param string|null $id id + * @param string|null $id Unique identifier for the job * * @return self */ @@ -356,7 +395,7 @@ public function getType() /** * Sets type * - * @param string|null $type type + * @param string|null $type Job type identifier. Will always be \"update_job\" for bulk upsert operations * * @return self */ @@ -367,54 +406,6 @@ public function setType($type) return $this; } - /** - * Gets dry_run - * - * @return bool|null - */ - public function getDryRun() - { - return $this->container['dry_run']; - } - - /** - * Sets dry_run - * - * @param bool|null $dry_run Dry run. If `true`, this job only simulates the changes but doesn't actually persist them. - * - * @return self - */ - public function setDryRun($dry_run) - { - $this->container['dry_run'] = $dry_run; - - return $this; - } - - /** - * Gets upsert - * - * @return bool|null - */ - public function getUpsert() - { - return $this->container['upsert']; - } - - /** - * Sets upsert - * - * @param bool|null $upsert Upsert. If `true`, this job will first attempt to update existing records if matches can be found. Matches are done in the following order: * Form ID * Form Reference ID and tax year * Form TIN and tax year - * - * @return self - */ - public function setUpsert($upsert) - { - $this->container['upsert'] = $upsert; - - return $this; - } - /** * Gets status * @@ -428,12 +419,22 @@ public function getStatus() /** * Sets status * - * @param string|null $status Status of the job + * @param string|null $status Current status of the job (e.g., Success, Failed, InProgress) * * @return self */ public function setStatus($status) { + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($status) && !in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } $this->container['status'] = $status; return $this; @@ -452,7 +453,7 @@ public function getErrorMessage() /** * Sets error_message * - * @param string|null $error_message error_message + * @param string|null $error_message Error message if the job failed, null otherwise * * @return self */ @@ -476,7 +477,7 @@ public function getTotalProcessed() /** * Sets total_processed * - * @param int|null $total_processed Total number of forms processed + * @param int|null $total_processed Total number of forms processed. Value can be 0 or another value based on what the job has available * * @return self */ @@ -500,7 +501,7 @@ public function getTotalRows() /** * Sets total_rows * - * @param int|null $total_rows Total number of forms in the request + * @param int|null $total_rows Total number of forms in the request. Value can be 0 or another value based on what the job has available * * @return self */ @@ -524,7 +525,7 @@ public function getUpdatedValid() /** * Sets updated_valid * - * @param int|null $updated_valid Number of forms updated and valid for e-filing and e-delivery + * @param int|null $updated_valid Number of forms updated and valid for e-filing and e-delivery. Value can be 0 or another value based on what the job has available * * @return self */ @@ -548,7 +549,7 @@ public function getUpdatedNoEmail() /** * Sets updated_no_email * - * @param int|null $updated_no_email Number of forms updated and valid for e-filing but missing email or email is undeliverable + * @param int|null $updated_no_email Number of forms updated and valid for e-filing but missing email or email is undeliverable. Value can be 0 or another value based on what the job has available * * @return self */ @@ -572,7 +573,7 @@ public function getUpdatedInvalid() /** * Sets updated_invalid * - * @param int|null $updated_invalid Number of forms updated but invalid for e-filing + * @param int|null $updated_invalid Number of forms updated but invalid for e-filing. Value can be 0 or another value based on what the job has available * * @return self */ @@ -596,7 +597,7 @@ public function getSkippedDuplicate() /** * Sets skipped_duplicate * - * @param int|null $skipped_duplicate Number of forms skipped because they would have updated a record already updated once in the request + * @param int|null $skipped_duplicate Number of forms skipped because they would have updated a record already updated once in the request. Value can be 0 or another value based on what the job has available * * @return self */ @@ -620,7 +621,7 @@ public function getSkippedInvalid() /** * Sets skipped_invalid * - * @param int|null $skipped_invalid Number of forms skipped because they would have made a form invalid and the form is already e-filed or scheduled for e-filing + * @param int|null $skipped_invalid Number of forms skipped because they would have made a form invalid and the form is already e-filed or scheduled for e-filing. Value can be 0 or another value based on what the job has available * * @return self */ @@ -644,7 +645,7 @@ public function getSkippedMultipleMatches() /** * Sets skipped_multiple_matches * - * @param int|null $skipped_multiple_matches Number of forms skipped because they matched multiple forms + * @param int|null $skipped_multiple_matches Number of forms skipped because they matched multiple forms. Value can be 0 or another value based on what the job has available * * @return self */ @@ -668,7 +669,7 @@ public function getNotFound() /** * Sets not_found * - * @param int|null $not_found Number of forms skipped because no matching form or issuer could be found + * @param int|null $not_found Number of forms skipped because no matching form or issuer could be found. Value can be 0 or another value based on what the job has available * * @return self */ @@ -692,7 +693,7 @@ public function getCreatedInvalid() /** * Sets created_invalid * - * @param int|null $created_invalid Number of new forms created because no matching form could be found (and `upsert` was true) - with errors + * @param int|null $created_invalid Number of new forms created because no matching form could be found (and `upsert` was true) - with errors. Value can be 0 or another value based on what the job has available * * @return self */ @@ -716,7 +717,7 @@ public function getCreatedNoEmail() /** * Sets created_no_email * - * @param int|null $created_no_email Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing but missing email or email is undeliverable + * @param int|null $created_no_email Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing but missing email or email is undeliverable. Value can be 0 or another value based on what the job has available * * @return self */ @@ -740,7 +741,7 @@ public function getCreatedValid() /** * Sets created_valid * - * @param int|null $created_valid Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing and e-delivery + * @param int|null $created_valid Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing and e-delivery. Value can be 0 or another value based on what the job has available * * @return self */ @@ -750,6 +751,104 @@ public function setCreatedValid($created_valid) return $this; } + + /** + * Gets dry_run + * + * @return bool|null + */ + public function getDryRun() + { + return $this->container['dry_run']; + } + + /** + * Sets dry_run + * + * @param bool|null $dry_run Dry run. If `true`, this job only simulates the changes but doesn't actually persist them. + * + * @return self + */ + public function setDryRun($dry_run) + { + $this->container['dry_run'] = $dry_run; + + return $this; + } + + /** + * Gets upsert + * + * @return bool|null + */ + public function getUpsert() + { + return $this->container['upsert']; + } + + /** + * Sets upsert + * + * @param bool|null $upsert Upsert. If `true`, this job will first attempt to update existing records if matches can be found. Matches are done in the following order: Form ID, Form Reference ID and tax year, Form TIN and tax year. + * + * @return self + */ + public function setUpsert($upsert) + { + $this->container['upsert'] = $upsert; + + return $this; + } + + /** + * Gets link + * + * @return string|null + */ + public function getLink() + { + return $this->container['link']; + } + + /** + * Sets link + * + * @param string|null $link Link to access the job details + * + * @return self + */ + public function setLink($link) + { + $this->container['link'] = $link; + + return $this; + } + + /** + * Gets processed_forms + * + * @return \Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]|null + */ + public function getProcessedForms() + { + return $this->container['processed_forms']; + } + + /** + * Sets processed_forms + * + * @param \Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]|null $processed_forms List of processed forms returned when bulk-upsert processes ≤1000 records. Same format as GET /1099/forms response. Only available in bulk-upsert endpoint responses. + * + * @return self + */ + public function setProcessedForms($processed_forms) + { + + + $this->container['processed_forms'] = $processed_forms; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/Link.php b/lib/Model/A1099/V2/Link.php deleted file mode 100644 index 535896f..0000000 --- a/lib/Model/A1099/V2/Link.php +++ /dev/null @@ -1,332 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Link Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Link implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Link'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'self' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'self' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'self' => 'self' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'self' => 'setSelf' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'self' => 'getSelf' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['self'] = $data['self'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets self - * - * @return string|null - */ - public function getSelf() - { - return $this->container['self']; - } - - /** - * Sets self - * - * @param string|null $self self - * - * @return self - */ - public function setSelf($self) - { - $this->container['self'] = $self; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/OfferAndCoverage.php b/lib/Model/A1099/V2/OfferAndCoverage.php new file mode 100644 index 0000000..7fecc2f --- /dev/null +++ b/lib/Model/A1099/V2/OfferAndCoverage.php @@ -0,0 +1,655 @@ + + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\SDK\Model\A1099\V2; + +use \ArrayAccess; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; +/** + * OfferAndCoverage Class Doc Comment + * + * @category Class + * @description Offer and coverage information for health coverage forms + * @package Avalara\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class OfferAndCoverage implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'OfferAndCoverage'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'month' => 'string', + 'offer_code' => 'string', + 'share' => 'float', + 'safe_harbor_code' => 'string', + 'zip_code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => 'int32', + 'month' => null, + 'offer_code' => null, + 'share' => 'double', + 'safe_harbor_code' => null, + 'zip_code' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'month' => 'month', + 'offer_code' => 'offerCode', + 'share' => 'share', + 'safe_harbor_code' => 'safeHarborCode', + 'zip_code' => 'zipCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'month' => 'setMonth', + 'offer_code' => 'setOfferCode', + 'share' => 'setShare', + 'safe_harbor_code' => 'setSafeHarborCode', + 'zip_code' => 'setZipCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'month' => 'getMonth', + 'offer_code' => 'getOfferCode', + 'share' => 'getShare', + 'safe_harbor_code' => 'getSafeHarborCode', + 'zip_code' => 'getZipCode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const MONTH_ALL = 'All'; + const MONTH__01 = '01'; + const MONTH__02 = '02'; + const MONTH__03 = '03'; + const MONTH__04 = '04'; + const MONTH__05 = '05'; + const MONTH__06 = '06'; + const MONTH__07 = '07'; + const MONTH__08 = '08'; + const MONTH__09 = '09'; + const MONTH__10 = '10'; + const MONTH__11 = '11'; + const MONTH__12 = '12'; + const OFFER_CODE__1_A = '1A'; + const OFFER_CODE__1_B = '1B'; + const OFFER_CODE__1_C = '1C'; + const OFFER_CODE__1_D = '1D'; + const OFFER_CODE__1_E = '1E'; + const OFFER_CODE__1_F = '1F'; + const OFFER_CODE__1_G = '1G'; + const OFFER_CODE__1_H = '1H'; + const OFFER_CODE__1_J = '1J'; + const OFFER_CODE__1_K = '1K'; + const OFFER_CODE__1_L = '1L'; + const OFFER_CODE__1_M = '1M'; + const OFFER_CODE__1_N = '1N'; + const OFFER_CODE__1_O = '1O'; + const OFFER_CODE__1_P = '1P'; + const OFFER_CODE__1_Q = '1Q'; + const OFFER_CODE__1_R = '1R'; + const OFFER_CODE__1_S = '1S'; + const OFFER_CODE__1_T = '1T'; + const OFFER_CODE__1_U = '1U'; + const SAFE_HARBOR_CODE__2_A = '2A'; + const SAFE_HARBOR_CODE__2_B = '2B'; + const SAFE_HARBOR_CODE__2_C = '2C'; + const SAFE_HARBOR_CODE__2_D = '2D'; + const SAFE_HARBOR_CODE__2_E = '2E'; + const SAFE_HARBOR_CODE__2_F = '2F'; + const SAFE_HARBOR_CODE__2_G = '2G'; + const SAFE_HARBOR_CODE__2_H = '2H'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMonthAllowableValues() + { + return [ + self::MONTH_ALL, + self::MONTH__01, + self::MONTH__02, + self::MONTH__03, + self::MONTH__04, + self::MONTH__05, + self::MONTH__06, + self::MONTH__07, + self::MONTH__08, + self::MONTH__09, + self::MONTH__10, + self::MONTH__11, + self::MONTH__12, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOfferCodeAllowableValues() + { + return [ + self::OFFER_CODE__1_A, + self::OFFER_CODE__1_B, + self::OFFER_CODE__1_C, + self::OFFER_CODE__1_D, + self::OFFER_CODE__1_E, + self::OFFER_CODE__1_F, + self::OFFER_CODE__1_G, + self::OFFER_CODE__1_H, + self::OFFER_CODE__1_J, + self::OFFER_CODE__1_K, + self::OFFER_CODE__1_L, + self::OFFER_CODE__1_M, + self::OFFER_CODE__1_N, + self::OFFER_CODE__1_O, + self::OFFER_CODE__1_P, + self::OFFER_CODE__1_Q, + self::OFFER_CODE__1_R, + self::OFFER_CODE__1_S, + self::OFFER_CODE__1_T, + self::OFFER_CODE__1_U, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSafeHarborCodeAllowableValues() + { + return [ + self::SAFE_HARBOR_CODE__2_A, + self::SAFE_HARBOR_CODE__2_B, + self::SAFE_HARBOR_CODE__2_C, + self::SAFE_HARBOR_CODE__2_D, + self::SAFE_HARBOR_CODE__2_E, + self::SAFE_HARBOR_CODE__2_F, + self::SAFE_HARBOR_CODE__2_G, + self::SAFE_HARBOR_CODE__2_H, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['month'] = $data['month'] ?? null; + $this->container['offer_code'] = $data['offer_code'] ?? null; + $this->container['share'] = $data['share'] ?? null; + $this->container['safe_harbor_code'] = $data['safe_harbor_code'] ?? null; + $this->container['zip_code'] = $data['zip_code'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getMonthAllowableValues(); + if (!is_null($this->container['month']) && !in_array($this->container['month'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'month', must be one of '%s'", + $this->container['month'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOfferCodeAllowableValues(); + if (!is_null($this->container['offer_code']) && !in_array($this->container['offer_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'offer_code', must be one of '%s'", + $this->container['offer_code'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getSafeHarborCodeAllowableValues(); + if (!is_null($this->container['safe_harbor_code']) && !in_array($this->container['safe_harbor_code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'safe_harbor_code', must be one of '%s'", + $this->container['safe_harbor_code'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int|null $id Id + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets month + * + * @return string|null + */ + public function getMonth() + { + return $this->container['month']; + } + + /** + * Sets month + * + * @param string|null $month Month of coverage. Available values: - All: All months - January: January - February: February - March: March - April: April - May: May - June: June - July: July - August: August - September: September - October: October - November: November - December: December + * + * @return self + */ + public function setMonth($month) + { + $allowedValues = $this->getMonthAllowableValues(); + if (!is_null($month) && !in_array($month, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'month', must be one of '%s'", + $month, + implode("', '", $allowedValues) + ) + ); + } + $this->container['month'] = $month; + + return $this; + } + + /** + * Gets offer_code + * + * @return string|null + */ + public function getOfferCode() + { + return $this->container['offer_code']; + } + + /** + * Sets offer_code + * + * @param string|null $offer_code Offer of Coverage Code. Required if Share has a value, including zero. Available values: Pre-ICHRA Codes (available before 2020): - 1A: Qualifying offer: minimum essential coverage providing minimum value offered to full-time employee with employee required contribution ≤ 9.5% (as adjusted) of mainland single federal poverty line and at least minimum essential coverage offered to spouse and dependent(s) - 1B: Minimum essential coverage providing minimum value offered to employee only - 1C: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to dependent(s) (not spouse) - 1D: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to spouse (not dependent(s)) - 1E: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to dependent(s) and spouse - 1F: Minimum essential coverage NOT providing minimum value offered to employee; employee and spouse or dependent(s); or employee, spouse, and dependents - 1G: Offer of coverage to an individual who was not an employee or not a full-time employee and who enrolled in self-insured coverage - 1H: No offer of coverage (employee not offered any health coverage or employee offered coverage that is not minimum essential coverage) - 1J: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage conditionally offered to spouse; minimum essential coverage not offered to dependent(s) - 1K: Minimum essential coverage providing minimum value offered to employee; at least minimum essential coverage offered to dependents; and at least minimum essential coverage conditionally offered to spouse ICHRA Codes (introduced 2020, require ZIP code): - 1L: Individual coverage HRA offered to employee only - 1M: Individual coverage HRA offered to employee and dependent(s) (not spouse) - 1N: Individual coverage HRA offered to employee, spouse, and dependent(s) - 1O: Individual coverage HRA offered to employee only using employment site ZIP code affordability safe harbor - 1P: Individual coverage HRA offered to employee and dependent(s) (not spouse) using employment site ZIP code affordability safe harbor - 1Q: Individual coverage HRA offered to employee, spouse, and dependent(s) using employment site ZIP code affordability safe harbor - 1R: Individual coverage HRA that is NOT affordable - 1S: Individual coverage HRA offered to an individual who was not a full-time employee - 1T: Individual coverage HRA offered to employee and spouse (not dependents) - 1U: Individual coverage HRA offered to employee and spouse (not dependents) using employment site ZIP code affordability safe harbor Note: Codes 1B, 1C, 1D, 1E, 1J, 1K, 1L, 1M, 1N, 1O, 1P, 1Q, 1T, 1U require employee share amount (0.00 is a valid value). + * + * @return self + */ + public function setOfferCode($offer_code) + { + $allowedValues = $this->getOfferCodeAllowableValues(); + if (!is_null($offer_code) && !in_array($offer_code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'offer_code', must be one of '%s'", + $offer_code, + implode("', '", $allowedValues) + ) + ); + } + $this->container['offer_code'] = $offer_code; + + return $this; + } + + /** + * Gets share + * + * @return float|null + */ + public function getShare() + { + return $this->container['share']; + } + + /** + * Sets share + * + * @param float|null $share Employee required contribution share - Employee Share of Lowest Cost Monthly Premium, for Self-Only Minimum Value Coverage - May not exceed 3499.99 + * + * @return self + */ + public function setShare($share) + { + $this->container['share'] = $share; + + return $this; + } + + /** + * Gets safe_harbor_code + * + * @return string|null + */ + public function getSafeHarborCode() + { + return $this->container['safe_harbor_code']; + } + + /** + * Sets safe_harbor_code + * + * @param string|null $safe_harbor_code Safe harbor code - Applicable Section 4980H Safe Harbor Code. Available values: - 2A: Form W-2 safe harbor - 2B: Federal poverty line safe harbor - 2C: Rate of pay safe harbor - 2D: Part-time employee safe harbor for employees who were not full-time for any month of the year - 2E: Multiemployer interim rule relief - 2F: Qualifying offer method - 2G: Qualifying offer transition relief - 2H: Other affordability safe harbor + * + * @return self + */ + public function setSafeHarborCode($safe_harbor_code) + { + $allowedValues = $this->getSafeHarborCodeAllowableValues(); + if (!is_null($safe_harbor_code) && !in_array($safe_harbor_code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'safe_harbor_code', must be one of '%s'", + $safe_harbor_code, + implode("', '", $allowedValues) + ) + ); + } + $this->container['safe_harbor_code'] = $safe_harbor_code; + + return $this; + } + + /** + * Gets zip_code + * + * @return string|null + */ + public function getZipCode() + { + return $this->container['zip_code']; + } + + /** + * Sets zip_code + * + * @param string|null $zip_code ZIP/postal code. For coverage area (optional, unless codes 1L to 1U are used). + * + * @return self + */ + public function setZipCode($zip_code) + { + $this->container['zip_code'] = $zip_code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/A1099/V2/OfferAndCoverageRequest.php b/lib/Model/A1099/V2/OfferAndCoverageRequest.php deleted file mode 100644 index 923e53e..0000000 --- a/lib/Model/A1099/V2/OfferAndCoverageRequest.php +++ /dev/null @@ -1,452 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * OfferAndCoverageRequest Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class OfferAndCoverageRequest implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'OfferAndCoverageRequest'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'month' => 'string', - 'offer_code' => 'string', - 'share' => 'float', - 'safe_harbor_code' => 'string', - 'zip_code' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'month' => null, - 'offer_code' => null, - 'share' => 'double', - 'safe_harbor_code' => null, - 'zip_code' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'month' => 'month', - 'offer_code' => 'offerCode', - 'share' => 'share', - 'safe_harbor_code' => 'safeHarborCode', - 'zip_code' => 'zipCode' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'month' => 'setMonth', - 'offer_code' => 'setOfferCode', - 'share' => 'setShare', - 'safe_harbor_code' => 'setSafeHarborCode', - 'zip_code' => 'setZipCode' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'month' => 'getMonth', - 'offer_code' => 'getOfferCode', - 'share' => 'getShare', - 'safe_harbor_code' => 'getSafeHarborCode', - 'zip_code' => 'getZipCode' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['month'] = $data['month'] ?? null; - $this->container['offer_code'] = $data['offer_code'] ?? null; - $this->container['share'] = $data['share'] ?? null; - $this->container['safe_harbor_code'] = $data['safe_harbor_code'] ?? null; - $this->container['zip_code'] = $data['zip_code'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets month - * - * @return string|null - */ - public function getMonth() - { - return $this->container['month']; - } - - /** - * Sets month - * - * @param string|null $month Month of coverage - * - * @return self - */ - public function setMonth($month) - { - $this->container['month'] = $month; - - return $this; - } - - /** - * Gets offer_code - * - * @return string|null - */ - public function getOfferCode() - { - return $this->container['offer_code']; - } - - /** - * Sets offer_code - * - * @param string|null $offer_code Offer of coverage code - * - * @return self - */ - public function setOfferCode($offer_code) - { - $this->container['offer_code'] = $offer_code; - - return $this; - } - - /** - * Gets share - * - * @return float|null - */ - public function getShare() - { - return $this->container['share']; - } - - /** - * Sets share - * - * @param float|null $share Employee required contribution share - * - * @return self - */ - public function setShare($share) - { - $this->container['share'] = $share; - - return $this; - } - - /** - * Gets safe_harbor_code - * - * @return string|null - */ - public function getSafeHarborCode() - { - return $this->container['safe_harbor_code']; - } - - /** - * Sets safe_harbor_code - * - * @param string|null $safe_harbor_code Safe harbor code - * - * @return self - */ - public function setSafeHarborCode($safe_harbor_code) - { - $this->container['safe_harbor_code'] = $safe_harbor_code; - - return $this; - } - - /** - * Gets zip_code - * - * @return string|null - */ - public function getZipCode() - { - return $this->container['zip_code']; - } - - /** - * Sets zip_code - * - * @param string|null $zip_code ZIP code for coverage area - * - * @return self - */ - public function setZipCode($zip_code) - { - $this->container['zip_code'] = $zip_code; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/PaginatedQueryResultModel.php b/lib/Model/A1099/V2/PaginatedQueryResultModelForm1099Base.php similarity index 95% rename from lib/Model/A1099/V2/PaginatedQueryResultModel.php rename to lib/Model/A1099/V2/PaginatedQueryResultModelForm1099Base.php index f9ff5c9..4c56239 100644 --- a/lib/Model/A1099/V2/PaginatedQueryResultModel.php +++ b/lib/Model/A1099/V2/PaginatedQueryResultModelForm1099Base.php @@ -1,6 +1,6 @@ 'int', - 'value' => 'object[]', + 'value' => '\Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]', 'at_next_link' => 'string' ]; @@ -257,7 +257,7 @@ public function setAtRecordsetCount($at_recordset_count) /** * Gets value * - * @return object[]|null + * @return \Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]|null */ public function getValue() { @@ -267,7 +267,7 @@ public function getValue() /** * Sets value * - * @param object[]|null $value value + * @param \Avalara\SDK\Model\A1099\V2\Get1099Form200Response[]|null $value value * * @return self */ diff --git a/lib/Model/A1099/V2/PaginatedW9FormsModel.php b/lib/Model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.php similarity index 93% rename from lib/Model/A1099/V2/PaginatedW9FormsModel.php rename to lib/Model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.php index c565ea1..6bd4e20 100644 --- a/lib/Model/A1099/V2/PaginatedW9FormsModel.php +++ b/lib/Model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.php @@ -1,6 +1,6 @@ 'int', - 'value' => '\Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf[]', + 'value' => '\Avalara\SDK\Model\A1099\V2\CreateW9Form201Response[]', 'at_next_link' => 'string' ]; @@ -257,7 +257,7 @@ public function setAtRecordsetCount($at_recordset_count) /** * Gets value * - * @return \Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf[]|null + * @return \Avalara\SDK\Model\A1099\V2\CreateW9Form201Response[]|null */ public function getValue() { @@ -267,7 +267,7 @@ public function getValue() /** * Sets value * - * @param \Avalara\SDK\Model\A1099\V2\IW9FormDataModelsOneOf[]|null $value value + * @param \Avalara\SDK\Model\A1099\V2\CreateW9Form201Response[]|null $value value * * @return self */ diff --git a/lib/Model/A1099/V2/PrimaryWithholdingAgent.php b/lib/Model/A1099/V2/PrimaryWithholdingAgent.php index 3a7e391..69a2288 100644 --- a/lib/Model/A1099/V2/PrimaryWithholdingAgent.php +++ b/lib/Model/A1099/V2/PrimaryWithholdingAgent.php @@ -47,6 +47,7 @@ * PrimaryWithholdingAgent Class Doc Comment * * @category Class + * @description Primary withholding agent information for tax forms * @package Avalara\SDK * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -71,8 +72,8 @@ class PrimaryWithholdingAgent implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $openAPITypes = [ - 'primary_withholding_agent_name' => 'string', - 'primary_withholding_agent_ein' => 'string' + 'name' => 'string', + 'ein' => 'string' ]; /** @@ -83,8 +84,8 @@ class PrimaryWithholdingAgent implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $openAPIFormats = [ - 'primary_withholding_agent_name' => null, - 'primary_withholding_agent_ein' => null + 'name' => null, + 'ein' => null ]; /** @@ -114,8 +115,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'primary_withholding_agent_name' => 'primaryWithholdingAgentName', - 'primary_withholding_agent_ein' => 'primaryWithholdingAgentEin' + 'name' => 'name', + 'ein' => 'ein' ]; /** @@ -124,8 +125,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'primary_withholding_agent_name' => 'setPrimaryWithholdingAgentName', - 'primary_withholding_agent_ein' => 'setPrimaryWithholdingAgentEin' + 'name' => 'setName', + 'ein' => 'setEin' ]; /** @@ -134,8 +135,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'primary_withholding_agent_name' => 'getPrimaryWithholdingAgentName', - 'primary_withholding_agent_ein' => 'getPrimaryWithholdingAgentEin' + 'name' => 'getName', + 'ein' => 'getEin' ]; /** @@ -195,8 +196,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['primary_withholding_agent_name'] = $data['primary_withholding_agent_name'] ?? null; - $this->container['primary_withholding_agent_ein'] = $data['primary_withholding_agent_ein'] ?? null; + $this->container['name'] = $data['name'] ?? null; + $this->container['ein'] = $data['ein'] ?? null; } /** @@ -208,6 +209,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['ein'] === null) { + $invalidProperties[] = "'ein' can't be null"; + } return $invalidProperties; } @@ -224,49 +231,49 @@ public function valid() /** - * Gets primary_withholding_agent_name + * Gets name * - * @return string|null + * @return string */ - public function getPrimaryWithholdingAgentName() + public function getName() { - return $this->container['primary_withholding_agent_name']; + return $this->container['name']; } /** - * Sets primary_withholding_agent_name + * Sets name * - * @param string|null $primary_withholding_agent_name primary_withholding_agent_name + * @param string $name Name of the primary withholding agent * * @return self */ - public function setPrimaryWithholdingAgentName($primary_withholding_agent_name) + public function setName($name) { - $this->container['primary_withholding_agent_name'] = $primary_withholding_agent_name; + $this->container['name'] = $name; return $this; } /** - * Gets primary_withholding_agent_ein + * Gets ein * - * @return string|null + * @return string */ - public function getPrimaryWithholdingAgentEin() + public function getEin() { - return $this->container['primary_withholding_agent_ein']; + return $this->container['ein']; } /** - * Sets primary_withholding_agent_ein + * Sets ein * - * @param string|null $primary_withholding_agent_ein primary_withholding_agent_ein + * @param string $ein EIN (Employer Identification Number) of the primary withholding agent. * * @return self */ - public function setPrimaryWithholdingAgentEin($primary_withholding_agent_ein) + public function setEin($ein) { - $this->container['primary_withholding_agent_ein'] = $primary_withholding_agent_ein; + $this->container['ein'] = $ein; return $this; } diff --git a/lib/Model/A1099/V2/PrimaryWithholdingAgentRequest.php b/lib/Model/A1099/V2/PrimaryWithholdingAgentRequest.php deleted file mode 100644 index 05f0b9c..0000000 --- a/lib/Model/A1099/V2/PrimaryWithholdingAgentRequest.php +++ /dev/null @@ -1,362 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * PrimaryWithholdingAgentRequest Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class PrimaryWithholdingAgentRequest implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'PrimaryWithholdingAgentRequest'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'primary_withholding_agent_name' => 'string', - 'primary_withholding_agent_ein' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'primary_withholding_agent_name' => null, - 'primary_withholding_agent_ein' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'primary_withholding_agent_name' => 'primaryWithholdingAgentName', - 'primary_withholding_agent_ein' => 'primaryWithholdingAgentEin' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'primary_withholding_agent_name' => 'setPrimaryWithholdingAgentName', - 'primary_withholding_agent_ein' => 'setPrimaryWithholdingAgentEin' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'primary_withholding_agent_name' => 'getPrimaryWithholdingAgentName', - 'primary_withholding_agent_ein' => 'getPrimaryWithholdingAgentEin' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['primary_withholding_agent_name'] = $data['primary_withholding_agent_name'] ?? null; - $this->container['primary_withholding_agent_ein'] = $data['primary_withholding_agent_ein'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets primary_withholding_agent_name - * - * @return string|null - */ - public function getPrimaryWithholdingAgentName() - { - return $this->container['primary_withholding_agent_name']; - } - - /** - * Sets primary_withholding_agent_name - * - * @param string|null $primary_withholding_agent_name primary_withholding_agent_name - * - * @return self - */ - public function setPrimaryWithholdingAgentName($primary_withholding_agent_name) - { - $this->container['primary_withholding_agent_name'] = $primary_withholding_agent_name; - - return $this; - } - - /** - * Gets primary_withholding_agent_ein - * - * @return string|null - */ - public function getPrimaryWithholdingAgentEin() - { - return $this->container['primary_withholding_agent_ein']; - } - - /** - * Sets primary_withholding_agent_ein - * - * @param string|null $primary_withholding_agent_ein primary_withholding_agent_ein - * - * @return self - */ - public function setPrimaryWithholdingAgentEin($primary_withholding_agent_ein) - { - $this->container['primary_withholding_agent_ein'] = $primary_withholding_agent_ein; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/PrimaryWithholdingAgentResponse.php b/lib/Model/A1099/V2/PrimaryWithholdingAgentResponse.php deleted file mode 100644 index 192136e..0000000 --- a/lib/Model/A1099/V2/PrimaryWithholdingAgentResponse.php +++ /dev/null @@ -1,362 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * PrimaryWithholdingAgentResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class PrimaryWithholdingAgentResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'PrimaryWithholdingAgentResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'primary_withholding_agent_name' => 'string', - 'primary_withholding_agent_ein' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'primary_withholding_agent_name' => null, - 'primary_withholding_agent_ein' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'primary_withholding_agent_name' => 'primaryWithholdingAgentName', - 'primary_withholding_agent_ein' => 'primaryWithholdingAgentEin' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'primary_withholding_agent_name' => 'setPrimaryWithholdingAgentName', - 'primary_withholding_agent_ein' => 'setPrimaryWithholdingAgentEin' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'primary_withholding_agent_name' => 'getPrimaryWithholdingAgentName', - 'primary_withholding_agent_ein' => 'getPrimaryWithholdingAgentEin' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['primary_withholding_agent_name'] = $data['primary_withholding_agent_name'] ?? null; - $this->container['primary_withholding_agent_ein'] = $data['primary_withholding_agent_ein'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets primary_withholding_agent_name - * - * @return string|null - */ - public function getPrimaryWithholdingAgentName() - { - return $this->container['primary_withholding_agent_name']; - } - - /** - * Sets primary_withholding_agent_name - * - * @param string|null $primary_withholding_agent_name primary_withholding_agent_name - * - * @return self - */ - public function setPrimaryWithholdingAgentName($primary_withholding_agent_name) - { - $this->container['primary_withholding_agent_name'] = $primary_withholding_agent_name; - - return $this; - } - - /** - * Gets primary_withholding_agent_ein - * - * @return string|null - */ - public function getPrimaryWithholdingAgentEin() - { - return $this->container['primary_withholding_agent_ein']; - } - - /** - * Sets primary_withholding_agent_ein - * - * @param string|null $primary_withholding_agent_ein primary_withholding_agent_ein - * - * @return self - */ - public function setPrimaryWithholdingAgentEin($primary_withholding_agent_ein) - { - $this->container['primary_withholding_agent_ein'] = $primary_withholding_agent_ein; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/StateAndLocalWithholding.php b/lib/Model/A1099/V2/StateAndLocalWithholding.php index 3219e9b..8942359 100644 --- a/lib/Model/A1099/V2/StateAndLocalWithholding.php +++ b/lib/Model/A1099/V2/StateAndLocalWithholding.php @@ -20,7 +20,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) * * @category Avalara client libraries * @package Avalara\SDK\API\A1099\V2 @@ -272,7 +272,7 @@ public function getStateTaxWithheld() /** * Sets state_tax_withheld * - * @param float|null $state_tax_withheld state_tax_withheld + * @param float|null $state_tax_withheld Amount of state tax that was withheld * * @return self */ @@ -296,7 +296,7 @@ public function getState() /** * Sets state * - * @param string|null $state state + * @param string|null $state US state * * @return self */ @@ -320,7 +320,7 @@ public function getStateIdNumber() /** * Sets state_id_number * - * @param string|null $state_id_number state_id_number + * @param string|null $state_id_number State ID number of the entity issuing the form * * @return self */ @@ -344,7 +344,7 @@ public function getStateIncome() /** * Sets state_income * - * @param float|null $state_income state_income + * @param float|null $state_income Amount of state income * * @return self */ @@ -368,7 +368,7 @@ public function getLocalTaxWithheld() /** * Sets local_tax_withheld * - * @param float|null $local_tax_withheld local_tax_withheld + * @param float|null $local_tax_withheld Amount of local tax that was withheld * * @return self */ @@ -392,7 +392,7 @@ public function getLocality() /** * Sets locality * - * @param string|null $locality locality + * @param string|null $locality Locality name * * @return self */ @@ -416,7 +416,7 @@ public function getLocalityIdNumber() /** * Sets locality_id_number * - * @param string|null $locality_id_number locality_id_number + * @param string|null $locality_id_number Locality ID number of the entity issuing the form * * @return self */ @@ -440,7 +440,7 @@ public function getLocalIncome() /** * Sets local_income * - * @param float|null $local_income local_income + * @param float|null $local_income Amount of local income * * @return self */ diff --git a/lib/Model/A1099/V2/StateAndLocalWithholdingRequest.php b/lib/Model/A1099/V2/StateAndLocalWithholdingRequest.php deleted file mode 100644 index c456694..0000000 --- a/lib/Model/A1099/V2/StateAndLocalWithholdingRequest.php +++ /dev/null @@ -1,542 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * StateAndLocalWithholdingRequest Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class StateAndLocalWithholdingRequest implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'StateAndLocalWithholdingRequest'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'state_tax_withheld' => 'float', - 'state' => 'string', - 'state_id_number' => 'string', - 'state_income' => 'float', - 'local_tax_withheld' => 'float', - 'locality' => 'string', - 'locality_id_number' => 'string', - 'local_income' => 'float' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'state_tax_withheld' => 'double', - 'state' => null, - 'state_id_number' => null, - 'state_income' => 'double', - 'local_tax_withheld' => 'double', - 'locality' => null, - 'locality_id_number' => null, - 'local_income' => 'double' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'state_tax_withheld' => 'stateTaxWithheld', - 'state' => 'state', - 'state_id_number' => 'stateIdNumber', - 'state_income' => 'stateIncome', - 'local_tax_withheld' => 'localTaxWithheld', - 'locality' => 'locality', - 'locality_id_number' => 'localityIdNumber', - 'local_income' => 'localIncome' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'state_tax_withheld' => 'setStateTaxWithheld', - 'state' => 'setState', - 'state_id_number' => 'setStateIdNumber', - 'state_income' => 'setStateIncome', - 'local_tax_withheld' => 'setLocalTaxWithheld', - 'locality' => 'setLocality', - 'locality_id_number' => 'setLocalityIdNumber', - 'local_income' => 'setLocalIncome' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'state_tax_withheld' => 'getStateTaxWithheld', - 'state' => 'getState', - 'state_id_number' => 'getStateIdNumber', - 'state_income' => 'getStateIncome', - 'local_tax_withheld' => 'getLocalTaxWithheld', - 'locality' => 'getLocality', - 'locality_id_number' => 'getLocalityIdNumber', - 'local_income' => 'getLocalIncome' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['state_tax_withheld'] = $data['state_tax_withheld'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['state_id_number'] = $data['state_id_number'] ?? null; - $this->container['state_income'] = $data['state_income'] ?? null; - $this->container['local_tax_withheld'] = $data['local_tax_withheld'] ?? null; - $this->container['locality'] = $data['locality'] ?? null; - $this->container['locality_id_number'] = $data['locality_id_number'] ?? null; - $this->container['local_income'] = $data['local_income'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets state_tax_withheld - * - * @return float|null - */ - public function getStateTaxWithheld() - { - return $this->container['state_tax_withheld']; - } - - /** - * Sets state_tax_withheld - * - * @param float|null $state_tax_withheld state_tax_withheld - * - * @return self - */ - public function setStateTaxWithheld($state_tax_withheld) - { - $this->container['state_tax_withheld'] = $state_tax_withheld; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets state_id_number - * - * @return string|null - */ - public function getStateIdNumber() - { - return $this->container['state_id_number']; - } - - /** - * Sets state_id_number - * - * @param string|null $state_id_number state_id_number - * - * @return self - */ - public function setStateIdNumber($state_id_number) - { - $this->container['state_id_number'] = $state_id_number; - - return $this; - } - - /** - * Gets state_income - * - * @return float|null - */ - public function getStateIncome() - { - return $this->container['state_income']; - } - - /** - * Sets state_income - * - * @param float|null $state_income state_income - * - * @return self - */ - public function setStateIncome($state_income) - { - $this->container['state_income'] = $state_income; - - return $this; - } - - /** - * Gets local_tax_withheld - * - * @return float|null - */ - public function getLocalTaxWithheld() - { - return $this->container['local_tax_withheld']; - } - - /** - * Sets local_tax_withheld - * - * @param float|null $local_tax_withheld local_tax_withheld - * - * @return self - */ - public function setLocalTaxWithheld($local_tax_withheld) - { - $this->container['local_tax_withheld'] = $local_tax_withheld; - - return $this; - } - - /** - * Gets locality - * - * @return string|null - */ - public function getLocality() - { - return $this->container['locality']; - } - - /** - * Sets locality - * - * @param string|null $locality locality - * - * @return self - */ - public function setLocality($locality) - { - $this->container['locality'] = $locality; - - return $this; - } - - /** - * Gets locality_id_number - * - * @return string|null - */ - public function getLocalityIdNumber() - { - return $this->container['locality_id_number']; - } - - /** - * Sets locality_id_number - * - * @param string|null $locality_id_number locality_id_number - * - * @return self - */ - public function setLocalityIdNumber($locality_id_number) - { - $this->container['locality_id_number'] = $locality_id_number; - - return $this; - } - - /** - * Gets local_income - * - * @return float|null - */ - public function getLocalIncome() - { - return $this->container['local_income']; - } - - /** - * Sets local_income - * - * @param float|null $local_income local_income - * - * @return self - */ - public function setLocalIncome($local_income) - { - $this->container['local_income'] = $local_income; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/StateAndLocalWithholdingResponse.php b/lib/Model/A1099/V2/StateAndLocalWithholdingResponse.php deleted file mode 100644 index c29f2a2..0000000 --- a/lib/Model/A1099/V2/StateAndLocalWithholdingResponse.php +++ /dev/null @@ -1,542 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * StateAndLocalWithholdingResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class StateAndLocalWithholdingResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'StateAndLocalWithholdingResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'state_tax_withheld' => 'float', - 'state' => 'string', - 'state_id_number' => 'string', - 'state_income' => 'float', - 'local_tax_withheld' => 'float', - 'locality' => 'string', - 'locality_id_number' => 'string', - 'local_income' => 'float' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'state_tax_withheld' => 'double', - 'state' => null, - 'state_id_number' => null, - 'state_income' => 'double', - 'local_tax_withheld' => 'double', - 'locality' => null, - 'locality_id_number' => null, - 'local_income' => 'double' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'state_tax_withheld' => 'stateTaxWithheld', - 'state' => 'state', - 'state_id_number' => 'stateIdNumber', - 'state_income' => 'stateIncome', - 'local_tax_withheld' => 'localTaxWithheld', - 'locality' => 'locality', - 'locality_id_number' => 'localityIdNumber', - 'local_income' => 'localIncome' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'state_tax_withheld' => 'setStateTaxWithheld', - 'state' => 'setState', - 'state_id_number' => 'setStateIdNumber', - 'state_income' => 'setStateIncome', - 'local_tax_withheld' => 'setLocalTaxWithheld', - 'locality' => 'setLocality', - 'locality_id_number' => 'setLocalityIdNumber', - 'local_income' => 'setLocalIncome' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'state_tax_withheld' => 'getStateTaxWithheld', - 'state' => 'getState', - 'state_id_number' => 'getStateIdNumber', - 'state_income' => 'getStateIncome', - 'local_tax_withheld' => 'getLocalTaxWithheld', - 'locality' => 'getLocality', - 'locality_id_number' => 'getLocalityIdNumber', - 'local_income' => 'getLocalIncome' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['state_tax_withheld'] = $data['state_tax_withheld'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['state_id_number'] = $data['state_id_number'] ?? null; - $this->container['state_income'] = $data['state_income'] ?? null; - $this->container['local_tax_withheld'] = $data['local_tax_withheld'] ?? null; - $this->container['locality'] = $data['locality'] ?? null; - $this->container['locality_id_number'] = $data['locality_id_number'] ?? null; - $this->container['local_income'] = $data['local_income'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets state_tax_withheld - * - * @return float|null - */ - public function getStateTaxWithheld() - { - return $this->container['state_tax_withheld']; - } - - /** - * Sets state_tax_withheld - * - * @param float|null $state_tax_withheld Amount of state tax that was withheld - * - * @return self - */ - public function setStateTaxWithheld($state_tax_withheld) - { - $this->container['state_tax_withheld'] = $state_tax_withheld; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state US state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets state_id_number - * - * @return string|null - */ - public function getStateIdNumber() - { - return $this->container['state_id_number']; - } - - /** - * Sets state_id_number - * - * @param string|null $state_id_number State ID number of the entity issuing the form - * - * @return self - */ - public function setStateIdNumber($state_id_number) - { - $this->container['state_id_number'] = $state_id_number; - - return $this; - } - - /** - * Gets state_income - * - * @return float|null - */ - public function getStateIncome() - { - return $this->container['state_income']; - } - - /** - * Sets state_income - * - * @param float|null $state_income Amount of state income - * - * @return self - */ - public function setStateIncome($state_income) - { - $this->container['state_income'] = $state_income; - - return $this; - } - - /** - * Gets local_tax_withheld - * - * @return float|null - */ - public function getLocalTaxWithheld() - { - return $this->container['local_tax_withheld']; - } - - /** - * Sets local_tax_withheld - * - * @param float|null $local_tax_withheld Amount of local tax that was withheld - * - * @return self - */ - public function setLocalTaxWithheld($local_tax_withheld) - { - $this->container['local_tax_withheld'] = $local_tax_withheld; - - return $this; - } - - /** - * Gets locality - * - * @return string|null - */ - public function getLocality() - { - return $this->container['locality']; - } - - /** - * Sets locality - * - * @param string|null $locality Locality name - * - * @return self - */ - public function setLocality($locality) - { - $this->container['locality'] = $locality; - - return $this; - } - - /** - * Gets locality_id_number - * - * @return string|null - */ - public function getLocalityIdNumber() - { - return $this->container['locality_id_number']; - } - - /** - * Sets locality_id_number - * - * @param string|null $locality_id_number Locality ID number of the entity issuing the form - * - * @return self - */ - public function setLocalityIdNumber($locality_id_number) - { - $this->container['locality_id_number'] = $locality_id_number; - - return $this; - } - - /** - * Gets local_income - * - * @return float|null - */ - public function getLocalIncome() - { - return $this->container['local_income']; - } - - /** - * Sets local_income - * - * @param float|null $local_income Amount of local income - * - * @return self - */ - public function setLocalIncome($local_income) - { - $this->container['local_income'] = $local_income; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/StateEfileStatusDetail.php b/lib/Model/A1099/V2/StateEfileStatusDetail.php index 5c4dc08..8890f8a 100644 --- a/lib/Model/A1099/V2/StateEfileStatusDetail.php +++ b/lib/Model/A1099/V2/StateEfileStatusDetail.php @@ -20,7 +20,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) * * @category Avalara client libraries * @package Avalara\SDK\API\A1099\V2 diff --git a/lib/Model/A1099/V2/StateEfileStatusDetailApp.php b/lib/Model/A1099/V2/StateEfileStatusDetailApp.php deleted file mode 100644 index 1b5125d..0000000 --- a/lib/Model/A1099/V2/StateEfileStatusDetailApp.php +++ /dev/null @@ -1,392 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * StateEfileStatusDetailApp Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class StateEfileStatusDetailApp implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'StateEfileStatusDetailApp'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'status' => 'string', - 'time' => 'string', - 'jurisdiction' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'status' => null, - 'time' => null, - 'jurisdiction' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'status' => 'status', - 'time' => 'time', - 'jurisdiction' => 'jurisdiction' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'status' => 'setStatus', - 'time' => 'setTime', - 'jurisdiction' => 'setJurisdiction' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'status' => 'getStatus', - 'time' => 'getTime', - 'jurisdiction' => 'getJurisdiction' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['status'] = $data['status'] ?? null; - $this->container['time'] = $data['time'] ?? null; - $this->container['jurisdiction'] = $data['jurisdiction'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets status - * - * @return string|null - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string|null $status status - * - * @return self - */ - public function setStatus($status) - { - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets time - * - * @return string|null - */ - public function getTime() - { - return $this->container['time']; - } - - /** - * Sets time - * - * @param string|null $time time - * - * @return self - */ - public function setTime($time) - { - $this->container['time'] = $time; - - return $this; - } - - /** - * Gets jurisdiction - * - * @return string|null - */ - public function getJurisdiction() - { - return $this->container['jurisdiction']; - } - - /** - * Sets jurisdiction - * - * @param string|null $jurisdiction jurisdiction - * - * @return self - */ - public function setJurisdiction($jurisdiction) - { - $this->container['jurisdiction'] = $jurisdiction; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/StateEfileStatusDetailResponse.php b/lib/Model/A1099/V2/StateEfileStatusDetailResponse.php deleted file mode 100644 index 5caa76d..0000000 --- a/lib/Model/A1099/V2/StateEfileStatusDetailResponse.php +++ /dev/null @@ -1,392 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * StateEfileStatusDetailResponse Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class StateEfileStatusDetailResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'StateEfileStatusDetailResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'status' => 'string', - 'time' => 'string', - 'jurisdiction' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'status' => null, - 'time' => null, - 'jurisdiction' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'status' => 'status', - 'time' => 'time', - 'jurisdiction' => 'jurisdiction' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'status' => 'setStatus', - 'time' => 'setTime', - 'jurisdiction' => 'setJurisdiction' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'status' => 'getStatus', - 'time' => 'getTime', - 'jurisdiction' => 'getJurisdiction' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['status'] = $data['status'] ?? null; - $this->container['time'] = $data['time'] ?? null; - $this->container['jurisdiction'] = $data['jurisdiction'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets status - * - * @return string|null - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string|null $status status - * - * @return self - */ - public function setStatus($status) - { - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets time - * - * @return string|null - */ - public function getTime() - { - return $this->container['time']; - } - - /** - * Sets time - * - * @param string|null $time time - * - * @return self - */ - public function setTime($time) - { - $this->container['time'] = $time; - - return $this; - } - - /** - * Gets jurisdiction - * - * @return string|null - */ - public function getJurisdiction() - { - return $this->container['jurisdiction']; - } - - /** - * Sets jurisdiction - * - * @param string|null $jurisdiction jurisdiction - * - * @return self - */ - public function setJurisdiction($jurisdiction) - { - $this->container['jurisdiction'] = $jurisdiction; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/Update1099Form200Response.php b/lib/Model/A1099/V2/Update1099Form200Response.php deleted file mode 100644 index 74d56d7..0000000 --- a/lib/Model/A1099/V2/Update1099Form200Response.php +++ /dev/null @@ -1,2680 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * Update1099Form200Response Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class Update1099Form200Response implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Update1099Form_200_response'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'type' => 'string', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'state_and_local_withholding' => '\Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse', - 'tin_type' => 'string', - 'id' => 'string', - 'issuer_id' => 'string', - 'issuer_reference_id' => 'string', - 'issuer_tin' => 'string', - 'tax_year' => 'int', - 'reference_id' => 'string', - 'recipient_name' => 'string', - 'recipient_tin' => 'string', - 'recipient_second_name' => 'string', - 'address' => 'string', - 'address2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string', - 'email' => 'string', - 'account_number' => 'string', - 'office_code' => 'string', - 'non_us_province' => 'string', - 'country_code' => 'string', - 'federal_e_file' => 'bool', - 'postal_mail' => 'bool', - 'state_e_file' => 'bool', - 'tin_match' => 'bool', - 'no_tin' => 'bool', - 'second_tin_notice' => 'bool', - 'address_verification' => 'bool', - 'federal_efile_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'e_delivery_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'state_efile_status' => '\Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]', - 'postal_mail_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'address_verification_status' => '\Avalara\SDK\Model\A1099\V2\StatusDetail', - 'validation_errors' => '\Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]', - 'filer_type' => 'string', - 'payment_type' => 'string', - 'payment_settlement_entity_name_phone_number' => 'string', - 'gross_amount_payment_card' => 'float', - 'card_not_present_transactions' => 'float', - 'merchant_category_code' => 'string', - 'payment_transaction_number' => 'float', - 'federal_income_tax_withheld' => 'float', - 'january' => 'float', - 'february' => 'float', - 'march' => 'float', - 'april' => 'float', - 'may' => 'float', - 'june' => 'float', - 'july' => 'float', - 'august' => 'float', - 'sept' => 'float', - 'october' => 'float', - 'november' => 'float', - 'december' => 'float', - 'rents' => 'float', - 'royalties' => 'float', - 'other_income' => 'float', - 'fed_income_tax_withheld' => 'float', - 'fishing_boat_proceeds' => 'float', - 'medical_and_health_care_payments' => 'float', - 'direct_sales_indicator' => 'bool', - 'substitute_payments' => 'float', - 'crop_insurance_proceeds' => 'float', - 'gross_proceeds_paid_to_attorney' => 'float', - 'fish_purchased_for_resale' => 'float', - 'section409_a_deferrals' => 'float', - 'fatca_filing_requirement' => 'bool', - 'excess_golden_parachute_payments' => 'float', - 'nonqualified_deferred_compensation' => 'float', - 'nonemployee_compensation' => 'float' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'type' => null, - 'created_at' => 'date-time', - 'updated_at' => 'date-time', - 'state_and_local_withholding' => null, - 'tin_type' => null, - 'id' => null, - 'issuer_id' => null, - 'issuer_reference_id' => null, - 'issuer_tin' => null, - 'tax_year' => 'int32', - 'reference_id' => null, - 'recipient_name' => null, - 'recipient_tin' => null, - 'recipient_second_name' => null, - 'address' => null, - 'address2' => null, - 'city' => null, - 'state' => null, - 'zip' => null, - 'email' => null, - 'account_number' => null, - 'office_code' => null, - 'non_us_province' => null, - 'country_code' => null, - 'federal_e_file' => null, - 'postal_mail' => null, - 'state_e_file' => null, - 'tin_match' => null, - 'no_tin' => null, - 'second_tin_notice' => null, - 'address_verification' => null, - 'federal_efile_status' => null, - 'e_delivery_status' => null, - 'state_efile_status' => null, - 'postal_mail_status' => null, - 'tin_match_status' => null, - 'address_verification_status' => null, - 'validation_errors' => null, - 'filer_type' => null, - 'payment_type' => null, - 'payment_settlement_entity_name_phone_number' => null, - 'gross_amount_payment_card' => 'double', - 'card_not_present_transactions' => 'double', - 'merchant_category_code' => null, - 'payment_transaction_number' => 'double', - 'federal_income_tax_withheld' => 'double', - 'january' => 'double', - 'february' => 'double', - 'march' => 'double', - 'april' => 'double', - 'may' => 'double', - 'june' => 'double', - 'july' => 'double', - 'august' => 'double', - 'sept' => 'double', - 'october' => 'double', - 'november' => 'double', - 'december' => 'double', - 'rents' => 'double', - 'royalties' => 'double', - 'other_income' => 'double', - 'fed_income_tax_withheld' => 'double', - 'fishing_boat_proceeds' => 'double', - 'medical_and_health_care_payments' => 'double', - 'direct_sales_indicator' => null, - 'substitute_payments' => 'double', - 'crop_insurance_proceeds' => 'double', - 'gross_proceeds_paid_to_attorney' => 'double', - 'fish_purchased_for_resale' => 'double', - 'section409_a_deferrals' => 'double', - 'fatca_filing_requirement' => null, - 'excess_golden_parachute_payments' => 'double', - 'nonqualified_deferred_compensation' => 'double', - 'nonemployee_compensation' => 'double' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - 'state_and_local_withholding' => 'stateAndLocalWithholding', - 'tin_type' => 'tinType', - 'id' => 'id', - 'issuer_id' => 'issuerId', - 'issuer_reference_id' => 'issuerReferenceId', - 'issuer_tin' => 'issuerTin', - 'tax_year' => 'taxYear', - 'reference_id' => 'referenceId', - 'recipient_name' => 'recipientName', - 'recipient_tin' => 'recipientTin', - 'recipient_second_name' => 'recipientSecondName', - 'address' => 'address', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip', - 'email' => 'email', - 'account_number' => 'accountNumber', - 'office_code' => 'officeCode', - 'non_us_province' => 'nonUsProvince', - 'country_code' => 'countryCode', - 'federal_e_file' => 'federalEFile', - 'postal_mail' => 'postalMail', - 'state_e_file' => 'stateEFile', - 'tin_match' => 'tinMatch', - 'no_tin' => 'noTin', - 'second_tin_notice' => 'secondTinNotice', - 'address_verification' => 'addressVerification', - 'federal_efile_status' => 'federalEfileStatus', - 'e_delivery_status' => 'eDeliveryStatus', - 'state_efile_status' => 'stateEfileStatus', - 'postal_mail_status' => 'postalMailStatus', - 'tin_match_status' => 'tinMatchStatus', - 'address_verification_status' => 'addressVerificationStatus', - 'validation_errors' => 'validationErrors', - 'filer_type' => 'filerType', - 'payment_type' => 'paymentType', - 'payment_settlement_entity_name_phone_number' => 'paymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'grossAmountPaymentCard', - 'card_not_present_transactions' => 'cardNotPresentTransactions', - 'merchant_category_code' => 'merchantCategoryCode', - 'payment_transaction_number' => 'paymentTransactionNumber', - 'federal_income_tax_withheld' => 'federalIncomeTaxWithheld', - 'january' => 'january', - 'february' => 'february', - 'march' => 'march', - 'april' => 'april', - 'may' => 'may', - 'june' => 'june', - 'july' => 'july', - 'august' => 'august', - 'sept' => 'sept', - 'october' => 'october', - 'november' => 'november', - 'december' => 'december', - 'rents' => 'rents', - 'royalties' => 'royalties', - 'other_income' => 'otherIncome', - 'fed_income_tax_withheld' => 'fedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'fishingBoatProceeds', - 'medical_and_health_care_payments' => 'medicalAndHealthCarePayments', - 'direct_sales_indicator' => 'directSalesIndicator', - 'substitute_payments' => 'substitutePayments', - 'crop_insurance_proceeds' => 'cropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'grossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'fishPurchasedForResale', - 'section409_a_deferrals' => 'section409ADeferrals', - 'fatca_filing_requirement' => 'fatcaFilingRequirement', - 'excess_golden_parachute_payments' => 'excessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'nonqualifiedDeferredCompensation', - 'nonemployee_compensation' => 'nonemployeeCompensation' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', - 'state_and_local_withholding' => 'setStateAndLocalWithholding', - 'tin_type' => 'setTinType', - 'id' => 'setId', - 'issuer_id' => 'setIssuerId', - 'issuer_reference_id' => 'setIssuerReferenceId', - 'issuer_tin' => 'setIssuerTin', - 'tax_year' => 'setTaxYear', - 'reference_id' => 'setReferenceId', - 'recipient_name' => 'setRecipientName', - 'recipient_tin' => 'setRecipientTin', - 'recipient_second_name' => 'setRecipientSecondName', - 'address' => 'setAddress', - 'address2' => 'setAddress2', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip', - 'email' => 'setEmail', - 'account_number' => 'setAccountNumber', - 'office_code' => 'setOfficeCode', - 'non_us_province' => 'setNonUsProvince', - 'country_code' => 'setCountryCode', - 'federal_e_file' => 'setFederalEFile', - 'postal_mail' => 'setPostalMail', - 'state_e_file' => 'setStateEFile', - 'tin_match' => 'setTinMatch', - 'no_tin' => 'setNoTin', - 'second_tin_notice' => 'setSecondTinNotice', - 'address_verification' => 'setAddressVerification', - 'federal_efile_status' => 'setFederalEfileStatus', - 'e_delivery_status' => 'setEDeliveryStatus', - 'state_efile_status' => 'setStateEfileStatus', - 'postal_mail_status' => 'setPostalMailStatus', - 'tin_match_status' => 'setTinMatchStatus', - 'address_verification_status' => 'setAddressVerificationStatus', - 'validation_errors' => 'setValidationErrors', - 'filer_type' => 'setFilerType', - 'payment_type' => 'setPaymentType', - 'payment_settlement_entity_name_phone_number' => 'setPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'setGrossAmountPaymentCard', - 'card_not_present_transactions' => 'setCardNotPresentTransactions', - 'merchant_category_code' => 'setMerchantCategoryCode', - 'payment_transaction_number' => 'setPaymentTransactionNumber', - 'federal_income_tax_withheld' => 'setFederalIncomeTaxWithheld', - 'january' => 'setJanuary', - 'february' => 'setFebruary', - 'march' => 'setMarch', - 'april' => 'setApril', - 'may' => 'setMay', - 'june' => 'setJune', - 'july' => 'setJuly', - 'august' => 'setAugust', - 'sept' => 'setSept', - 'october' => 'setOctober', - 'november' => 'setNovember', - 'december' => 'setDecember', - 'rents' => 'setRents', - 'royalties' => 'setRoyalties', - 'other_income' => 'setOtherIncome', - 'fed_income_tax_withheld' => 'setFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'setFishingBoatProceeds', - 'medical_and_health_care_payments' => 'setMedicalAndHealthCarePayments', - 'direct_sales_indicator' => 'setDirectSalesIndicator', - 'substitute_payments' => 'setSubstitutePayments', - 'crop_insurance_proceeds' => 'setCropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'setGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'setFishPurchasedForResale', - 'section409_a_deferrals' => 'setSection409ADeferrals', - 'fatca_filing_requirement' => 'setFatcaFilingRequirement', - 'excess_golden_parachute_payments' => 'setExcessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'setNonqualifiedDeferredCompensation', - 'nonemployee_compensation' => 'setNonemployeeCompensation' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', - 'state_and_local_withholding' => 'getStateAndLocalWithholding', - 'tin_type' => 'getTinType', - 'id' => 'getId', - 'issuer_id' => 'getIssuerId', - 'issuer_reference_id' => 'getIssuerReferenceId', - 'issuer_tin' => 'getIssuerTin', - 'tax_year' => 'getTaxYear', - 'reference_id' => 'getReferenceId', - 'recipient_name' => 'getRecipientName', - 'recipient_tin' => 'getRecipientTin', - 'recipient_second_name' => 'getRecipientSecondName', - 'address' => 'getAddress', - 'address2' => 'getAddress2', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip', - 'email' => 'getEmail', - 'account_number' => 'getAccountNumber', - 'office_code' => 'getOfficeCode', - 'non_us_province' => 'getNonUsProvince', - 'country_code' => 'getCountryCode', - 'federal_e_file' => 'getFederalEFile', - 'postal_mail' => 'getPostalMail', - 'state_e_file' => 'getStateEFile', - 'tin_match' => 'getTinMatch', - 'no_tin' => 'getNoTin', - 'second_tin_notice' => 'getSecondTinNotice', - 'address_verification' => 'getAddressVerification', - 'federal_efile_status' => 'getFederalEfileStatus', - 'e_delivery_status' => 'getEDeliveryStatus', - 'state_efile_status' => 'getStateEfileStatus', - 'postal_mail_status' => 'getPostalMailStatus', - 'tin_match_status' => 'getTinMatchStatus', - 'address_verification_status' => 'getAddressVerificationStatus', - 'validation_errors' => 'getValidationErrors', - 'filer_type' => 'getFilerType', - 'payment_type' => 'getPaymentType', - 'payment_settlement_entity_name_phone_number' => 'getPaymentSettlementEntityNamePhoneNumber', - 'gross_amount_payment_card' => 'getGrossAmountPaymentCard', - 'card_not_present_transactions' => 'getCardNotPresentTransactions', - 'merchant_category_code' => 'getMerchantCategoryCode', - 'payment_transaction_number' => 'getPaymentTransactionNumber', - 'federal_income_tax_withheld' => 'getFederalIncomeTaxWithheld', - 'january' => 'getJanuary', - 'february' => 'getFebruary', - 'march' => 'getMarch', - 'april' => 'getApril', - 'may' => 'getMay', - 'june' => 'getJune', - 'july' => 'getJuly', - 'august' => 'getAugust', - 'sept' => 'getSept', - 'october' => 'getOctober', - 'november' => 'getNovember', - 'december' => 'getDecember', - 'rents' => 'getRents', - 'royalties' => 'getRoyalties', - 'other_income' => 'getOtherIncome', - 'fed_income_tax_withheld' => 'getFedIncomeTaxWithheld', - 'fishing_boat_proceeds' => 'getFishingBoatProceeds', - 'medical_and_health_care_payments' => 'getMedicalAndHealthCarePayments', - 'direct_sales_indicator' => 'getDirectSalesIndicator', - 'substitute_payments' => 'getSubstitutePayments', - 'crop_insurance_proceeds' => 'getCropInsuranceProceeds', - 'gross_proceeds_paid_to_attorney' => 'getGrossProceedsPaidToAttorney', - 'fish_purchased_for_resale' => 'getFishPurchasedForResale', - 'section409_a_deferrals' => 'getSection409ADeferrals', - 'fatca_filing_requirement' => 'getFatcaFilingRequirement', - 'excess_golden_parachute_payments' => 'getExcessGoldenParachutePayments', - 'nonqualified_deferred_compensation' => 'getNonqualifiedDeferredCompensation', - 'nonemployee_compensation' => 'getNonemployeeCompensation' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - const TYPE__1099_NEC = '1099-NEC'; - const TYPE__1099_MISC = '1099-MISC'; - const TYPE__1099_DIV = '1099-DIV'; - const TYPE__1099_R = '1099-R'; - const TYPE__1099_K = '1099-K'; - const TYPE__1095_B = '1095-B'; - const TYPE__1042_S = '1042-S'; - const TYPE__1095_C = '1095-C'; - const TIN_TYPE_EIN = 'EIN'; - const TIN_TYPE_SSN = 'SSN'; - const TIN_TYPE_ITIN = 'ITIN'; - const TIN_TYPE_ATIN = 'ATIN'; - const FILER_TYPE_PSE = 'PSE'; - const FILER_TYPE_EPF = 'EPF'; - const FILER_TYPE_OTHER = 'Other'; - const PAYMENT_TYPE_MERCHANT_PAYMENT_CARD = 'MerchantPaymentCard'; - const PAYMENT_TYPE_THIRD_PARTY_NETWORK = 'ThirdPartyNetwork'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE__1099_NEC, - self::TYPE__1099_MISC, - self::TYPE__1099_DIV, - self::TYPE__1099_R, - self::TYPE__1099_K, - self::TYPE__1095_B, - self::TYPE__1042_S, - self::TYPE__1095_C, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTinTypeAllowableValues() - { - return [ - self::TIN_TYPE_EIN, - self::TIN_TYPE_SSN, - self::TIN_TYPE_ITIN, - self::TIN_TYPE_ATIN, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getFilerTypeAllowableValues() - { - return [ - self::FILER_TYPE_PSE, - self::FILER_TYPE_EPF, - self::FILER_TYPE_OTHER, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPaymentTypeAllowableValues() - { - return [ - self::PAYMENT_TYPE_MERCHANT_PAYMENT_CARD, - self::PAYMENT_TYPE_THIRD_PARTY_NETWORK, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['state_and_local_withholding'] = $data['state_and_local_withholding'] ?? null; - $this->container['tin_type'] = $data['tin_type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['issuer_id'] = $data['issuer_id'] ?? null; - $this->container['issuer_reference_id'] = $data['issuer_reference_id'] ?? null; - $this->container['issuer_tin'] = $data['issuer_tin'] ?? null; - $this->container['tax_year'] = $data['tax_year'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['recipient_name'] = $data['recipient_name'] ?? null; - $this->container['recipient_tin'] = $data['recipient_tin'] ?? null; - $this->container['recipient_second_name'] = $data['recipient_second_name'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['address2'] = $data['address2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['account_number'] = $data['account_number'] ?? null; - $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['non_us_province'] = $data['non_us_province'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['federal_e_file'] = $data['federal_e_file'] ?? null; - $this->container['postal_mail'] = $data['postal_mail'] ?? null; - $this->container['state_e_file'] = $data['state_e_file'] ?? null; - $this->container['tin_match'] = $data['tin_match'] ?? null; - $this->container['no_tin'] = $data['no_tin'] ?? null; - $this->container['second_tin_notice'] = $data['second_tin_notice'] ?? null; - $this->container['address_verification'] = $data['address_verification'] ?? null; - $this->container['federal_efile_status'] = $data['federal_efile_status'] ?? null; - $this->container['e_delivery_status'] = $data['e_delivery_status'] ?? null; - $this->container['state_efile_status'] = $data['state_efile_status'] ?? null; - $this->container['postal_mail_status'] = $data['postal_mail_status'] ?? null; - $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['address_verification_status'] = $data['address_verification_status'] ?? null; - $this->container['validation_errors'] = $data['validation_errors'] ?? null; - $this->container['filer_type'] = $data['filer_type'] ?? null; - $this->container['payment_type'] = $data['payment_type'] ?? null; - $this->container['payment_settlement_entity_name_phone_number'] = $data['payment_settlement_entity_name_phone_number'] ?? null; - $this->container['gross_amount_payment_card'] = $data['gross_amount_payment_card'] ?? null; - $this->container['card_not_present_transactions'] = $data['card_not_present_transactions'] ?? null; - $this->container['merchant_category_code'] = $data['merchant_category_code'] ?? null; - $this->container['payment_transaction_number'] = $data['payment_transaction_number'] ?? null; - $this->container['federal_income_tax_withheld'] = $data['federal_income_tax_withheld'] ?? null; - $this->container['january'] = $data['january'] ?? null; - $this->container['february'] = $data['february'] ?? null; - $this->container['march'] = $data['march'] ?? null; - $this->container['april'] = $data['april'] ?? null; - $this->container['may'] = $data['may'] ?? null; - $this->container['june'] = $data['june'] ?? null; - $this->container['july'] = $data['july'] ?? null; - $this->container['august'] = $data['august'] ?? null; - $this->container['sept'] = $data['sept'] ?? null; - $this->container['october'] = $data['october'] ?? null; - $this->container['november'] = $data['november'] ?? null; - $this->container['december'] = $data['december'] ?? null; - $this->container['rents'] = $data['rents'] ?? null; - $this->container['royalties'] = $data['royalties'] ?? null; - $this->container['other_income'] = $data['other_income'] ?? null; - $this->container['fed_income_tax_withheld'] = $data['fed_income_tax_withheld'] ?? null; - $this->container['fishing_boat_proceeds'] = $data['fishing_boat_proceeds'] ?? null; - $this->container['medical_and_health_care_payments'] = $data['medical_and_health_care_payments'] ?? null; - $this->container['direct_sales_indicator'] = $data['direct_sales_indicator'] ?? null; - $this->container['substitute_payments'] = $data['substitute_payments'] ?? null; - $this->container['crop_insurance_proceeds'] = $data['crop_insurance_proceeds'] ?? null; - $this->container['gross_proceeds_paid_to_attorney'] = $data['gross_proceeds_paid_to_attorney'] ?? null; - $this->container['fish_purchased_for_resale'] = $data['fish_purchased_for_resale'] ?? null; - $this->container['section409_a_deferrals'] = $data['section409_a_deferrals'] ?? null; - $this->container['fatca_filing_requirement'] = $data['fatca_filing_requirement'] ?? null; - $this->container['excess_golden_parachute_payments'] = $data['excess_golden_parachute_payments'] ?? null; - $this->container['nonqualified_deferred_compensation'] = $data['nonqualified_deferred_compensation'] ?? null; - $this->container['nonemployee_compensation'] = $data['nonemployee_compensation'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($this->container['tin_type']) && !in_array($this->container['tin_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'tin_type', must be one of '%s'", - $this->container['tin_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($this->container['filer_type']) && !in_array($this->container['filer_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'filer_type', must be one of '%s'", - $this->container['filer_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($this->container['payment_type']) && !in_array($this->container['payment_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'payment_type', must be one of '%s'", - $this->container['payment_type'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type type - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at created_at - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at updated_at - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets state_and_local_withholding - * - * @return \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null - */ - public function getStateAndLocalWithholding() - { - return $this->container['state_and_local_withholding']; - } - - /** - * Sets state_and_local_withholding - * - * @param \Avalara\SDK\Model\A1099\V2\StateAndLocalWithholdingResponse|null $state_and_local_withholding state_and_local_withholding - * - * @return self - */ - public function setStateAndLocalWithholding($state_and_local_withholding) - { - $this->container['state_and_local_withholding'] = $state_and_local_withholding; - - return $this; - } - - /** - * Gets tin_type - * - * @return string|null - */ - public function getTinType() - { - return $this->container['tin_type']; - } - - /** - * Sets tin_type - * - * @param string|null $tin_type tin_type - * - * @return self - */ - public function setTinType($tin_type) - { - $allowedValues = $this->getTinTypeAllowableValues(); - if (!is_null($tin_type) && !in_array($tin_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'tin_type', must be one of '%s'", - $tin_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['tin_type'] = $tin_type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets issuer_id - * - * @return string|null - */ - public function getIssuerId() - { - return $this->container['issuer_id']; - } - - /** - * Sets issuer_id - * - * @param string|null $issuer_id issuer_id - * - * @return self - */ - public function setIssuerId($issuer_id) - { - $this->container['issuer_id'] = $issuer_id; - - return $this; - } - - /** - * Gets issuer_reference_id - * - * @return string|null - */ - public function getIssuerReferenceId() - { - return $this->container['issuer_reference_id']; - } - - /** - * Sets issuer_reference_id - * - * @param string|null $issuer_reference_id issuer_reference_id - * - * @return self - */ - public function setIssuerReferenceId($issuer_reference_id) - { - $this->container['issuer_reference_id'] = $issuer_reference_id; - - return $this; - } - - /** - * Gets issuer_tin - * - * @return string|null - */ - public function getIssuerTin() - { - return $this->container['issuer_tin']; - } - - /** - * Sets issuer_tin - * - * @param string|null $issuer_tin issuer_tin - * - * @return self - */ - public function setIssuerTin($issuer_tin) - { - $this->container['issuer_tin'] = $issuer_tin; - - return $this; - } - - /** - * Gets tax_year - * - * @return int|null - */ - public function getTaxYear() - { - return $this->container['tax_year']; - } - - /** - * Sets tax_year - * - * @param int|null $tax_year tax_year - * - * @return self - */ - public function setTaxYear($tax_year) - { - $this->container['tax_year'] = $tax_year; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id reference_id - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets recipient_name - * - * @return string|null - */ - public function getRecipientName() - { - return $this->container['recipient_name']; - } - - /** - * Sets recipient_name - * - * @param string|null $recipient_name recipient_name - * - * @return self - */ - public function setRecipientName($recipient_name) - { - $this->container['recipient_name'] = $recipient_name; - - return $this; - } - - /** - * Gets recipient_tin - * - * @return string|null - */ - public function getRecipientTin() - { - return $this->container['recipient_tin']; - } - - /** - * Sets recipient_tin - * - * @param string|null $recipient_tin recipient_tin - * - * @return self - */ - public function setRecipientTin($recipient_tin) - { - $this->container['recipient_tin'] = $recipient_tin; - - return $this; - } - - /** - * Gets recipient_second_name - * - * @return string|null - */ - public function getRecipientSecondName() - { - return $this->container['recipient_second_name']; - } - - /** - * Sets recipient_second_name - * - * @param string|null $recipient_second_name recipient_second_name - * - * @return self - */ - public function setRecipientSecondName($recipient_second_name) - { - $this->container['recipient_second_name'] = $recipient_second_name; - - return $this; - } - - /** - * Gets address - * - * @return string|null - */ - public function getAddress() - { - return $this->container['address']; - } - - /** - * Sets address - * - * @param string|null $address address - * - * @return self - */ - public function setAddress($address) - { - $this->container['address'] = $address; - - return $this; - } - - /** - * Gets address2 - * - * @return string|null - */ - public function getAddress2() - { - return $this->container['address2']; - } - - /** - * Sets address2 - * - * @param string|null $address2 address2 - * - * @return self - */ - public function setAddress2($address2) - { - $this->container['address2'] = $address2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city city - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets zip - * - * @return string|null - */ - public function getZip() - { - return $this->container['zip']; - } - - /** - * Sets zip - * - * @param string|null $zip zip - * - * @return self - */ - public function setZip($zip) - { - $this->container['zip'] = $zip; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email email - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets account_number - * - * @return string|null - */ - public function getAccountNumber() - { - return $this->container['account_number']; - } - - /** - * Sets account_number - * - * @param string|null $account_number account_number - * - * @return self - */ - public function setAccountNumber($account_number) - { - $this->container['account_number'] = $account_number; - - return $this; - } - - /** - * Gets office_code - * - * @return string|null - */ - public function getOfficeCode() - { - return $this->container['office_code']; - } - - /** - * Sets office_code - * - * @param string|null $office_code office_code - * - * @return self - */ - public function setOfficeCode($office_code) - { - $this->container['office_code'] = $office_code; - - return $this; - } - - /** - * Gets non_us_province - * - * @return string|null - */ - public function getNonUsProvince() - { - return $this->container['non_us_province']; - } - - /** - * Sets non_us_province - * - * @param string|null $non_us_province non_us_province - * - * @return self - */ - public function setNonUsProvince($non_us_province) - { - $this->container['non_us_province'] = $non_us_province; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code country_code - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets federal_e_file - * - * @return bool|null - */ - public function getFederalEFile() - { - return $this->container['federal_e_file']; - } - - /** - * Sets federal_e_file - * - * @param bool|null $federal_e_file federal_e_file - * - * @return self - */ - public function setFederalEFile($federal_e_file) - { - $this->container['federal_e_file'] = $federal_e_file; - - return $this; - } - - /** - * Gets postal_mail - * - * @return bool|null - */ - public function getPostalMail() - { - return $this->container['postal_mail']; - } - - /** - * Sets postal_mail - * - * @param bool|null $postal_mail postal_mail - * - * @return self - */ - public function setPostalMail($postal_mail) - { - $this->container['postal_mail'] = $postal_mail; - - return $this; - } - - /** - * Gets state_e_file - * - * @return bool|null - */ - public function getStateEFile() - { - return $this->container['state_e_file']; - } - - /** - * Sets state_e_file - * - * @param bool|null $state_e_file state_e_file - * - * @return self - */ - public function setStateEFile($state_e_file) - { - $this->container['state_e_file'] = $state_e_file; - - return $this; - } - - /** - * Gets tin_match - * - * @return bool|null - */ - public function getTinMatch() - { - return $this->container['tin_match']; - } - - /** - * Sets tin_match - * - * @param bool|null $tin_match tin_match - * - * @return self - */ - public function setTinMatch($tin_match) - { - $this->container['tin_match'] = $tin_match; - - return $this; - } - - /** - * Gets no_tin - * - * @return bool|null - */ - public function getNoTin() - { - return $this->container['no_tin']; - } - - /** - * Sets no_tin - * - * @param bool|null $no_tin no_tin - * - * @return self - */ - public function setNoTin($no_tin) - { - $this->container['no_tin'] = $no_tin; - - return $this; - } - - /** - * Gets second_tin_notice - * - * @return bool|null - */ - public function getSecondTinNotice() - { - return $this->container['second_tin_notice']; - } - - /** - * Sets second_tin_notice - * - * @param bool|null $second_tin_notice second_tin_notice - * - * @return self - */ - public function setSecondTinNotice($second_tin_notice) - { - $this->container['second_tin_notice'] = $second_tin_notice; - - return $this; - } - - /** - * Gets address_verification - * - * @return bool|null - */ - public function getAddressVerification() - { - return $this->container['address_verification']; - } - - /** - * Sets address_verification - * - * @param bool|null $address_verification address_verification - * - * @return self - */ - public function setAddressVerification($address_verification) - { - $this->container['address_verification'] = $address_verification; - - return $this; - } - - /** - * Gets federal_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getFederalEfileStatus() - { - return $this->container['federal_efile_status']; - } - - /** - * Sets federal_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $federal_efile_status federal_efile_status - * - * @return self - */ - public function setFederalEfileStatus($federal_efile_status) - { - $this->container['federal_efile_status'] = $federal_efile_status; - - return $this; - } - - /** - * Gets e_delivery_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getEDeliveryStatus() - { - return $this->container['e_delivery_status']; - } - - /** - * Sets e_delivery_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $e_delivery_status e_delivery_status - * - * @return self - */ - public function setEDeliveryStatus($e_delivery_status) - { - $this->container['e_delivery_status'] = $e_delivery_status; - - return $this; - } - - /** - * Gets state_efile_status - * - * @return \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null - */ - public function getStateEfileStatus() - { - return $this->container['state_efile_status']; - } - - /** - * Sets state_efile_status - * - * @param \Avalara\SDK\Model\A1099\V2\StateEfileStatusDetailResponse[]|null $state_efile_status state_efile_status - * - * @return self - */ - public function setStateEfileStatus($state_efile_status) - { - - - $this->container['state_efile_status'] = $state_efile_status; - - return $this; - } - - /** - * Gets postal_mail_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getPostalMailStatus() - { - return $this->container['postal_mail_status']; - } - - /** - * Sets postal_mail_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $postal_mail_status postal_mail_status - * - * @return self - */ - public function setPostalMailStatus($postal_mail_status) - { - $this->container['postal_mail_status'] = $postal_mail_status; - - return $this; - } - - /** - * Gets tin_match_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getTinMatchStatus() - { - return $this->container['tin_match_status']; - } - - /** - * Sets tin_match_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $tin_match_status tin_match_status - * - * @return self - */ - public function setTinMatchStatus($tin_match_status) - { - $this->container['tin_match_status'] = $tin_match_status; - - return $this; - } - - /** - * Gets address_verification_status - * - * @return \Avalara\SDK\Model\A1099\V2\StatusDetail|null - */ - public function getAddressVerificationStatus() - { - return $this->container['address_verification_status']; - } - - /** - * Sets address_verification_status - * - * @param \Avalara\SDK\Model\A1099\V2\StatusDetail|null $address_verification_status address_verification_status - * - * @return self - */ - public function setAddressVerificationStatus($address_verification_status) - { - $this->container['address_verification_status'] = $address_verification_status; - - return $this; - } - - /** - * Gets validation_errors - * - * @return \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null - */ - public function getValidationErrors() - { - return $this->container['validation_errors']; - } - - /** - * Sets validation_errors - * - * @param \Avalara\SDK\Model\A1099\V2\ValidationErrorResponse[]|null $validation_errors validation_errors - * - * @return self - */ - public function setValidationErrors($validation_errors) - { - - - $this->container['validation_errors'] = $validation_errors; - - return $this; - } - - /** - * Gets filer_type - * - * @return string|null - */ - public function getFilerType() - { - return $this->container['filer_type']; - } - - /** - * Sets filer_type - * - * @param string|null $filer_type filer_type - * - * @return self - */ - public function setFilerType($filer_type) - { - $allowedValues = $this->getFilerTypeAllowableValues(); - if (!is_null($filer_type) && !in_array($filer_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'filer_type', must be one of '%s'", - $filer_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['filer_type'] = $filer_type; - - return $this; - } - - /** - * Gets payment_type - * - * @return string|null - */ - public function getPaymentType() - { - return $this->container['payment_type']; - } - - /** - * Sets payment_type - * - * @param string|null $payment_type payment_type - * - * @return self - */ - public function setPaymentType($payment_type) - { - $allowedValues = $this->getPaymentTypeAllowableValues(); - if (!is_null($payment_type) && !in_array($payment_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'payment_type', must be one of '%s'", - $payment_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['payment_type'] = $payment_type; - - return $this; - } - - /** - * Gets payment_settlement_entity_name_phone_number - * - * @return string|null - */ - public function getPaymentSettlementEntityNamePhoneNumber() - { - return $this->container['payment_settlement_entity_name_phone_number']; - } - - /** - * Sets payment_settlement_entity_name_phone_number - * - * @param string|null $payment_settlement_entity_name_phone_number payment_settlement_entity_name_phone_number - * - * @return self - */ - public function setPaymentSettlementEntityNamePhoneNumber($payment_settlement_entity_name_phone_number) - { - $this->container['payment_settlement_entity_name_phone_number'] = $payment_settlement_entity_name_phone_number; - - return $this; - } - - /** - * Gets gross_amount_payment_card - * - * @return float|null - */ - public function getGrossAmountPaymentCard() - { - return $this->container['gross_amount_payment_card']; - } - - /** - * Sets gross_amount_payment_card - * - * @param float|null $gross_amount_payment_card gross_amount_payment_card - * - * @return self - */ - public function setGrossAmountPaymentCard($gross_amount_payment_card) - { - $this->container['gross_amount_payment_card'] = $gross_amount_payment_card; - - return $this; - } - - /** - * Gets card_not_present_transactions - * - * @return float|null - */ - public function getCardNotPresentTransactions() - { - return $this->container['card_not_present_transactions']; - } - - /** - * Sets card_not_present_transactions - * - * @param float|null $card_not_present_transactions card_not_present_transactions - * - * @return self - */ - public function setCardNotPresentTransactions($card_not_present_transactions) - { - $this->container['card_not_present_transactions'] = $card_not_present_transactions; - - return $this; - } - - /** - * Gets merchant_category_code - * - * @return string|null - */ - public function getMerchantCategoryCode() - { - return $this->container['merchant_category_code']; - } - - /** - * Sets merchant_category_code - * - * @param string|null $merchant_category_code merchant_category_code - * - * @return self - */ - public function setMerchantCategoryCode($merchant_category_code) - { - $this->container['merchant_category_code'] = $merchant_category_code; - - return $this; - } - - /** - * Gets payment_transaction_number - * - * @return float|null - */ - public function getPaymentTransactionNumber() - { - return $this->container['payment_transaction_number']; - } - - /** - * Sets payment_transaction_number - * - * @param float|null $payment_transaction_number payment_transaction_number - * - * @return self - */ - public function setPaymentTransactionNumber($payment_transaction_number) - { - $this->container['payment_transaction_number'] = $payment_transaction_number; - - return $this; - } - - /** - * Gets federal_income_tax_withheld - * - * @return float|null - */ - public function getFederalIncomeTaxWithheld() - { - return $this->container['federal_income_tax_withheld']; - } - - /** - * Sets federal_income_tax_withheld - * - * @param float|null $federal_income_tax_withheld federal_income_tax_withheld - * - * @return self - */ - public function setFederalIncomeTaxWithheld($federal_income_tax_withheld) - { - $this->container['federal_income_tax_withheld'] = $federal_income_tax_withheld; - - return $this; - } - - /** - * Gets january - * - * @return float|null - */ - public function getJanuary() - { - return $this->container['january']; - } - - /** - * Sets january - * - * @param float|null $january january - * - * @return self - */ - public function setJanuary($january) - { - $this->container['january'] = $january; - - return $this; - } - - /** - * Gets february - * - * @return float|null - */ - public function getFebruary() - { - return $this->container['february']; - } - - /** - * Sets february - * - * @param float|null $february february - * - * @return self - */ - public function setFebruary($february) - { - $this->container['february'] = $february; - - return $this; - } - - /** - * Gets march - * - * @return float|null - */ - public function getMarch() - { - return $this->container['march']; - } - - /** - * Sets march - * - * @param float|null $march march - * - * @return self - */ - public function setMarch($march) - { - $this->container['march'] = $march; - - return $this; - } - - /** - * Gets april - * - * @return float|null - */ - public function getApril() - { - return $this->container['april']; - } - - /** - * Sets april - * - * @param float|null $april april - * - * @return self - */ - public function setApril($april) - { - $this->container['april'] = $april; - - return $this; - } - - /** - * Gets may - * - * @return float|null - */ - public function getMay() - { - return $this->container['may']; - } - - /** - * Sets may - * - * @param float|null $may may - * - * @return self - */ - public function setMay($may) - { - $this->container['may'] = $may; - - return $this; - } - - /** - * Gets june - * - * @return float|null - */ - public function getJune() - { - return $this->container['june']; - } - - /** - * Sets june - * - * @param float|null $june june - * - * @return self - */ - public function setJune($june) - { - $this->container['june'] = $june; - - return $this; - } - - /** - * Gets july - * - * @return float|null - */ - public function getJuly() - { - return $this->container['july']; - } - - /** - * Sets july - * - * @param float|null $july july - * - * @return self - */ - public function setJuly($july) - { - $this->container['july'] = $july; - - return $this; - } - - /** - * Gets august - * - * @return float|null - */ - public function getAugust() - { - return $this->container['august']; - } - - /** - * Sets august - * - * @param float|null $august august - * - * @return self - */ - public function setAugust($august) - { - $this->container['august'] = $august; - - return $this; - } - - /** - * Gets sept - * - * @return float|null - */ - public function getSept() - { - return $this->container['sept']; - } - - /** - * Sets sept - * - * @param float|null $sept sept - * - * @return self - */ - public function setSept($sept) - { - $this->container['sept'] = $sept; - - return $this; - } - - /** - * Gets october - * - * @return float|null - */ - public function getOctober() - { - return $this->container['october']; - } - - /** - * Sets october - * - * @param float|null $october october - * - * @return self - */ - public function setOctober($october) - { - $this->container['october'] = $october; - - return $this; - } - - /** - * Gets november - * - * @return float|null - */ - public function getNovember() - { - return $this->container['november']; - } - - /** - * Sets november - * - * @param float|null $november november - * - * @return self - */ - public function setNovember($november) - { - $this->container['november'] = $november; - - return $this; - } - - /** - * Gets december - * - * @return float|null - */ - public function getDecember() - { - return $this->container['december']; - } - - /** - * Sets december - * - * @param float|null $december december - * - * @return self - */ - public function setDecember($december) - { - $this->container['december'] = $december; - - return $this; - } - - /** - * Gets rents - * - * @return float|null - */ - public function getRents() - { - return $this->container['rents']; - } - - /** - * Sets rents - * - * @param float|null $rents rents - * - * @return self - */ - public function setRents($rents) - { - $this->container['rents'] = $rents; - - return $this; - } - - /** - * Gets royalties - * - * @return float|null - */ - public function getRoyalties() - { - return $this->container['royalties']; - } - - /** - * Sets royalties - * - * @param float|null $royalties royalties - * - * @return self - */ - public function setRoyalties($royalties) - { - $this->container['royalties'] = $royalties; - - return $this; - } - - /** - * Gets other_income - * - * @return float|null - */ - public function getOtherIncome() - { - return $this->container['other_income']; - } - - /** - * Sets other_income - * - * @param float|null $other_income other_income - * - * @return self - */ - public function setOtherIncome($other_income) - { - $this->container['other_income'] = $other_income; - - return $this; - } - - /** - * Gets fed_income_tax_withheld - * - * @return float|null - */ - public function getFedIncomeTaxWithheld() - { - return $this->container['fed_income_tax_withheld']; - } - - /** - * Sets fed_income_tax_withheld - * - * @param float|null $fed_income_tax_withheld fed_income_tax_withheld - * - * @return self - */ - public function setFedIncomeTaxWithheld($fed_income_tax_withheld) - { - $this->container['fed_income_tax_withheld'] = $fed_income_tax_withheld; - - return $this; - } - - /** - * Gets fishing_boat_proceeds - * - * @return float|null - */ - public function getFishingBoatProceeds() - { - return $this->container['fishing_boat_proceeds']; - } - - /** - * Sets fishing_boat_proceeds - * - * @param float|null $fishing_boat_proceeds fishing_boat_proceeds - * - * @return self - */ - public function setFishingBoatProceeds($fishing_boat_proceeds) - { - $this->container['fishing_boat_proceeds'] = $fishing_boat_proceeds; - - return $this; - } - - /** - * Gets medical_and_health_care_payments - * - * @return float|null - */ - public function getMedicalAndHealthCarePayments() - { - return $this->container['medical_and_health_care_payments']; - } - - /** - * Sets medical_and_health_care_payments - * - * @param float|null $medical_and_health_care_payments medical_and_health_care_payments - * - * @return self - */ - public function setMedicalAndHealthCarePayments($medical_and_health_care_payments) - { - $this->container['medical_and_health_care_payments'] = $medical_and_health_care_payments; - - return $this; - } - - /** - * Gets direct_sales_indicator - * - * @return bool|null - */ - public function getDirectSalesIndicator() - { - return $this->container['direct_sales_indicator']; - } - - /** - * Sets direct_sales_indicator - * - * @param bool|null $direct_sales_indicator direct_sales_indicator - * - * @return self - */ - public function setDirectSalesIndicator($direct_sales_indicator) - { - $this->container['direct_sales_indicator'] = $direct_sales_indicator; - - return $this; - } - - /** - * Gets substitute_payments - * - * @return float|null - */ - public function getSubstitutePayments() - { - return $this->container['substitute_payments']; - } - - /** - * Sets substitute_payments - * - * @param float|null $substitute_payments substitute_payments - * - * @return self - */ - public function setSubstitutePayments($substitute_payments) - { - $this->container['substitute_payments'] = $substitute_payments; - - return $this; - } - - /** - * Gets crop_insurance_proceeds - * - * @return float|null - */ - public function getCropInsuranceProceeds() - { - return $this->container['crop_insurance_proceeds']; - } - - /** - * Sets crop_insurance_proceeds - * - * @param float|null $crop_insurance_proceeds crop_insurance_proceeds - * - * @return self - */ - public function setCropInsuranceProceeds($crop_insurance_proceeds) - { - $this->container['crop_insurance_proceeds'] = $crop_insurance_proceeds; - - return $this; - } - - /** - * Gets gross_proceeds_paid_to_attorney - * - * @return float|null - */ - public function getGrossProceedsPaidToAttorney() - { - return $this->container['gross_proceeds_paid_to_attorney']; - } - - /** - * Sets gross_proceeds_paid_to_attorney - * - * @param float|null $gross_proceeds_paid_to_attorney gross_proceeds_paid_to_attorney - * - * @return self - */ - public function setGrossProceedsPaidToAttorney($gross_proceeds_paid_to_attorney) - { - $this->container['gross_proceeds_paid_to_attorney'] = $gross_proceeds_paid_to_attorney; - - return $this; - } - - /** - * Gets fish_purchased_for_resale - * - * @return float|null - */ - public function getFishPurchasedForResale() - { - return $this->container['fish_purchased_for_resale']; - } - - /** - * Sets fish_purchased_for_resale - * - * @param float|null $fish_purchased_for_resale fish_purchased_for_resale - * - * @return self - */ - public function setFishPurchasedForResale($fish_purchased_for_resale) - { - $this->container['fish_purchased_for_resale'] = $fish_purchased_for_resale; - - return $this; - } - - /** - * Gets section409_a_deferrals - * - * @return float|null - */ - public function getSection409ADeferrals() - { - return $this->container['section409_a_deferrals']; - } - - /** - * Sets section409_a_deferrals - * - * @param float|null $section409_a_deferrals section409_a_deferrals - * - * @return self - */ - public function setSection409ADeferrals($section409_a_deferrals) - { - $this->container['section409_a_deferrals'] = $section409_a_deferrals; - - return $this; - } - - /** - * Gets fatca_filing_requirement - * - * @return bool|null - */ - public function getFatcaFilingRequirement() - { - return $this->container['fatca_filing_requirement']; - } - - /** - * Sets fatca_filing_requirement - * - * @param bool|null $fatca_filing_requirement fatca_filing_requirement - * - * @return self - */ - public function setFatcaFilingRequirement($fatca_filing_requirement) - { - $this->container['fatca_filing_requirement'] = $fatca_filing_requirement; - - return $this; - } - - /** - * Gets excess_golden_parachute_payments - * - * @return float|null - */ - public function getExcessGoldenParachutePayments() - { - return $this->container['excess_golden_parachute_payments']; - } - - /** - * Sets excess_golden_parachute_payments - * - * @param float|null $excess_golden_parachute_payments excess_golden_parachute_payments - * - * @return self - */ - public function setExcessGoldenParachutePayments($excess_golden_parachute_payments) - { - $this->container['excess_golden_parachute_payments'] = $excess_golden_parachute_payments; - - return $this; - } - - /** - * Gets nonqualified_deferred_compensation - * - * @return float|null - */ - public function getNonqualifiedDeferredCompensation() - { - return $this->container['nonqualified_deferred_compensation']; - } - - /** - * Sets nonqualified_deferred_compensation - * - * @param float|null $nonqualified_deferred_compensation nonqualified_deferred_compensation - * - * @return self - */ - public function setNonqualifiedDeferredCompensation($nonqualified_deferred_compensation) - { - $this->container['nonqualified_deferred_compensation'] = $nonqualified_deferred_compensation; - - return $this; - } - - /** - * Gets nonemployee_compensation - * - * @return float|null - */ - public function getNonemployeeCompensation() - { - return $this->container['nonemployee_compensation']; - } - - /** - * Sets nonemployee_compensation - * - * @param float|null $nonemployee_compensation nonemployee_compensation - * - * @return self - */ - public function setNonemployeeCompensation($nonemployee_compensation) - { - $this->container['nonemployee_compensation'] = $nonemployee_compensation; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/ValidationError.php b/lib/Model/A1099/V2/ValidationError.php index 9c0f15d..fc3ec4b 100644 --- a/lib/Model/A1099/V2/ValidationError.php +++ b/lib/Model/A1099/V2/ValidationError.php @@ -20,7 +20,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) * * @category Avalara client libraries * @package Avalara\SDK\API\A1099\V2 @@ -236,7 +236,7 @@ public function getField() /** * Sets field * - * @param string|null $field field + * @param string|null $field The field containing the error * * @return self */ @@ -260,7 +260,7 @@ public function getErrors() /** * Sets errors * - * @param string[]|null $errors errors + * @param string[]|null $errors The list of error messages * * @return self */ diff --git a/lib/Model/A1099/V2/ValidationErrorApp.php b/lib/Model/A1099/V2/ValidationErrorApp.php deleted file mode 100644 index 957d8d8..0000000 --- a/lib/Model/A1099/V2/ValidationErrorApp.php +++ /dev/null @@ -1,364 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * ValidationErrorApp Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class ValidationErrorApp implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ValidationErrorApp'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'field' => 'string', - 'errors' => 'string[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'field' => null, - 'errors' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'field' => 'field', - 'errors' => 'errors' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'field' => 'setField', - 'errors' => 'setErrors' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'field' => 'getField', - 'errors' => 'getErrors' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['field'] = $data['field'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets field - * - * @return string|null - */ - public function getField() - { - return $this->container['field']; - } - - /** - * Sets field - * - * @param string|null $field field - * - * @return self - */ - public function setField($field) - { - $this->container['field'] = $field; - - return $this; - } - - /** - * Gets errors - * - * @return string[]|null - */ - public function getErrors() - { - return $this->container['errors']; - } - - /** - * Sets errors - * - * @param string[]|null $errors errors - * - * @return self - */ - public function setErrors($errors) - { - - - $this->container['errors'] = $errors; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/A1099/V2/ProblemDetails.php b/lib/Model/A1099/V2/W4FormMinimalRequest.php similarity index 51% rename from lib/Model/A1099/V2/ProblemDetails.php rename to lib/Model/A1099/V2/W4FormMinimalRequest.php index 84c00a2..f22aad0 100644 --- a/lib/Model/A1099/V2/ProblemDetails.php +++ b/lib/Model/A1099/V2/W4FormMinimalRequest.php @@ -1,6 +1,6 @@ 'string', - 'title' => 'string', - 'status' => 'int', - 'detail' => 'string', - 'instance' => 'string' + 'email' => 'string', + 'employee_first_name' => 'string', + 'employee_last_name' => 'string', + 'office_code' => 'string', + 'company_id' => 'string', + 'reference_id' => 'string' ]; /** @@ -87,10 +89,12 @@ class ProblemDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'type' => null, - 'title' => null, - 'status' => 'int32', - 'detail' => null, - 'instance' => null + 'email' => null, + 'employee_first_name' => null, + 'employee_last_name' => null, + 'office_code' => null, + 'company_id' => null, + 'reference_id' => null ]; /** @@ -121,10 +125,12 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'type' => 'type', - 'title' => 'title', - 'status' => 'status', - 'detail' => 'detail', - 'instance' => 'instance' + 'email' => 'email', + 'employee_first_name' => 'employeeFirstName', + 'employee_last_name' => 'employeeLastName', + 'office_code' => 'officeCode', + 'company_id' => 'companyId', + 'reference_id' => 'referenceId' ]; /** @@ -134,10 +140,12 @@ public static function openAPIFormats() */ protected static $setters = [ 'type' => 'setType', - 'title' => 'setTitle', - 'status' => 'setStatus', - 'detail' => 'setDetail', - 'instance' => 'setInstance' + 'email' => 'setEmail', + 'employee_first_name' => 'setEmployeeFirstName', + 'employee_last_name' => 'setEmployeeLastName', + 'office_code' => 'setOfficeCode', + 'company_id' => 'setCompanyId', + 'reference_id' => 'setReferenceId' ]; /** @@ -147,10 +155,12 @@ public static function openAPIFormats() */ protected static $getters = [ 'type' => 'getType', - 'title' => 'getTitle', - 'status' => 'getStatus', - 'detail' => 'getDetail', - 'instance' => 'getInstance' + 'email' => 'getEmail', + 'employee_first_name' => 'getEmployeeFirstName', + 'employee_last_name' => 'getEmployeeLastName', + 'office_code' => 'getOfficeCode', + 'company_id' => 'getCompanyId', + 'reference_id' => 'getReferenceId' ]; /** @@ -194,6 +204,27 @@ public function getModelName() return self::$openAPIModelName; } + const TYPE_W4 = 'W4'; + const TYPE_W8_BEN = 'W8Ben'; + const TYPE_W8_BEN_E = 'W8BenE'; + const TYPE_W8_IMY = 'W8Imy'; + const TYPE_W9 = 'W9'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_W4, + self::TYPE_W8_BEN, + self::TYPE_W8_BEN_E, + self::TYPE_W8_IMY, + self::TYPE_W9, + ]; + } /** * Associative array for storing property values @@ -211,10 +242,12 @@ public function getModelName() public function __construct(array $data = null) { $this->container['type'] = $data['type'] ?? null; - $this->container['title'] = $data['title'] ?? null; - $this->container['status'] = $data['status'] ?? null; - $this->container['detail'] = $data['detail'] ?? null; - $this->container['instance'] = $data['instance'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['employee_first_name'] = $data['employee_first_name'] ?? null; + $this->container['employee_last_name'] = $data['employee_last_name'] ?? null; + $this->container['office_code'] = $data['office_code'] ?? null; + $this->container['company_id'] = $data['company_id'] ?? null; + $this->container['reference_id'] = $data['reference_id'] ?? null; } /** @@ -226,6 +259,43 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ((mb_strlen($this->container['email']) < 1)) { + $invalidProperties[] = "invalid value for 'email', the character length must be bigger than or equal to 1."; + } + + if ($this->container['employee_first_name'] === null) { + $invalidProperties[] = "'employee_first_name' can't be null"; + } + if ((mb_strlen($this->container['employee_first_name']) < 1)) { + $invalidProperties[] = "invalid value for 'employee_first_name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['employee_last_name'] === null) { + $invalidProperties[] = "'employee_last_name' can't be null"; + } + if ((mb_strlen($this->container['employee_last_name']) < 1)) { + $invalidProperties[] = "invalid value for 'employee_last_name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -254,109 +324,187 @@ public function getType() /** * Sets type * - * @param string|null $type type + * @param string|null $type The form type (always \"w4\" for this model). * * @return self */ public function setType($type) { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } $this->container['type'] = $type; return $this; } /** - * Gets title + * Gets email * - * @return string|null + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email The email address of the individual associated with the form. + * + * @return self + */ + public function setEmail($email) + { + + if ((mb_strlen($email) < 1)) { + throw new \InvalidArgumentException('invalid length for $email when calling W4FormMinimalRequest., must be bigger than or equal to 1.'); + } + + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets employee_first_name + * + * @return string */ - public function getTitle() + public function getEmployeeFirstName() { - return $this->container['title']; + return $this->container['employee_first_name']; } /** - * Sets title + * Sets employee_first_name * - * @param string|null $title title + * @param string $employee_first_name The first name of the employee. * * @return self */ - public function setTitle($title) + public function setEmployeeFirstName($employee_first_name) { - $this->container['title'] = $title; + + if ((mb_strlen($employee_first_name) < 1)) { + throw new \InvalidArgumentException('invalid length for $employee_first_name when calling W4FormMinimalRequest., must be bigger than or equal to 1.'); + } + + $this->container['employee_first_name'] = $employee_first_name; return $this; } /** - * Gets status + * Gets employee_last_name * - * @return int|null + * @return string */ - public function getStatus() + public function getEmployeeLastName() { - return $this->container['status']; + return $this->container['employee_last_name']; } /** - * Sets status + * Sets employee_last_name * - * @param int|null $status status + * @param string $employee_last_name The last name of the employee. * * @return self */ - public function setStatus($status) + public function setEmployeeLastName($employee_last_name) { - $this->container['status'] = $status; + + if ((mb_strlen($employee_last_name) < 1)) { + throw new \InvalidArgumentException('invalid length for $employee_last_name when calling W4FormMinimalRequest., must be bigger than or equal to 1.'); + } + + $this->container['employee_last_name'] = $employee_last_name; return $this; } /** - * Gets detail + * Gets office_code * * @return string|null */ - public function getDetail() + public function getOfficeCode() { - return $this->container['detail']; + return $this->container['office_code']; } /** - * Sets detail + * Sets office_code * - * @param string|null $detail detail + * @param string|null $office_code The office code associated with the form. * * @return self */ - public function setDetail($detail) + public function setOfficeCode($office_code) { - $this->container['detail'] = $detail; + $this->container['office_code'] = $office_code; + + return $this; + } + + /** + * Gets company_id + * + * @return string + */ + public function getCompanyId() + { + return $this->container['company_id']; + } + + /** + * Sets company_id + * + * @param string $company_id The ID of the associated company. + * + * @return self + */ + public function setCompanyId($company_id) + { + + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling W4FormMinimalRequest., must be bigger than or equal to 1.'); + } + + $this->container['company_id'] = $company_id; return $this; } /** - * Gets instance + * Gets reference_id * * @return string|null */ - public function getInstance() + public function getReferenceId() { - return $this->container['instance']; + return $this->container['reference_id']; } /** - * Sets instance + * Sets reference_id * - * @param string|null $instance instance + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setInstance($instance) + public function setReferenceId($reference_id) { - $this->container['instance'] = $instance; + $this->container['reference_id'] = $reference_id; return $this; } diff --git a/lib/Model/A1099/V2/W4FormRequest.php b/lib/Model/A1099/V2/W4FormRequest.php index 8e70b59..631e3db 100644 --- a/lib/Model/A1099/V2/W4FormRequest.php +++ b/lib/Model/A1099/V2/W4FormRequest.php @@ -91,11 +91,11 @@ class W4FormRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'additional_withheld' => 'float', 'exempt_from_withholding' => 'bool', 'office_code' => 'string', + 'e_delivery_consented_at' => '\DateTime', + 'signature' => 'string', 'company_id' => 'string', 'reference_id' => 'string', - 'email' => 'string', - 'e_delivery_consented_at' => '\DateTime', - 'signature' => 'string' + 'email' => 'string' ]; /** @@ -126,11 +126,11 @@ class W4FormRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'additional_withheld' => 'float', 'exempt_from_withholding' => null, 'office_code' => null, + 'e_delivery_consented_at' => 'date-time', + 'signature' => null, 'company_id' => null, 'reference_id' => null, - 'email' => null, - 'e_delivery_consented_at' => 'date-time', - 'signature' => null + 'email' => null ]; /** @@ -180,11 +180,11 @@ public static function openAPIFormats() 'additional_withheld' => 'additionalWithheld', 'exempt_from_withholding' => 'exemptFromWithholding', 'office_code' => 'officeCode', + 'e_delivery_consented_at' => 'eDeliveryConsentedAt', + 'signature' => 'signature', 'company_id' => 'companyId', 'reference_id' => 'referenceId', - 'email' => 'email', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'signature' => 'signature' + 'email' => 'email' ]; /** @@ -213,11 +213,11 @@ public static function openAPIFormats() 'additional_withheld' => 'setAdditionalWithheld', 'exempt_from_withholding' => 'setExemptFromWithholding', 'office_code' => 'setOfficeCode', + 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', + 'signature' => 'setSignature', 'company_id' => 'setCompanyId', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'signature' => 'setSignature' + 'email' => 'setEmail' ]; /** @@ -246,11 +246,11 @@ public static function openAPIFormats() 'additional_withheld' => 'getAdditionalWithheld', 'exempt_from_withholding' => 'getExemptFromWithholding', 'office_code' => 'getOfficeCode', + 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', + 'signature' => 'getSignature', 'company_id' => 'getCompanyId', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'signature' => 'getSignature' + 'email' => 'getEmail' ]; /** @@ -351,11 +351,11 @@ public function __construct(array $data = null) $this->container['additional_withheld'] = $data['additional_withheld'] ?? null; $this->container['exempt_from_withholding'] = $data['exempt_from_withholding'] ?? null; $this->container['office_code'] = $data['office_code'] ?? null; + $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; + $this->container['signature'] = $data['signature'] ?? null; $this->container['company_id'] = $data['company_id'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['email'] = $data['email'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; } /** @@ -376,6 +376,13 @@ public function listInvalidProperties() ); } + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -882,121 +889,126 @@ public function setOfficeCode($office_code) } /** - * Gets company_id + * Gets e_delivery_consented_at * - * @return string|null + * @return \DateTime|null */ - public function getCompanyId() + public function getEDeliveryConsentedAt() { - return $this->container['company_id']; + return $this->container['e_delivery_consented_at']; } /** - * Sets company_id + * Sets e_delivery_consented_at * - * @param string|null $company_id The ID of the associated company. + * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. * * @return self */ - public function setCompanyId($company_id) + public function setEDeliveryConsentedAt($e_delivery_consented_at) { - $this->container['company_id'] = $company_id; + $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; return $this; } /** - * Gets reference_id + * Gets signature * * @return string|null */ - public function getReferenceId() + public function getSignature() { - return $this->container['reference_id']; + return $this->container['signature']; } /** - * Sets reference_id + * Sets signature * - * @param string|null $reference_id A reference identifier for the form. + * @param string|null $signature The signature of the form. * * @return self */ - public function setReferenceId($reference_id) + public function setSignature($signature) { - $this->container['reference_id'] = $reference_id; + $this->container['signature'] = $signature; return $this; } /** - * Gets email + * Gets company_id * - * @return string|null + * @return string */ - public function getEmail() + public function getCompanyId() { - return $this->container['email']; + return $this->container['company_id']; } /** - * Sets email + * Sets company_id * - * @param string|null $email The email address of the individual associated with the form. + * @param string $company_id The ID of the associated company. * * @return self */ - public function setEmail($email) + public function setCompanyId($company_id) { - $this->container['email'] = $email; + + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling W4FormRequest., must be bigger than or equal to 1.'); + } + + $this->container['company_id'] = $company_id; return $this; } /** - * Gets e_delivery_consented_at + * Gets reference_id * - * @return \DateTime|null + * @return string|null */ - public function getEDeliveryConsentedAt() + public function getReferenceId() { - return $this->container['e_delivery_consented_at']; + return $this->container['reference_id']; } /** - * Sets e_delivery_consented_at + * Sets reference_id * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) + public function setReferenceId($reference_id) { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets signature + * Gets email * * @return string|null */ - public function getSignature() + public function getEmail() { - return $this->container['signature']; + return $this->container['email']; } /** - * Sets signature + * Sets email * - * @param string|null $signature The signature of the form. + * @param string|null $email The email address of the individual associated with the form. * * @return self */ - public function setSignature($signature) + public function setEmail($email) { - $this->container['signature'] = $signature; + $this->container['email'] = $email; return $this; } diff --git a/lib/Model/A1099/V2/W4FormResponse.php b/lib/Model/A1099/V2/W4FormResponse.php index 1be5ed2..d294ad5 100644 --- a/lib/Model/A1099/V2/W4FormResponse.php +++ b/lib/Model/A1099/V2/W4FormResponse.php @@ -39,8 +39,6 @@ */ namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; use \Avalara\SDK\ObjectSerializer; use \Avalara\SDK\Model\ModelInterface; /** @@ -54,7 +52,7 @@ * @template TKey int|null * @template TValue mixed|null */ -class W4FormResponse implements ModelInterface, ArrayAccess, \JsonSerializable +class W4FormResponse extends W9FormBaseResponse { public const DISCRIMINATOR = null; @@ -89,21 +87,7 @@ class W4FormResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'deductions' => 'float', 'additional_withheld' => 'float', 'exempt_from_withholding' => 'bool', - 'office_code' => 'string', - 'id' => 'string', - 'type' => 'string', - 'entry_status' => 'string', - 'entry_status_date' => '\DateTime', - 'reference_id' => 'string', - 'company_id' => 'string', - 'display_name' => 'string', - 'email' => 'string', - 'archived' => 'bool', - 'signature' => 'string', - 'signed_date' => '\DateTime', - 'e_delivery_consented_at' => '\DateTime', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' + 'office_code' => 'string' ]; /** @@ -132,21 +116,7 @@ class W4FormResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'deductions' => 'float', 'additional_withheld' => 'float', 'exempt_from_withholding' => null, - 'office_code' => null, - 'id' => null, - 'type' => null, - 'entry_status' => null, - 'entry_status_date' => 'date-time', - 'reference_id' => null, - 'company_id' => null, - 'display_name' => null, - 'email' => null, - 'archived' => null, - 'signature' => null, - 'signed_date' => 'date-time', - 'e_delivery_consented_at' => 'date-time', - 'created_at' => 'date-time', - 'updated_at' => 'date-time' + 'office_code' => null ]; /** @@ -156,7 +126,7 @@ class W4FormResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ public static function openAPITypes() { - return self::$openAPITypes; + return self::$openAPITypes + parent::openAPITypes(); } /** @@ -166,7 +136,7 @@ public static function openAPITypes() */ public static function openAPIFormats() { - return self::$openAPIFormats; + return self::$openAPIFormats + parent::openAPIFormats(); } /** @@ -194,21 +164,7 @@ public static function openAPIFormats() 'deductions' => 'deductions', 'additional_withheld' => 'additionalWithheld', 'exempt_from_withholding' => 'exemptFromWithholding', - 'office_code' => 'officeCode', - 'id' => 'id', - 'type' => 'type', - 'entry_status' => 'entryStatus', - 'entry_status_date' => 'entryStatusDate', - 'reference_id' => 'referenceId', - 'company_id' => 'companyId', - 'display_name' => 'displayName', - 'email' => 'email', - 'archived' => 'archived', - 'signature' => 'signature', - 'signed_date' => 'signedDate', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt' + 'office_code' => 'officeCode' ]; /** @@ -235,21 +191,7 @@ public static function openAPIFormats() 'deductions' => 'setDeductions', 'additional_withheld' => 'setAdditionalWithheld', 'exempt_from_withholding' => 'setExemptFromWithholding', - 'office_code' => 'setOfficeCode', - 'id' => 'setId', - 'type' => 'setType', - 'entry_status' => 'setEntryStatus', - 'entry_status_date' => 'setEntryStatusDate', - 'reference_id' => 'setReferenceId', - 'company_id' => 'setCompanyId', - 'display_name' => 'setDisplayName', - 'email' => 'setEmail', - 'archived' => 'setArchived', - 'signature' => 'setSignature', - 'signed_date' => 'setSignedDate', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' + 'office_code' => 'setOfficeCode' ]; /** @@ -276,21 +218,7 @@ public static function openAPIFormats() 'deductions' => 'getDeductions', 'additional_withheld' => 'getAdditionalWithheld', 'exempt_from_withholding' => 'getExemptFromWithholding', - 'office_code' => 'getOfficeCode', - 'id' => 'getId', - 'type' => 'getType', - 'entry_status' => 'getEntryStatus', - 'entry_status_date' => 'getEntryStatusDate', - 'reference_id' => 'getReferenceId', - 'company_id' => 'getCompanyId', - 'display_name' => 'getDisplayName', - 'email' => 'getEmail', - 'archived' => 'getArchived', - 'signature' => 'getSignature', - 'signed_date' => 'getSignedDate', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' + 'office_code' => 'getOfficeCode' ]; /** @@ -301,7 +229,7 @@ public static function openAPIFormats() */ public static function attributeMap() { - return self::$attributeMap; + return parent::attributeMap() + self::$attributeMap; } /** @@ -311,7 +239,7 @@ public static function attributeMap() */ public static function setters() { - return self::$setters; + return parent::setters() + self::$setters; } /** @@ -321,7 +249,7 @@ public static function setters() */ public static function getters() { - return self::$getters; + return parent::getters() + self::$getters; } /** @@ -335,12 +263,6 @@ public function getModelName() } - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; /** * Constructor @@ -350,6 +272,8 @@ public function getModelName() */ public function __construct(array $data = null) { + parent::__construct($data); + $this->container['employee_first_name'] = $data['employee_first_name'] ?? null; $this->container['employee_middle_name'] = $data['employee_middle_name'] ?? null; $this->container['employee_last_name'] = $data['employee_last_name'] ?? null; @@ -369,20 +293,6 @@ public function __construct(array $data = null) $this->container['additional_withheld'] = $data['additional_withheld'] ?? null; $this->container['exempt_from_withholding'] = $data['exempt_from_withholding'] ?? null; $this->container['office_code'] = $data['office_code'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['entry_status'] = $data['entry_status'] ?? null; - $this->container['entry_status_date'] = $data['entry_status_date'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['company_id'] = $data['company_id'] ?? null; - $this->container['display_name'] = $data['display_name'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['archived'] = $data['archived'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; - $this->container['signed_date'] = $data['signed_date'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -392,7 +302,7 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; + $invalidProperties = parent::listInvalidProperties(); return $invalidProperties; } @@ -864,342 +774,6 @@ public function setOfficeCode($office_code) return $this; } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id The unique identifier for the form. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type The form type. - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets entry_status - * - * @return string|null - */ - public function getEntryStatus() - { - return $this->container['entry_status']; - } - - /** - * Sets entry_status - * - * @param string|null $entry_status The form status. - * - * @return self - */ - public function setEntryStatus($entry_status) - { - $this->container['entry_status'] = $entry_status; - - return $this; - } - - /** - * Gets entry_status_date - * - * @return \DateTime|null - */ - public function getEntryStatusDate() - { - return $this->container['entry_status_date']; - } - - /** - * Sets entry_status_date - * - * @param \DateTime|null $entry_status_date The timestamp for the latest status update. - * - * @return self - */ - public function setEntryStatusDate($entry_status_date) - { - $this->container['entry_status_date'] = $entry_status_date; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id A reference identifier for the form. - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets company_id - * - * @return string|null - */ - public function getCompanyId() - { - return $this->container['company_id']; - } - - /** - * Sets company_id - * - * @param string|null $company_id The ID of the associated company. - * - * @return self - */ - public function setCompanyId($company_id) - { - $this->container['company_id'] = $company_id; - - return $this; - } - - /** - * Gets display_name - * - * @return string|null - */ - public function getDisplayName() - { - return $this->container['display_name']; - } - - /** - * Sets display_name - * - * @param string|null $display_name The display name associated with the form. - * - * @return self - */ - public function setDisplayName($display_name) - { - $this->container['display_name'] = $display_name; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email The email address of the individual associated with the form. - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets archived - * - * @return bool|null - */ - public function getArchived() - { - return $this->container['archived']; - } - - /** - * Sets archived - * - * @param bool|null $archived Indicates whether the form is archived. - * - * @return self - */ - public function setArchived($archived) - { - $this->container['archived'] = $archived; - - return $this; - } - - /** - * Gets signature - * - * @return string|null - */ - public function getSignature() - { - return $this->container['signature']; - } - - /** - * Sets signature - * - * @param string|null $signature The signature of the form. - * - * @return self - */ - public function setSignature($signature) - { - $this->container['signature'] = $signature; - - return $this; - } - - /** - * Gets signed_date - * - * @return \DateTime|null - */ - public function getSignedDate() - { - return $this->container['signed_date']; - } - - /** - * Sets signed_date - * - * @param \DateTime|null $signed_date The date the form was signed. - * - * @return self - */ - public function setSignedDate($signed_date) - { - $this->container['signed_date'] = $signed_date; - - return $this; - } - - /** - * Gets e_delivery_consented_at - * - * @return \DateTime|null - */ - public function getEDeliveryConsentedAt() - { - return $this->container['e_delivery_consented_at']; - } - - /** - * Sets e_delivery_consented_at - * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. - * - * @return self - */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) - { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at The creation date of the form. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at The last updated date of the form. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/IntermediaryOrFlowThroughRequest.php b/lib/Model/A1099/V2/W8BenEFormMinimalRequest.php similarity index 58% rename from lib/Model/A1099/V2/IntermediaryOrFlowThroughRequest.php rename to lib/Model/A1099/V2/W8BenEFormMinimalRequest.php index 8e7261d..4a8cb3d 100644 --- a/lib/Model/A1099/V2/IntermediaryOrFlowThroughRequest.php +++ b/lib/Model/A1099/V2/W8BenEFormMinimalRequest.php @@ -1,6 +1,6 @@ 'string', - 'chap3_status_code' => 'string', - 'chap4_status_code' => 'string', + 'type' => 'string', + 'email' => 'string', 'name' => 'string', - 'giin' => 'string', - 'country_code' => 'string', - 'foreign_tin' => 'string', - 'address' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string' + 'reference_number' => 'string', + 'company_id' => 'string', + 'reference_id' => 'string' ]; /** @@ -92,17 +87,12 @@ class IntermediaryOrFlowThroughRequest implements ModelInterface, ArrayAccess, \ * @psalm-var array */ protected static $openAPIFormats = [ - 'ein' => null, - 'chap3_status_code' => null, - 'chap4_status_code' => null, + 'type' => null, + 'email' => null, 'name' => null, - 'giin' => null, - 'country_code' => null, - 'foreign_tin' => null, - 'address' => null, - 'city' => null, - 'state' => null, - 'zip' => null + 'reference_number' => null, + 'company_id' => null, + 'reference_id' => null ]; /** @@ -132,17 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'ein' => 'ein', - 'chap3_status_code' => 'chap3StatusCode', - 'chap4_status_code' => 'chap4StatusCode', + 'type' => 'type', + 'email' => 'email', 'name' => 'name', - 'giin' => 'giin', - 'country_code' => 'countryCode', - 'foreign_tin' => 'foreignTin', - 'address' => 'address', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip' + 'reference_number' => 'referenceNumber', + 'company_id' => 'companyId', + 'reference_id' => 'referenceId' ]; /** @@ -151,17 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'ein' => 'setEin', - 'chap3_status_code' => 'setChap3StatusCode', - 'chap4_status_code' => 'setChap4StatusCode', + 'type' => 'setType', + 'email' => 'setEmail', 'name' => 'setName', - 'giin' => 'setGiin', - 'country_code' => 'setCountryCode', - 'foreign_tin' => 'setForeignTin', - 'address' => 'setAddress', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip' + 'reference_number' => 'setReferenceNumber', + 'company_id' => 'setCompanyId', + 'reference_id' => 'setReferenceId' ]; /** @@ -170,17 +150,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'ein' => 'getEin', - 'chap3_status_code' => 'getChap3StatusCode', - 'chap4_status_code' => 'getChap4StatusCode', + 'type' => 'getType', + 'email' => 'getEmail', 'name' => 'getName', - 'giin' => 'getGiin', - 'country_code' => 'getCountryCode', - 'foreign_tin' => 'getForeignTin', - 'address' => 'getAddress', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip' + 'reference_number' => 'getReferenceNumber', + 'company_id' => 'getCompanyId', + 'reference_id' => 'getReferenceId' ]; /** @@ -224,6 +199,27 @@ public function getModelName() return self::$openAPIModelName; } + const TYPE_W4 = 'W4'; + const TYPE_W8_BEN = 'W8Ben'; + const TYPE_W8_BEN_E = 'W8BenE'; + const TYPE_W8_IMY = 'W8Imy'; + const TYPE_W9 = 'W9'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_W4, + self::TYPE_W8_BEN, + self::TYPE_W8_BEN_E, + self::TYPE_W8_IMY, + self::TYPE_W9, + ]; + } /** * Associative array for storing property values @@ -240,17 +236,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['ein'] = $data['ein'] ?? null; - $this->container['chap3_status_code'] = $data['chap3_status_code'] ?? null; - $this->container['chap4_status_code'] = $data['chap4_status_code'] ?? null; + $this->container['type'] = $data['type'] ?? null; + $this->container['email'] = $data['email'] ?? null; $this->container['name'] = $data['name'] ?? null; - $this->container['giin'] = $data['giin'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['foreign_tin'] = $data['foreign_tin'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; + $this->container['reference_number'] = $data['reference_number'] ?? null; + $this->container['company_id'] = $data['company_id'] ?? null; + $this->container['reference_id'] = $data['reference_id'] ?? null; } /** @@ -262,6 +253,36 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ((mb_strlen($this->container['email']) < 1)) { + $invalidProperties[] = "invalid value for 'email', the character length must be bigger than or equal to 1."; + } + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -278,73 +299,64 @@ public function valid() /** - * Gets ein + * Gets type * * @return string|null */ - public function getEin() + public function getType() { - return $this->container['ein']; + return $this->container['type']; } /** - * Sets ein + * Sets type * - * @param string|null $ein ein + * @param string|null $type The form type (always \"w8bene\" for this model). * * @return self */ - public function setEin($ein) - { - $this->container['ein'] = $ein; + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; return $this; } /** - * Gets chap3_status_code + * Gets email * - * @return string|null + * @return string */ - public function getChap3StatusCode() + public function getEmail() { - return $this->container['chap3_status_code']; + return $this->container['email']; } /** - * Sets chap3_status_code + * Sets email * - * @param string|null $chap3_status_code chap3_status_code + * @param string $email The email address of the individual associated with the form. * * @return self */ - public function setChap3StatusCode($chap3_status_code) + public function setEmail($email) { - $this->container['chap3_status_code'] = $chap3_status_code; - return $this; - } - - /** - * Gets chap4_status_code - * - * @return string|null - */ - public function getChap4StatusCode() - { - return $this->container['chap4_status_code']; - } + if ((mb_strlen($email) < 1)) { + throw new \InvalidArgumentException('invalid length for $email when calling W8BenEFormMinimalRequest., must be bigger than or equal to 1.'); + } - /** - * Sets chap4_status_code - * - * @param string|null $chap4_status_code chap4_status_code - * - * @return self - */ - public function setChap4StatusCode($chap4_status_code) - { - $this->container['chap4_status_code'] = $chap4_status_code; + $this->container['email'] = $email; return $this; } @@ -352,7 +364,7 @@ public function setChap4StatusCode($chap4_status_code) /** * Gets name * - * @return string|null + * @return string */ public function getName() { @@ -362,181 +374,95 @@ public function getName() /** * Sets name * - * @param string|null $name name + * @param string $name The name of the individual or entity associated with the form. * * @return self */ public function setName($name) { - $this->container['name'] = $name; - return $this; - } - - /** - * Gets giin - * - * @return string|null - */ - public function getGiin() - { - return $this->container['giin']; - } - - /** - * Sets giin - * - * @param string|null $giin giin - * - * @return self - */ - public function setGiin($giin) - { - $this->container['giin'] = $giin; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code country_code - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets foreign_tin - * - * @return string|null - */ - public function getForeignTin() - { - return $this->container['foreign_tin']; - } + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling W8BenEFormMinimalRequest., must be bigger than or equal to 1.'); + } - /** - * Sets foreign_tin - * - * @param string|null $foreign_tin foreign_tin - * - * @return self - */ - public function setForeignTin($foreign_tin) - { - $this->container['foreign_tin'] = $foreign_tin; + $this->container['name'] = $name; return $this; } /** - * Gets address + * Gets reference_number * * @return string|null */ - public function getAddress() + public function getReferenceNumber() { - return $this->container['address']; + return $this->container['reference_number']; } /** - * Sets address + * Sets reference_number * - * @param string|null $address address + * @param string|null $reference_number A reference number for the form. * * @return self */ - public function setAddress($address) + public function setReferenceNumber($reference_number) { - $this->container['address'] = $address; + $this->container['reference_number'] = $reference_number; return $this; } /** - * Gets city + * Gets company_id * - * @return string|null + * @return string */ - public function getCity() + public function getCompanyId() { - return $this->container['city']; + return $this->container['company_id']; } /** - * Sets city + * Sets company_id * - * @param string|null $city city + * @param string $company_id The ID of the associated company. * * @return self */ - public function setCity($city) + public function setCompanyId($company_id) { - $this->container['city'] = $city; - - return $this; - } - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling W8BenEFormMinimalRequest., must be bigger than or equal to 1.'); + } - /** - * Sets state - * - * @param string|null $state state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; + $this->container['company_id'] = $company_id; return $this; } /** - * Gets zip + * Gets reference_id * * @return string|null */ - public function getZip() + public function getReferenceId() { - return $this->container['zip']; + return $this->container['reference_id']; } /** - * Sets zip + * Sets reference_id * - * @param string|null $zip zip + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setZip($zip) + public function setReferenceId($reference_id) { - $this->container['zip'] = $zip; + $this->container['reference_id'] = $reference_id; return $this; } diff --git a/lib/Model/A1099/V2/W8BenEFormRequest.php b/lib/Model/A1099/V2/W8BenEFormRequest.php index bf0dc37..da9f7d2 100644 --- a/lib/Model/A1099/V2/W8BenEFormRequest.php +++ b/lib/Model/A1099/V2/W8BenEFormRequest.php @@ -167,11 +167,11 @@ class W8BenEFormRequest implements ModelInterface, ArrayAccess, \JsonSerializabl 'substantial_us_owners' => '\Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerRequest[]', 'signer_name' => 'string', 'capacity_to_sign_certification' => 'bool', + 'e_delivery_consented_at' => '\DateTime', + 'signature' => 'string', 'company_id' => 'string', 'reference_id' => 'string', - 'email' => 'string', - 'e_delivery_consented_at' => '\DateTime', - 'signature' => 'string' + 'email' => 'string' ]; /** @@ -278,11 +278,11 @@ class W8BenEFormRequest implements ModelInterface, ArrayAccess, \JsonSerializabl 'substantial_us_owners' => null, 'signer_name' => null, 'capacity_to_sign_certification' => null, + 'e_delivery_consented_at' => 'date-time', + 'signature' => null, 'company_id' => null, 'reference_id' => null, - 'email' => null, - 'e_delivery_consented_at' => 'date-time', - 'signature' => null + 'email' => null ]; /** @@ -408,11 +408,11 @@ public static function openAPIFormats() 'substantial_us_owners' => 'substantialUsOwners', 'signer_name' => 'signerName', 'capacity_to_sign_certification' => 'capacityToSignCertification', + 'e_delivery_consented_at' => 'eDeliveryConsentedAt', + 'signature' => 'signature', 'company_id' => 'companyId', 'reference_id' => 'referenceId', - 'email' => 'email', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'signature' => 'signature' + 'email' => 'email' ]; /** @@ -517,11 +517,11 @@ public static function openAPIFormats() 'substantial_us_owners' => 'setSubstantialUsOwners', 'signer_name' => 'setSignerName', 'capacity_to_sign_certification' => 'setCapacityToSignCertification', + 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', + 'signature' => 'setSignature', 'company_id' => 'setCompanyId', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'signature' => 'setSignature' + 'email' => 'setEmail' ]; /** @@ -626,11 +626,11 @@ public static function openAPIFormats() 'substantial_us_owners' => 'getSubstantialUsOwners', 'signer_name' => 'getSignerName', 'capacity_to_sign_certification' => 'getCapacityToSignCertification', + 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', + 'signature' => 'getSignature', 'company_id' => 'getCompanyId', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'signature' => 'getSignature' + 'email' => 'getEmail' ]; /** @@ -807,11 +807,11 @@ public function __construct(array $data = null) $this->container['substantial_us_owners'] = $data['substantial_us_owners'] ?? null; $this->container['signer_name'] = $data['signer_name'] ?? null; $this->container['capacity_to_sign_certification'] = $data['capacity_to_sign_certification'] ?? null; + $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; + $this->container['signature'] = $data['signature'] ?? null; $this->container['company_id'] = $data['company_id'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['email'] = $data['email'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; } /** @@ -832,6 +832,13 @@ public function listInvalidProperties() ); } + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -3162,121 +3169,126 @@ public function setCapacityToSignCertification($capacity_to_sign_certification) } /** - * Gets company_id + * Gets e_delivery_consented_at * - * @return string|null + * @return \DateTime|null */ - public function getCompanyId() + public function getEDeliveryConsentedAt() { - return $this->container['company_id']; + return $this->container['e_delivery_consented_at']; } /** - * Sets company_id + * Sets e_delivery_consented_at * - * @param string|null $company_id The ID of the associated company. + * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. * * @return self */ - public function setCompanyId($company_id) + public function setEDeliveryConsentedAt($e_delivery_consented_at) { - $this->container['company_id'] = $company_id; + $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; return $this; } /** - * Gets reference_id + * Gets signature * * @return string|null */ - public function getReferenceId() + public function getSignature() { - return $this->container['reference_id']; + return $this->container['signature']; } /** - * Sets reference_id + * Sets signature * - * @param string|null $reference_id A reference identifier for the form. + * @param string|null $signature The signature of the form. * * @return self */ - public function setReferenceId($reference_id) + public function setSignature($signature) { - $this->container['reference_id'] = $reference_id; + $this->container['signature'] = $signature; return $this; } /** - * Gets email + * Gets company_id * - * @return string|null + * @return string */ - public function getEmail() + public function getCompanyId() { - return $this->container['email']; + return $this->container['company_id']; } /** - * Sets email + * Sets company_id * - * @param string|null $email The email address of the individual associated with the form. + * @param string $company_id The ID of the associated company. * * @return self */ - public function setEmail($email) + public function setCompanyId($company_id) { - $this->container['email'] = $email; + + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling W8BenEFormRequest., must be bigger than or equal to 1.'); + } + + $this->container['company_id'] = $company_id; return $this; } /** - * Gets e_delivery_consented_at + * Gets reference_id * - * @return \DateTime|null + * @return string|null */ - public function getEDeliveryConsentedAt() + public function getReferenceId() { - return $this->container['e_delivery_consented_at']; + return $this->container['reference_id']; } /** - * Sets e_delivery_consented_at + * Sets reference_id * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) + public function setReferenceId($reference_id) { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets signature + * Gets email * * @return string|null */ - public function getSignature() + public function getEmail() { - return $this->container['signature']; + return $this->container['email']; } /** - * Sets signature + * Sets email * - * @param string|null $signature The signature of the form. + * @param string|null $email The email address of the individual associated with the form. * * @return self */ - public function setSignature($signature) + public function setEmail($email) { - $this->container['signature'] = $signature; + $this->container['email'] = $email; return $this; } diff --git a/lib/Model/A1099/V2/W8BenEFormResponse.php b/lib/Model/A1099/V2/W8BenEFormResponse.php index 30fadd5..1058be6 100644 --- a/lib/Model/A1099/V2/W8BenEFormResponse.php +++ b/lib/Model/A1099/V2/W8BenEFormResponse.php @@ -39,8 +39,6 @@ */ namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; use \Avalara\SDK\ObjectSerializer; use \Avalara\SDK\Model\ModelInterface; /** @@ -54,7 +52,7 @@ * @template TKey int|null * @template TValue mixed|null */ -class W8BenEFormResponse implements ModelInterface, ArrayAccess, \JsonSerializable +class W8BenEFormResponse extends W9FormBaseResponse { public const DISCRIMINATOR = null; @@ -166,21 +164,7 @@ class W8BenEFormResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'direct_reporting_nffe_sponsoring_entity' => 'string', 'substantial_us_owners' => '\Avalara\SDK\Model\A1099\V2\SubstantialUsOwnerResponse[]', 'signer_name' => 'string', - 'capacity_to_sign_certification' => 'bool', - 'id' => 'string', - 'type' => 'string', - 'entry_status' => 'string', - 'entry_status_date' => '\DateTime', - 'reference_id' => 'string', - 'company_id' => 'string', - 'display_name' => 'string', - 'email' => 'string', - 'archived' => 'bool', - 'signature' => 'string', - 'signed_date' => '\DateTime', - 'e_delivery_consented_at' => '\DateTime', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' + 'capacity_to_sign_certification' => 'bool' ]; /** @@ -286,21 +270,7 @@ class W8BenEFormResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'direct_reporting_nffe_sponsoring_entity' => null, 'substantial_us_owners' => null, 'signer_name' => null, - 'capacity_to_sign_certification' => null, - 'id' => null, - 'type' => null, - 'entry_status' => null, - 'entry_status_date' => 'date-time', - 'reference_id' => null, - 'company_id' => null, - 'display_name' => null, - 'email' => null, - 'archived' => null, - 'signature' => null, - 'signed_date' => 'date-time', - 'e_delivery_consented_at' => 'date-time', - 'created_at' => 'date-time', - 'updated_at' => 'date-time' + 'capacity_to_sign_certification' => null ]; /** @@ -310,7 +280,7 @@ class W8BenEFormResponse implements ModelInterface, ArrayAccess, \JsonSerializab */ public static function openAPITypes() { - return self::$openAPITypes; + return self::$openAPITypes + parent::openAPITypes(); } /** @@ -320,7 +290,7 @@ public static function openAPITypes() */ public static function openAPIFormats() { - return self::$openAPIFormats; + return self::$openAPIFormats + parent::openAPIFormats(); } /** @@ -425,21 +395,7 @@ public static function openAPIFormats() 'direct_reporting_nffe_sponsoring_entity' => 'directReportingNffeSponsoringEntity', 'substantial_us_owners' => 'substantialUsOwners', 'signer_name' => 'signerName', - 'capacity_to_sign_certification' => 'capacityToSignCertification', - 'id' => 'id', - 'type' => 'type', - 'entry_status' => 'entryStatus', - 'entry_status_date' => 'entryStatusDate', - 'reference_id' => 'referenceId', - 'company_id' => 'companyId', - 'display_name' => 'displayName', - 'email' => 'email', - 'archived' => 'archived', - 'signature' => 'signature', - 'signed_date' => 'signedDate', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt' + 'capacity_to_sign_certification' => 'capacityToSignCertification' ]; /** @@ -543,21 +499,7 @@ public static function openAPIFormats() 'direct_reporting_nffe_sponsoring_entity' => 'setDirectReportingNffeSponsoringEntity', 'substantial_us_owners' => 'setSubstantialUsOwners', 'signer_name' => 'setSignerName', - 'capacity_to_sign_certification' => 'setCapacityToSignCertification', - 'id' => 'setId', - 'type' => 'setType', - 'entry_status' => 'setEntryStatus', - 'entry_status_date' => 'setEntryStatusDate', - 'reference_id' => 'setReferenceId', - 'company_id' => 'setCompanyId', - 'display_name' => 'setDisplayName', - 'email' => 'setEmail', - 'archived' => 'setArchived', - 'signature' => 'setSignature', - 'signed_date' => 'setSignedDate', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' + 'capacity_to_sign_certification' => 'setCapacityToSignCertification' ]; /** @@ -661,21 +603,7 @@ public static function openAPIFormats() 'direct_reporting_nffe_sponsoring_entity' => 'getDirectReportingNffeSponsoringEntity', 'substantial_us_owners' => 'getSubstantialUsOwners', 'signer_name' => 'getSignerName', - 'capacity_to_sign_certification' => 'getCapacityToSignCertification', - 'id' => 'getId', - 'type' => 'getType', - 'entry_status' => 'getEntryStatus', - 'entry_status_date' => 'getEntryStatusDate', - 'reference_id' => 'getReferenceId', - 'company_id' => 'getCompanyId', - 'display_name' => 'getDisplayName', - 'email' => 'getEmail', - 'archived' => 'getArchived', - 'signature' => 'getSignature', - 'signed_date' => 'getSignedDate', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' + 'capacity_to_sign_certification' => 'getCapacityToSignCertification' ]; /** @@ -686,7 +614,7 @@ public static function openAPIFormats() */ public static function attributeMap() { - return self::$attributeMap; + return parent::attributeMap() + self::$attributeMap; } /** @@ -696,7 +624,7 @@ public static function attributeMap() */ public static function setters() { - return self::$setters; + return parent::setters() + self::$setters; } /** @@ -706,7 +634,7 @@ public static function setters() */ public static function getters() { - return self::$getters; + return parent::getters() + self::$getters; } /** @@ -720,12 +648,6 @@ public function getModelName() } - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; /** * Constructor @@ -735,6 +657,8 @@ public function getModelName() */ public function __construct(array $data = null) { + parent::__construct($data); + $this->container['name'] = $data['name'] ?? null; $this->container['citizenship_country'] = $data['citizenship_country'] ?? null; $this->container['disregarded_entity'] = $data['disregarded_entity'] ?? null; @@ -831,20 +755,6 @@ public function __construct(array $data = null) $this->container['substantial_us_owners'] = $data['substantial_us_owners'] ?? null; $this->container['signer_name'] = $data['signer_name'] ?? null; $this->container['capacity_to_sign_certification'] = $data['capacity_to_sign_certification'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['entry_status'] = $data['entry_status'] ?? null; - $this->container['entry_status_date'] = $data['entry_status_date'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['company_id'] = $data['company_id'] ?? null; - $this->container['display_name'] = $data['display_name'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['archived'] = $data['archived'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; - $this->container['signed_date'] = $data['signed_date'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -854,7 +764,7 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; + $invalidProperties = parent::listInvalidProperties(); return $invalidProperties; } @@ -3174,342 +3084,6 @@ public function setCapacityToSignCertification($capacity_to_sign_certification) return $this; } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id The unique identifier for the form. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type The form type. - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets entry_status - * - * @return string|null - */ - public function getEntryStatus() - { - return $this->container['entry_status']; - } - - /** - * Sets entry_status - * - * @param string|null $entry_status The form status. - * - * @return self - */ - public function setEntryStatus($entry_status) - { - $this->container['entry_status'] = $entry_status; - - return $this; - } - - /** - * Gets entry_status_date - * - * @return \DateTime|null - */ - public function getEntryStatusDate() - { - return $this->container['entry_status_date']; - } - - /** - * Sets entry_status_date - * - * @param \DateTime|null $entry_status_date The timestamp for the latest status update. - * - * @return self - */ - public function setEntryStatusDate($entry_status_date) - { - $this->container['entry_status_date'] = $entry_status_date; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id A reference identifier for the form. - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets company_id - * - * @return string|null - */ - public function getCompanyId() - { - return $this->container['company_id']; - } - - /** - * Sets company_id - * - * @param string|null $company_id The ID of the associated company. - * - * @return self - */ - public function setCompanyId($company_id) - { - $this->container['company_id'] = $company_id; - - return $this; - } - - /** - * Gets display_name - * - * @return string|null - */ - public function getDisplayName() - { - return $this->container['display_name']; - } - - /** - * Sets display_name - * - * @param string|null $display_name The display name associated with the form. - * - * @return self - */ - public function setDisplayName($display_name) - { - $this->container['display_name'] = $display_name; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email The email address of the individual associated with the form. - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets archived - * - * @return bool|null - */ - public function getArchived() - { - return $this->container['archived']; - } - - /** - * Sets archived - * - * @param bool|null $archived Indicates whether the form is archived. - * - * @return self - */ - public function setArchived($archived) - { - $this->container['archived'] = $archived; - - return $this; - } - - /** - * Gets signature - * - * @return string|null - */ - public function getSignature() - { - return $this->container['signature']; - } - - /** - * Sets signature - * - * @param string|null $signature The signature of the form. - * - * @return self - */ - public function setSignature($signature) - { - $this->container['signature'] = $signature; - - return $this; - } - - /** - * Gets signed_date - * - * @return \DateTime|null - */ - public function getSignedDate() - { - return $this->container['signed_date']; - } - - /** - * Sets signed_date - * - * @param \DateTime|null $signed_date The date the form was signed. - * - * @return self - */ - public function setSignedDate($signed_date) - { - $this->container['signed_date'] = $signed_date; - - return $this; - } - - /** - * Gets e_delivery_consented_at - * - * @return \DateTime|null - */ - public function getEDeliveryConsentedAt() - { - return $this->container['e_delivery_consented_at']; - } - - /** - * Sets e_delivery_consented_at - * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. - * - * @return self - */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) - { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at The creation date of the form. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at The last updated date of the form. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/IntermediaryOrFlowThroughResponse.php b/lib/Model/A1099/V2/W8BenFormMinimalRequest.php similarity index 58% rename from lib/Model/A1099/V2/IntermediaryOrFlowThroughResponse.php rename to lib/Model/A1099/V2/W8BenFormMinimalRequest.php index 0e99f68..e1cc7b6 100644 --- a/lib/Model/A1099/V2/IntermediaryOrFlowThroughResponse.php +++ b/lib/Model/A1099/V2/W8BenFormMinimalRequest.php @@ -1,6 +1,6 @@ 'string', - 'chap3_status_code' => 'string', - 'chap4_status_code' => 'string', + 'type' => 'string', + 'email' => 'string', 'name' => 'string', - 'giin' => 'string', - 'country_code' => 'string', - 'foreign_tin' => 'string', - 'address' => 'string', - 'city' => 'string', - 'state' => 'string', - 'zip' => 'string' + 'reference_number' => 'string', + 'company_id' => 'string', + 'reference_id' => 'string' ]; /** @@ -92,17 +87,12 @@ class IntermediaryOrFlowThroughResponse implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'ein' => null, - 'chap3_status_code' => null, - 'chap4_status_code' => null, + 'type' => null, + 'email' => null, 'name' => null, - 'giin' => null, - 'country_code' => null, - 'foreign_tin' => null, - 'address' => null, - 'city' => null, - 'state' => null, - 'zip' => null + 'reference_number' => null, + 'company_id' => null, + 'reference_id' => null ]; /** @@ -132,17 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'ein' => 'ein', - 'chap3_status_code' => 'chap3StatusCode', - 'chap4_status_code' => 'chap4StatusCode', + 'type' => 'type', + 'email' => 'email', 'name' => 'name', - 'giin' => 'giin', - 'country_code' => 'countryCode', - 'foreign_tin' => 'foreignTin', - 'address' => 'address', - 'city' => 'city', - 'state' => 'state', - 'zip' => 'zip' + 'reference_number' => 'referenceNumber', + 'company_id' => 'companyId', + 'reference_id' => 'referenceId' ]; /** @@ -151,17 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'ein' => 'setEin', - 'chap3_status_code' => 'setChap3StatusCode', - 'chap4_status_code' => 'setChap4StatusCode', + 'type' => 'setType', + 'email' => 'setEmail', 'name' => 'setName', - 'giin' => 'setGiin', - 'country_code' => 'setCountryCode', - 'foreign_tin' => 'setForeignTin', - 'address' => 'setAddress', - 'city' => 'setCity', - 'state' => 'setState', - 'zip' => 'setZip' + 'reference_number' => 'setReferenceNumber', + 'company_id' => 'setCompanyId', + 'reference_id' => 'setReferenceId' ]; /** @@ -170,17 +150,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'ein' => 'getEin', - 'chap3_status_code' => 'getChap3StatusCode', - 'chap4_status_code' => 'getChap4StatusCode', + 'type' => 'getType', + 'email' => 'getEmail', 'name' => 'getName', - 'giin' => 'getGiin', - 'country_code' => 'getCountryCode', - 'foreign_tin' => 'getForeignTin', - 'address' => 'getAddress', - 'city' => 'getCity', - 'state' => 'getState', - 'zip' => 'getZip' + 'reference_number' => 'getReferenceNumber', + 'company_id' => 'getCompanyId', + 'reference_id' => 'getReferenceId' ]; /** @@ -224,6 +199,27 @@ public function getModelName() return self::$openAPIModelName; } + const TYPE_W4 = 'W4'; + const TYPE_W8_BEN = 'W8Ben'; + const TYPE_W8_BEN_E = 'W8BenE'; + const TYPE_W8_IMY = 'W8Imy'; + const TYPE_W9 = 'W9'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_W4, + self::TYPE_W8_BEN, + self::TYPE_W8_BEN_E, + self::TYPE_W8_IMY, + self::TYPE_W9, + ]; + } /** * Associative array for storing property values @@ -240,17 +236,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['ein'] = $data['ein'] ?? null; - $this->container['chap3_status_code'] = $data['chap3_status_code'] ?? null; - $this->container['chap4_status_code'] = $data['chap4_status_code'] ?? null; + $this->container['type'] = $data['type'] ?? null; + $this->container['email'] = $data['email'] ?? null; $this->container['name'] = $data['name'] ?? null; - $this->container['giin'] = $data['giin'] ?? null; - $this->container['country_code'] = $data['country_code'] ?? null; - $this->container['foreign_tin'] = $data['foreign_tin'] ?? null; - $this->container['address'] = $data['address'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['zip'] = $data['zip'] ?? null; + $this->container['reference_number'] = $data['reference_number'] ?? null; + $this->container['company_id'] = $data['company_id'] ?? null; + $this->container['reference_id'] = $data['reference_id'] ?? null; } /** @@ -262,6 +253,36 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ((mb_strlen($this->container['email']) < 1)) { + $invalidProperties[] = "invalid value for 'email', the character length must be bigger than or equal to 1."; + } + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -278,73 +299,64 @@ public function valid() /** - * Gets ein + * Gets type * * @return string|null */ - public function getEin() + public function getType() { - return $this->container['ein']; + return $this->container['type']; } /** - * Sets ein + * Sets type * - * @param string|null $ein ein + * @param string|null $type The form type (always \"w8ben\" for this model). * * @return self */ - public function setEin($ein) - { - $this->container['ein'] = $ein; + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; return $this; } /** - * Gets chap3_status_code + * Gets email * - * @return string|null + * @return string */ - public function getChap3StatusCode() + public function getEmail() { - return $this->container['chap3_status_code']; + return $this->container['email']; } /** - * Sets chap3_status_code + * Sets email * - * @param string|null $chap3_status_code chap3_status_code + * @param string $email The email address of the individual associated with the form. * * @return self */ - public function setChap3StatusCode($chap3_status_code) + public function setEmail($email) { - $this->container['chap3_status_code'] = $chap3_status_code; - return $this; - } - - /** - * Gets chap4_status_code - * - * @return string|null - */ - public function getChap4StatusCode() - { - return $this->container['chap4_status_code']; - } + if ((mb_strlen($email) < 1)) { + throw new \InvalidArgumentException('invalid length for $email when calling W8BenFormMinimalRequest., must be bigger than or equal to 1.'); + } - /** - * Sets chap4_status_code - * - * @param string|null $chap4_status_code chap4_status_code - * - * @return self - */ - public function setChap4StatusCode($chap4_status_code) - { - $this->container['chap4_status_code'] = $chap4_status_code; + $this->container['email'] = $email; return $this; } @@ -352,7 +364,7 @@ public function setChap4StatusCode($chap4_status_code) /** * Gets name * - * @return string|null + * @return string */ public function getName() { @@ -362,181 +374,95 @@ public function getName() /** * Sets name * - * @param string|null $name name + * @param string $name The name of the individual or entity associated with the form. * * @return self */ public function setName($name) { - $this->container['name'] = $name; - return $this; - } - - /** - * Gets giin - * - * @return string|null - */ - public function getGiin() - { - return $this->container['giin']; - } - - /** - * Sets giin - * - * @param string|null $giin giin - * - * @return self - */ - public function setGiin($giin) - { - $this->container['giin'] = $giin; - - return $this; - } - - /** - * Gets country_code - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['country_code']; - } - - /** - * Sets country_code - * - * @param string|null $country_code country_code - * - * @return self - */ - public function setCountryCode($country_code) - { - $this->container['country_code'] = $country_code; - - return $this; - } - - /** - * Gets foreign_tin - * - * @return string|null - */ - public function getForeignTin() - { - return $this->container['foreign_tin']; - } + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling W8BenFormMinimalRequest., must be bigger than or equal to 1.'); + } - /** - * Sets foreign_tin - * - * @param string|null $foreign_tin foreign_tin - * - * @return self - */ - public function setForeignTin($foreign_tin) - { - $this->container['foreign_tin'] = $foreign_tin; + $this->container['name'] = $name; return $this; } /** - * Gets address + * Gets reference_number * * @return string|null */ - public function getAddress() + public function getReferenceNumber() { - return $this->container['address']; + return $this->container['reference_number']; } /** - * Sets address + * Sets reference_number * - * @param string|null $address address + * @param string|null $reference_number A reference number for the form. * * @return self */ - public function setAddress($address) + public function setReferenceNumber($reference_number) { - $this->container['address'] = $address; + $this->container['reference_number'] = $reference_number; return $this; } /** - * Gets city + * Gets company_id * - * @return string|null + * @return string */ - public function getCity() + public function getCompanyId() { - return $this->container['city']; + return $this->container['company_id']; } /** - * Sets city + * Sets company_id * - * @param string|null $city city + * @param string $company_id The ID of the associated company. * * @return self */ - public function setCity($city) + public function setCompanyId($company_id) { - $this->container['city'] = $city; - - return $this; - } - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling W8BenFormMinimalRequest., must be bigger than or equal to 1.'); + } - /** - * Sets state - * - * @param string|null $state state - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; + $this->container['company_id'] = $company_id; return $this; } /** - * Gets zip + * Gets reference_id * * @return string|null */ - public function getZip() + public function getReferenceId() { - return $this->container['zip']; + return $this->container['reference_id']; } /** - * Sets zip + * Sets reference_id * - * @param string|null $zip zip + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setZip($zip) + public function setReferenceId($reference_id) { - $this->container['zip'] = $zip; + $this->container['reference_id'] = $reference_id; return $this; } diff --git a/lib/Model/A1099/V2/W8BenFormRequest.php b/lib/Model/A1099/V2/W8BenFormRequest.php index 56ff26c..e5d3a44 100644 --- a/lib/Model/A1099/V2/W8BenFormRequest.php +++ b/lib/Model/A1099/V2/W8BenFormRequest.php @@ -96,11 +96,11 @@ class W8BenFormRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'withholding_rate' => 'string', 'income_type' => 'string', 'signer_name' => 'string', + 'e_delivery_consented_at' => '\DateTime', + 'signature' => 'string', 'company_id' => 'string', 'reference_id' => 'string', - 'email' => 'string', - 'e_delivery_consented_at' => '\DateTime', - 'signature' => 'string' + 'email' => 'string' ]; /** @@ -136,11 +136,11 @@ class W8BenFormRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'withholding_rate' => null, 'income_type' => null, 'signer_name' => null, + 'e_delivery_consented_at' => 'date-time', + 'signature' => null, 'company_id' => null, 'reference_id' => null, - 'email' => null, - 'e_delivery_consented_at' => 'date-time', - 'signature' => null + 'email' => null ]; /** @@ -195,11 +195,11 @@ public static function openAPIFormats() 'withholding_rate' => 'withholdingRate', 'income_type' => 'incomeType', 'signer_name' => 'signerName', + 'e_delivery_consented_at' => 'eDeliveryConsentedAt', + 'signature' => 'signature', 'company_id' => 'companyId', 'reference_id' => 'referenceId', - 'email' => 'email', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'signature' => 'signature' + 'email' => 'email' ]; /** @@ -233,11 +233,11 @@ public static function openAPIFormats() 'withholding_rate' => 'setWithholdingRate', 'income_type' => 'setIncomeType', 'signer_name' => 'setSignerName', + 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', + 'signature' => 'setSignature', 'company_id' => 'setCompanyId', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'signature' => 'setSignature' + 'email' => 'setEmail' ]; /** @@ -271,11 +271,11 @@ public static function openAPIFormats() 'withholding_rate' => 'getWithholdingRate', 'income_type' => 'getIncomeType', 'signer_name' => 'getSignerName', + 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', + 'signature' => 'getSignature', 'company_id' => 'getCompanyId', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'signature' => 'getSignature' + 'email' => 'getEmail' ]; /** @@ -381,11 +381,11 @@ public function __construct(array $data = null) $this->container['withholding_rate'] = $data['withholding_rate'] ?? null; $this->container['income_type'] = $data['income_type'] ?? null; $this->container['signer_name'] = $data['signer_name'] ?? null; + $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; + $this->container['signature'] = $data['signature'] ?? null; $this->container['company_id'] = $data['company_id'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['email'] = $data['email'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; } /** @@ -406,6 +406,13 @@ public function listInvalidProperties() ); } + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -1032,121 +1039,126 @@ public function setSignerName($signer_name) } /** - * Gets company_id + * Gets e_delivery_consented_at * - * @return string|null + * @return \DateTime|null */ - public function getCompanyId() + public function getEDeliveryConsentedAt() { - return $this->container['company_id']; + return $this->container['e_delivery_consented_at']; } /** - * Sets company_id + * Sets e_delivery_consented_at * - * @param string|null $company_id The ID of the associated company. + * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. * * @return self */ - public function setCompanyId($company_id) + public function setEDeliveryConsentedAt($e_delivery_consented_at) { - $this->container['company_id'] = $company_id; + $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; return $this; } /** - * Gets reference_id + * Gets signature * * @return string|null */ - public function getReferenceId() + public function getSignature() { - return $this->container['reference_id']; + return $this->container['signature']; } /** - * Sets reference_id + * Sets signature * - * @param string|null $reference_id A reference identifier for the form. + * @param string|null $signature The signature of the form. * * @return self */ - public function setReferenceId($reference_id) + public function setSignature($signature) { - $this->container['reference_id'] = $reference_id; + $this->container['signature'] = $signature; return $this; } /** - * Gets email + * Gets company_id * - * @return string|null + * @return string */ - public function getEmail() + public function getCompanyId() { - return $this->container['email']; + return $this->container['company_id']; } /** - * Sets email + * Sets company_id * - * @param string|null $email The email address of the individual associated with the form. + * @param string $company_id The ID of the associated company. * * @return self */ - public function setEmail($email) + public function setCompanyId($company_id) { - $this->container['email'] = $email; + + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling W8BenFormRequest., must be bigger than or equal to 1.'); + } + + $this->container['company_id'] = $company_id; return $this; } /** - * Gets e_delivery_consented_at + * Gets reference_id * - * @return \DateTime|null + * @return string|null */ - public function getEDeliveryConsentedAt() + public function getReferenceId() { - return $this->container['e_delivery_consented_at']; + return $this->container['reference_id']; } /** - * Sets e_delivery_consented_at + * Sets reference_id * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) + public function setReferenceId($reference_id) { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets signature + * Gets email * * @return string|null */ - public function getSignature() + public function getEmail() { - return $this->container['signature']; + return $this->container['email']; } /** - * Sets signature + * Sets email * - * @param string|null $signature The signature of the form. + * @param string|null $email The email address of the individual associated with the form. * * @return self */ - public function setSignature($signature) + public function setEmail($email) { - $this->container['signature'] = $signature; + $this->container['email'] = $email; return $this; } diff --git a/lib/Model/A1099/V2/W8BenFormResponse.php b/lib/Model/A1099/V2/W8BenFormResponse.php index cae519f..aedd0f3 100644 --- a/lib/Model/A1099/V2/W8BenFormResponse.php +++ b/lib/Model/A1099/V2/W8BenFormResponse.php @@ -39,8 +39,6 @@ */ namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; use \Avalara\SDK\ObjectSerializer; use \Avalara\SDK\Model\ModelInterface; /** @@ -54,7 +52,7 @@ * @template TKey int|null * @template TValue mixed|null */ -class W8BenFormResponse implements ModelInterface, ArrayAccess, \JsonSerializable +class W8BenFormResponse extends W9FormBaseResponse { public const DISCRIMINATOR = null; @@ -96,21 +94,7 @@ class W8BenFormResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'withholding_rate' => 'string', 'income_type' => 'string', 'signer_name' => 'string', - 'signer_capacity' => 'string', - 'id' => 'string', - 'type' => 'string', - 'entry_status' => 'string', - 'entry_status_date' => '\DateTime', - 'reference_id' => 'string', - 'company_id' => 'string', - 'display_name' => 'string', - 'email' => 'string', - 'archived' => 'bool', - 'signature' => 'string', - 'signed_date' => '\DateTime', - 'e_delivery_consented_at' => '\DateTime', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' + 'signer_capacity' => 'string' ]; /** @@ -146,21 +130,7 @@ class W8BenFormResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'withholding_rate' => null, 'income_type' => null, 'signer_name' => null, - 'signer_capacity' => null, - 'id' => null, - 'type' => null, - 'entry_status' => null, - 'entry_status_date' => 'date-time', - 'reference_id' => null, - 'company_id' => null, - 'display_name' => null, - 'email' => null, - 'archived' => null, - 'signature' => null, - 'signed_date' => 'date-time', - 'e_delivery_consented_at' => 'date-time', - 'created_at' => 'date-time', - 'updated_at' => 'date-time' + 'signer_capacity' => null ]; /** @@ -170,7 +140,7 @@ class W8BenFormResponse implements ModelInterface, ArrayAccess, \JsonSerializabl */ public static function openAPITypes() { - return self::$openAPITypes; + return self::$openAPITypes + parent::openAPITypes(); } /** @@ -180,7 +150,7 @@ public static function openAPITypes() */ public static function openAPIFormats() { - return self::$openAPIFormats; + return self::$openAPIFormats + parent::openAPIFormats(); } /** @@ -215,21 +185,7 @@ public static function openAPIFormats() 'withholding_rate' => 'withholdingRate', 'income_type' => 'incomeType', 'signer_name' => 'signerName', - 'signer_capacity' => 'signerCapacity', - 'id' => 'id', - 'type' => 'type', - 'entry_status' => 'entryStatus', - 'entry_status_date' => 'entryStatusDate', - 'reference_id' => 'referenceId', - 'company_id' => 'companyId', - 'display_name' => 'displayName', - 'email' => 'email', - 'archived' => 'archived', - 'signature' => 'signature', - 'signed_date' => 'signedDate', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt' + 'signer_capacity' => 'signerCapacity' ]; /** @@ -263,21 +219,7 @@ public static function openAPIFormats() 'withholding_rate' => 'setWithholdingRate', 'income_type' => 'setIncomeType', 'signer_name' => 'setSignerName', - 'signer_capacity' => 'setSignerCapacity', - 'id' => 'setId', - 'type' => 'setType', - 'entry_status' => 'setEntryStatus', - 'entry_status_date' => 'setEntryStatusDate', - 'reference_id' => 'setReferenceId', - 'company_id' => 'setCompanyId', - 'display_name' => 'setDisplayName', - 'email' => 'setEmail', - 'archived' => 'setArchived', - 'signature' => 'setSignature', - 'signed_date' => 'setSignedDate', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' + 'signer_capacity' => 'setSignerCapacity' ]; /** @@ -311,21 +253,7 @@ public static function openAPIFormats() 'withholding_rate' => 'getWithholdingRate', 'income_type' => 'getIncomeType', 'signer_name' => 'getSignerName', - 'signer_capacity' => 'getSignerCapacity', - 'id' => 'getId', - 'type' => 'getType', - 'entry_status' => 'getEntryStatus', - 'entry_status_date' => 'getEntryStatusDate', - 'reference_id' => 'getReferenceId', - 'company_id' => 'getCompanyId', - 'display_name' => 'getDisplayName', - 'email' => 'getEmail', - 'archived' => 'getArchived', - 'signature' => 'getSignature', - 'signed_date' => 'getSignedDate', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' + 'signer_capacity' => 'getSignerCapacity' ]; /** @@ -336,7 +264,7 @@ public static function openAPIFormats() */ public static function attributeMap() { - return self::$attributeMap; + return parent::attributeMap() + self::$attributeMap; } /** @@ -346,7 +274,7 @@ public static function attributeMap() */ public static function setters() { - return self::$setters; + return parent::setters() + self::$setters; } /** @@ -356,7 +284,7 @@ public static function setters() */ public static function getters() { - return self::$getters; + return parent::getters() + self::$getters; } /** @@ -370,12 +298,6 @@ public function getModelName() } - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; /** * Constructor @@ -385,6 +307,8 @@ public function getModelName() */ public function __construct(array $data = null) { + parent::__construct($data); + $this->container['name'] = $data['name'] ?? null; $this->container['citizenship_country'] = $data['citizenship_country'] ?? null; $this->container['residence_address'] = $data['residence_address'] ?? null; @@ -411,20 +335,6 @@ public function __construct(array $data = null) $this->container['income_type'] = $data['income_type'] ?? null; $this->container['signer_name'] = $data['signer_name'] ?? null; $this->container['signer_capacity'] = $data['signer_capacity'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['entry_status'] = $data['entry_status'] ?? null; - $this->container['entry_status_date'] = $data['entry_status_date'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['company_id'] = $data['company_id'] ?? null; - $this->container['display_name'] = $data['display_name'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['archived'] = $data['archived'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; - $this->container['signed_date'] = $data['signed_date'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -434,7 +344,7 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; + $invalidProperties = parent::listInvalidProperties(); return $invalidProperties; } @@ -1074,342 +984,6 @@ public function setSignerCapacity($signer_capacity) return $this; } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id The unique identifier for the form. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type The form type. - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets entry_status - * - * @return string|null - */ - public function getEntryStatus() - { - return $this->container['entry_status']; - } - - /** - * Sets entry_status - * - * @param string|null $entry_status The form status. - * - * @return self - */ - public function setEntryStatus($entry_status) - { - $this->container['entry_status'] = $entry_status; - - return $this; - } - - /** - * Gets entry_status_date - * - * @return \DateTime|null - */ - public function getEntryStatusDate() - { - return $this->container['entry_status_date']; - } - - /** - * Sets entry_status_date - * - * @param \DateTime|null $entry_status_date The timestamp for the latest status update. - * - * @return self - */ - public function setEntryStatusDate($entry_status_date) - { - $this->container['entry_status_date'] = $entry_status_date; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id A reference identifier for the form. - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets company_id - * - * @return string|null - */ - public function getCompanyId() - { - return $this->container['company_id']; - } - - /** - * Sets company_id - * - * @param string|null $company_id The ID of the associated company. - * - * @return self - */ - public function setCompanyId($company_id) - { - $this->container['company_id'] = $company_id; - - return $this; - } - - /** - * Gets display_name - * - * @return string|null - */ - public function getDisplayName() - { - return $this->container['display_name']; - } - - /** - * Sets display_name - * - * @param string|null $display_name The display name associated with the form. - * - * @return self - */ - public function setDisplayName($display_name) - { - $this->container['display_name'] = $display_name; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email The email address of the individual associated with the form. - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets archived - * - * @return bool|null - */ - public function getArchived() - { - return $this->container['archived']; - } - - /** - * Sets archived - * - * @param bool|null $archived Indicates whether the form is archived. - * - * @return self - */ - public function setArchived($archived) - { - $this->container['archived'] = $archived; - - return $this; - } - - /** - * Gets signature - * - * @return string|null - */ - public function getSignature() - { - return $this->container['signature']; - } - - /** - * Sets signature - * - * @param string|null $signature The signature of the form. - * - * @return self - */ - public function setSignature($signature) - { - $this->container['signature'] = $signature; - - return $this; - } - - /** - * Gets signed_date - * - * @return \DateTime|null - */ - public function getSignedDate() - { - return $this->container['signed_date']; - } - - /** - * Sets signed_date - * - * @param \DateTime|null $signed_date The date the form was signed. - * - * @return self - */ - public function setSignedDate($signed_date) - { - $this->container['signed_date'] = $signed_date; - - return $this; - } - - /** - * Gets e_delivery_consented_at - * - * @return \DateTime|null - */ - public function getEDeliveryConsentedAt() - { - return $this->container['e_delivery_consented_at']; - } - - /** - * Sets e_delivery_consented_at - * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. - * - * @return self - */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) - { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at The creation date of the form. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at The last updated date of the form. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/W8ImyFormMinimalRequest.php b/lib/Model/A1099/V2/W8ImyFormMinimalRequest.php new file mode 100644 index 0000000..25b9e25 --- /dev/null +++ b/lib/Model/A1099/V2/W8ImyFormMinimalRequest.php @@ -0,0 +1,558 @@ + + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace Avalara\SDK\Model\A1099\V2; + +use \ArrayAccess; +use \Avalara\SDK\ObjectSerializer; +use \Avalara\SDK\Model\ModelInterface; +/** + * W8ImyFormMinimalRequest Class Doc Comment + * + * @category Class + * @package Avalara\SDK + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + * @implements \ArrayAccess + * @template TKey int|null + * @template TValue mixed|null + */ +class W8ImyFormMinimalRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'W8ImyFormMinimalRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'email' => 'string', + 'name' => 'string', + 'reference_number' => 'string', + 'company_id' => 'string', + 'reference_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'email' => null, + 'name' => null, + 'reference_number' => null, + 'company_id' => null, + 'reference_id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'email' => 'email', + 'name' => 'name', + 'reference_number' => 'referenceNumber', + 'company_id' => 'companyId', + 'reference_id' => 'referenceId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'email' => 'setEmail', + 'name' => 'setName', + 'reference_number' => 'setReferenceNumber', + 'company_id' => 'setCompanyId', + 'reference_id' => 'setReferenceId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'email' => 'getEmail', + 'name' => 'getName', + 'reference_number' => 'getReferenceNumber', + 'company_id' => 'getCompanyId', + 'reference_id' => 'getReferenceId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const TYPE_W4 = 'W4'; + const TYPE_W8_BEN = 'W8Ben'; + const TYPE_W8_BEN_E = 'W8BenE'; + const TYPE_W8_IMY = 'W8Imy'; + const TYPE_W9 = 'W9'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_W4, + self::TYPE_W8_BEN, + self::TYPE_W8_BEN_E, + self::TYPE_W8_IMY, + self::TYPE_W9, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = $data['type'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['name'] = $data['name'] ?? null; + $this->container['reference_number'] = $data['reference_number'] ?? null; + $this->container['company_id'] = $data['company_id'] ?? null; + $this->container['reference_id'] = $data['reference_id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ((mb_strlen($this->container['email']) < 1)) { + $invalidProperties[] = "invalid value for 'email', the character length must be bigger than or equal to 1."; + } + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The form type (always \"w8imy\" for this model). + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email The email address of the individual associated with the form. + * + * @return self + */ + public function setEmail($email) + { + + if ((mb_strlen($email) < 1)) { + throw new \InvalidArgumentException('invalid length for $email when calling W8ImyFormMinimalRequest., must be bigger than or equal to 1.'); + } + + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the individual or entity associated with the form. + * + * @return self + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling W8ImyFormMinimalRequest., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets reference_number + * + * @return string|null + */ + public function getReferenceNumber() + { + return $this->container['reference_number']; + } + + /** + * Sets reference_number + * + * @param string|null $reference_number A reference number for the form. + * + * @return self + */ + public function setReferenceNumber($reference_number) + { + $this->container['reference_number'] = $reference_number; + + return $this; + } + + /** + * Gets company_id + * + * @return string + */ + public function getCompanyId() + { + return $this->container['company_id']; + } + + /** + * Sets company_id + * + * @param string $company_id The ID of the associated company. + * + * @return self + */ + public function setCompanyId($company_id) + { + + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling W8ImyFormMinimalRequest., must be bigger than or equal to 1.'); + } + + $this->container['company_id'] = $company_id; + + return $this; + } + + /** + * Gets reference_id + * + * @return string|null + */ + public function getReferenceId() + { + return $this->container['reference_id']; + } + + /** + * Sets reference_id + * + * @param string|null $reference_id A reference identifier for the form. + * + * @return self + */ + public function setReferenceId($reference_id) + { + $this->container['reference_id'] = $reference_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset):bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset):mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value):void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset):void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize():mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString():string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue():string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/A1099/V2/W8ImyFormRequest.php b/lib/Model/A1099/V2/W8ImyFormRequest.php index 3b70f2c..1029b12 100644 --- a/lib/Model/A1099/V2/W8ImyFormRequest.php +++ b/lib/Model/A1099/V2/W8ImyFormRequest.php @@ -183,11 +183,11 @@ class W8ImyFormRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'sponsored_direct_reporting_nffe_certification' => 'bool', 'direct_reporting_nffe_sponsoring_entity' => 'string', 'signer_name' => 'string', + 'e_delivery_consented_at' => '\DateTime', + 'signature' => 'string', 'company_id' => 'string', 'reference_id' => 'string', - 'email' => 'string', - 'e_delivery_consented_at' => '\DateTime', - 'signature' => 'string' + 'email' => 'string' ]; /** @@ -310,11 +310,11 @@ class W8ImyFormRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'sponsored_direct_reporting_nffe_certification' => null, 'direct_reporting_nffe_sponsoring_entity' => null, 'signer_name' => null, + 'e_delivery_consented_at' => 'date-time', + 'signature' => null, 'company_id' => null, 'reference_id' => null, - 'email' => null, - 'e_delivery_consented_at' => 'date-time', - 'signature' => null + 'email' => null ]; /** @@ -456,11 +456,11 @@ public static function openAPIFormats() 'sponsored_direct_reporting_nffe_certification' => 'sponsoredDirectReportingNffeCertification', 'direct_reporting_nffe_sponsoring_entity' => 'directReportingNffeSponsoringEntity', 'signer_name' => 'signerName', + 'e_delivery_consented_at' => 'eDeliveryConsentedAt', + 'signature' => 'signature', 'company_id' => 'companyId', 'reference_id' => 'referenceId', - 'email' => 'email', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'signature' => 'signature' + 'email' => 'email' ]; /** @@ -581,11 +581,11 @@ public static function openAPIFormats() 'sponsored_direct_reporting_nffe_certification' => 'setSponsoredDirectReportingNffeCertification', 'direct_reporting_nffe_sponsoring_entity' => 'setDirectReportingNffeSponsoringEntity', 'signer_name' => 'setSignerName', + 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', + 'signature' => 'setSignature', 'company_id' => 'setCompanyId', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'signature' => 'setSignature' + 'email' => 'setEmail' ]; /** @@ -706,11 +706,11 @@ public static function openAPIFormats() 'sponsored_direct_reporting_nffe_certification' => 'getSponsoredDirectReportingNffeCertification', 'direct_reporting_nffe_sponsoring_entity' => 'getDirectReportingNffeSponsoringEntity', 'signer_name' => 'getSignerName', + 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', + 'signature' => 'getSignature', 'company_id' => 'getCompanyId', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'signature' => 'getSignature' + 'email' => 'getEmail' ]; /** @@ -903,11 +903,11 @@ public function __construct(array $data = null) $this->container['sponsored_direct_reporting_nffe_certification'] = $data['sponsored_direct_reporting_nffe_certification'] ?? null; $this->container['direct_reporting_nffe_sponsoring_entity'] = $data['direct_reporting_nffe_sponsoring_entity'] ?? null; $this->container['signer_name'] = $data['signer_name'] ?? null; + $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; + $this->container['signature'] = $data['signature'] ?? null; $this->container['company_id'] = $data['company_id'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['email'] = $data['email'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; } /** @@ -928,6 +928,13 @@ public function listInvalidProperties() ); } + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -3642,121 +3649,126 @@ public function setSignerName($signer_name) } /** - * Gets company_id + * Gets e_delivery_consented_at * - * @return string|null + * @return \DateTime|null */ - public function getCompanyId() + public function getEDeliveryConsentedAt() { - return $this->container['company_id']; + return $this->container['e_delivery_consented_at']; } /** - * Sets company_id + * Sets e_delivery_consented_at * - * @param string|null $company_id The ID of the associated company. + * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. * * @return self */ - public function setCompanyId($company_id) + public function setEDeliveryConsentedAt($e_delivery_consented_at) { - $this->container['company_id'] = $company_id; + $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; return $this; } /** - * Gets reference_id + * Gets signature * * @return string|null */ - public function getReferenceId() + public function getSignature() { - return $this->container['reference_id']; + return $this->container['signature']; } /** - * Sets reference_id + * Sets signature * - * @param string|null $reference_id A reference identifier for the form. + * @param string|null $signature The signature of the form. * * @return self */ - public function setReferenceId($reference_id) + public function setSignature($signature) { - $this->container['reference_id'] = $reference_id; + $this->container['signature'] = $signature; return $this; } /** - * Gets email + * Gets company_id * - * @return string|null + * @return string */ - public function getEmail() + public function getCompanyId() { - return $this->container['email']; + return $this->container['company_id']; } /** - * Sets email + * Sets company_id * - * @param string|null $email The email address of the individual associated with the form. + * @param string $company_id The ID of the associated company. * * @return self */ - public function setEmail($email) + public function setCompanyId($company_id) { - $this->container['email'] = $email; + + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling W8ImyFormRequest., must be bigger than or equal to 1.'); + } + + $this->container['company_id'] = $company_id; return $this; } /** - * Gets e_delivery_consented_at + * Gets reference_id * - * @return \DateTime|null + * @return string|null */ - public function getEDeliveryConsentedAt() + public function getReferenceId() { - return $this->container['e_delivery_consented_at']; + return $this->container['reference_id']; } /** - * Sets e_delivery_consented_at + * Sets reference_id * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) + public function setReferenceId($reference_id) { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets signature + * Gets email * * @return string|null */ - public function getSignature() + public function getEmail() { - return $this->container['signature']; + return $this->container['email']; } /** - * Sets signature + * Sets email * - * @param string|null $signature The signature of the form. + * @param string|null $email The email address of the individual associated with the form. * * @return self */ - public function setSignature($signature) + public function setEmail($email) { - $this->container['signature'] = $signature; + $this->container['email'] = $email; return $this; } diff --git a/lib/Model/A1099/V2/W8ImyFormResponse.php b/lib/Model/A1099/V2/W8ImyFormResponse.php index 6a97ea4..a25d66e 100644 --- a/lib/Model/A1099/V2/W8ImyFormResponse.php +++ b/lib/Model/A1099/V2/W8ImyFormResponse.php @@ -39,8 +39,6 @@ */ namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; use \Avalara\SDK\ObjectSerializer; use \Avalara\SDK\Model\ModelInterface; /** @@ -54,7 +52,7 @@ * @template TKey int|null * @template TValue mixed|null */ -class W8ImyFormResponse implements ModelInterface, ArrayAccess, \JsonSerializable +class W8ImyFormResponse extends W9FormBaseResponse { public const DISCRIMINATOR = null; @@ -181,21 +179,7 @@ class W8ImyFormResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'passive_nffe_certification' => 'bool', 'sponsored_direct_reporting_nffe_certification' => 'bool', 'direct_reporting_nffe_sponsoring_entity' => 'string', - 'signer_name' => 'string', - 'id' => 'string', - 'type' => 'string', - 'entry_status' => 'string', - 'entry_status_date' => '\DateTime', - 'reference_id' => 'string', - 'company_id' => 'string', - 'display_name' => 'string', - 'email' => 'string', - 'archived' => 'bool', - 'signature' => 'string', - 'signed_date' => '\DateTime', - 'e_delivery_consented_at' => '\DateTime', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' + 'signer_name' => 'string' ]; /** @@ -316,21 +300,7 @@ class W8ImyFormResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'passive_nffe_certification' => null, 'sponsored_direct_reporting_nffe_certification' => null, 'direct_reporting_nffe_sponsoring_entity' => null, - 'signer_name' => null, - 'id' => null, - 'type' => null, - 'entry_status' => null, - 'entry_status_date' => 'date-time', - 'reference_id' => null, - 'company_id' => null, - 'display_name' => null, - 'email' => null, - 'archived' => null, - 'signature' => null, - 'signed_date' => 'date-time', - 'e_delivery_consented_at' => 'date-time', - 'created_at' => 'date-time', - 'updated_at' => 'date-time' + 'signer_name' => null ]; /** @@ -340,7 +310,7 @@ class W8ImyFormResponse implements ModelInterface, ArrayAccess, \JsonSerializabl */ public static function openAPITypes() { - return self::$openAPITypes; + return self::$openAPITypes + parent::openAPITypes(); } /** @@ -350,7 +320,7 @@ public static function openAPITypes() */ public static function openAPIFormats() { - return self::$openAPIFormats; + return self::$openAPIFormats + parent::openAPIFormats(); } /** @@ -470,21 +440,7 @@ public static function openAPIFormats() 'passive_nffe_certification' => 'passiveNffeCertification', 'sponsored_direct_reporting_nffe_certification' => 'sponsoredDirectReportingNffeCertification', 'direct_reporting_nffe_sponsoring_entity' => 'directReportingNffeSponsoringEntity', - 'signer_name' => 'signerName', - 'id' => 'id', - 'type' => 'type', - 'entry_status' => 'entryStatus', - 'entry_status_date' => 'entryStatusDate', - 'reference_id' => 'referenceId', - 'company_id' => 'companyId', - 'display_name' => 'displayName', - 'email' => 'email', - 'archived' => 'archived', - 'signature' => 'signature', - 'signed_date' => 'signedDate', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt' + 'signer_name' => 'signerName' ]; /** @@ -603,21 +559,7 @@ public static function openAPIFormats() 'passive_nffe_certification' => 'setPassiveNffeCertification', 'sponsored_direct_reporting_nffe_certification' => 'setSponsoredDirectReportingNffeCertification', 'direct_reporting_nffe_sponsoring_entity' => 'setDirectReportingNffeSponsoringEntity', - 'signer_name' => 'setSignerName', - 'id' => 'setId', - 'type' => 'setType', - 'entry_status' => 'setEntryStatus', - 'entry_status_date' => 'setEntryStatusDate', - 'reference_id' => 'setReferenceId', - 'company_id' => 'setCompanyId', - 'display_name' => 'setDisplayName', - 'email' => 'setEmail', - 'archived' => 'setArchived', - 'signature' => 'setSignature', - 'signed_date' => 'setSignedDate', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' + 'signer_name' => 'setSignerName' ]; /** @@ -736,21 +678,7 @@ public static function openAPIFormats() 'passive_nffe_certification' => 'getPassiveNffeCertification', 'sponsored_direct_reporting_nffe_certification' => 'getSponsoredDirectReportingNffeCertification', 'direct_reporting_nffe_sponsoring_entity' => 'getDirectReportingNffeSponsoringEntity', - 'signer_name' => 'getSignerName', - 'id' => 'getId', - 'type' => 'getType', - 'entry_status' => 'getEntryStatus', - 'entry_status_date' => 'getEntryStatusDate', - 'reference_id' => 'getReferenceId', - 'company_id' => 'getCompanyId', - 'display_name' => 'getDisplayName', - 'email' => 'getEmail', - 'archived' => 'getArchived', - 'signature' => 'getSignature', - 'signed_date' => 'getSignedDate', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' + 'signer_name' => 'getSignerName' ]; /** @@ -761,7 +689,7 @@ public static function openAPIFormats() */ public static function attributeMap() { - return self::$attributeMap; + return parent::attributeMap() + self::$attributeMap; } /** @@ -771,7 +699,7 @@ public static function attributeMap() */ public static function setters() { - return self::$setters; + return parent::setters() + self::$setters; } /** @@ -781,7 +709,7 @@ public static function setters() */ public static function getters() { - return self::$getters; + return parent::getters() + self::$getters; } /** @@ -795,12 +723,6 @@ public function getModelName() } - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; /** * Constructor @@ -810,6 +732,8 @@ public function getModelName() */ public function __construct(array $data = null) { + parent::__construct($data); + $this->container['name'] = $data['name'] ?? null; $this->container['citizenship_country'] = $data['citizenship_country'] ?? null; $this->container['disregarded_entity'] = $data['disregarded_entity'] ?? null; @@ -921,20 +845,6 @@ public function __construct(array $data = null) $this->container['sponsored_direct_reporting_nffe_certification'] = $data['sponsored_direct_reporting_nffe_certification'] ?? null; $this->container['direct_reporting_nffe_sponsoring_entity'] = $data['direct_reporting_nffe_sponsoring_entity'] ?? null; $this->container['signer_name'] = $data['signer_name'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['entry_status'] = $data['entry_status'] ?? null; - $this->container['entry_status_date'] = $data['entry_status_date'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['company_id'] = $data['company_id'] ?? null; - $this->container['display_name'] = $data['display_name'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['archived'] = $data['archived'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; - $this->container['signed_date'] = $data['signed_date'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -944,7 +854,7 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; + $invalidProperties = parent::listInvalidProperties(); return $invalidProperties; } @@ -3624,342 +3534,6 @@ public function setSignerName($signer_name) return $this; } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id The unique identifier for the form. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type The form type. - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets entry_status - * - * @return string|null - */ - public function getEntryStatus() - { - return $this->container['entry_status']; - } - - /** - * Sets entry_status - * - * @param string|null $entry_status The form status. - * - * @return self - */ - public function setEntryStatus($entry_status) - { - $this->container['entry_status'] = $entry_status; - - return $this; - } - - /** - * Gets entry_status_date - * - * @return \DateTime|null - */ - public function getEntryStatusDate() - { - return $this->container['entry_status_date']; - } - - /** - * Sets entry_status_date - * - * @param \DateTime|null $entry_status_date The timestamp for the latest status update. - * - * @return self - */ - public function setEntryStatusDate($entry_status_date) - { - $this->container['entry_status_date'] = $entry_status_date; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id A reference identifier for the form. - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets company_id - * - * @return string|null - */ - public function getCompanyId() - { - return $this->container['company_id']; - } - - /** - * Sets company_id - * - * @param string|null $company_id The ID of the associated company. - * - * @return self - */ - public function setCompanyId($company_id) - { - $this->container['company_id'] = $company_id; - - return $this; - } - - /** - * Gets display_name - * - * @return string|null - */ - public function getDisplayName() - { - return $this->container['display_name']; - } - - /** - * Sets display_name - * - * @param string|null $display_name The display name associated with the form. - * - * @return self - */ - public function setDisplayName($display_name) - { - $this->container['display_name'] = $display_name; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email The email address of the individual associated with the form. - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets archived - * - * @return bool|null - */ - public function getArchived() - { - return $this->container['archived']; - } - - /** - * Sets archived - * - * @param bool|null $archived Indicates whether the form is archived. - * - * @return self - */ - public function setArchived($archived) - { - $this->container['archived'] = $archived; - - return $this; - } - - /** - * Gets signature - * - * @return string|null - */ - public function getSignature() - { - return $this->container['signature']; - } - - /** - * Sets signature - * - * @param string|null $signature The signature of the form. - * - * @return self - */ - public function setSignature($signature) - { - $this->container['signature'] = $signature; - - return $this; - } - - /** - * Gets signed_date - * - * @return \DateTime|null - */ - public function getSignedDate() - { - return $this->container['signed_date']; - } - - /** - * Sets signed_date - * - * @param \DateTime|null $signed_date The date the form was signed. - * - * @return self - */ - public function setSignedDate($signed_date) - { - $this->container['signed_date'] = $signed_date; - - return $this; - } - - /** - * Gets e_delivery_consented_at - * - * @return \DateTime|null - */ - public function getEDeliveryConsentedAt() - { - return $this->container['e_delivery_consented_at']; - } - - /** - * Sets e_delivery_consented_at - * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. - * - * @return self - */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) - { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at The creation date of the form. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at The last updated date of the form. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/ErrorResponseErrorsInner.php b/lib/Model/A1099/V2/W9FormBaseMinimalRequest.php similarity index 69% rename from lib/Model/A1099/V2/ErrorResponseErrorsInner.php rename to lib/Model/A1099/V2/W9FormBaseMinimalRequest.php index e0de62b..5f527de 100644 --- a/lib/Model/A1099/V2/ErrorResponseErrorsInner.php +++ b/lib/Model/A1099/V2/W9FormBaseMinimalRequest.php @@ -1,6 +1,6 @@ 'string', - 'title' => 'string', - 'status' => 'int', - 'detail' => 'string', - 'instance' => 'string', - 'errors' => 'array' + 'company_id' => 'string', + 'reference_id' => 'string', + 'email' => 'string' ]; /** @@ -88,11 +86,9 @@ class ErrorResponseErrorsInner implements ModelInterface, ArrayAccess, \JsonSeri */ protected static $openAPIFormats = [ 'type' => null, - 'title' => null, - 'status' => 'int32', - 'detail' => null, - 'instance' => null, - 'errors' => null + 'company_id' => null, + 'reference_id' => null, + 'email' => null ]; /** @@ -123,11 +119,9 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'type' => 'type', - 'title' => 'title', - 'status' => 'status', - 'detail' => 'detail', - 'instance' => 'instance', - 'errors' => 'errors' + 'company_id' => 'companyId', + 'reference_id' => 'referenceId', + 'email' => 'email' ]; /** @@ -137,11 +131,9 @@ public static function openAPIFormats() */ protected static $setters = [ 'type' => 'setType', - 'title' => 'setTitle', - 'status' => 'setStatus', - 'detail' => 'setDetail', - 'instance' => 'setInstance', - 'errors' => 'setErrors' + 'company_id' => 'setCompanyId', + 'reference_id' => 'setReferenceId', + 'email' => 'setEmail' ]; /** @@ -151,11 +143,9 @@ public static function openAPIFormats() */ protected static $getters = [ 'type' => 'getType', - 'title' => 'getTitle', - 'status' => 'getStatus', - 'detail' => 'getDetail', - 'instance' => 'getInstance', - 'errors' => 'getErrors' + 'company_id' => 'getCompanyId', + 'reference_id' => 'getReferenceId', + 'email' => 'getEmail' ]; /** @@ -199,6 +189,27 @@ public function getModelName() return self::$openAPIModelName; } + const TYPE_W4 = 'W4'; + const TYPE_W8_BEN = 'W8Ben'; + const TYPE_W8_BEN_E = 'W8BenE'; + const TYPE_W8_IMY = 'W8Imy'; + const TYPE_W9 = 'W9'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_W4, + self::TYPE_W8_BEN, + self::TYPE_W8_BEN_E, + self::TYPE_W8_IMY, + self::TYPE_W9, + ]; + } /** * Associative array for storing property values @@ -216,11 +227,9 @@ public function getModelName() public function __construct(array $data = null) { $this->container['type'] = $data['type'] ?? null; - $this->container['title'] = $data['title'] ?? null; - $this->container['status'] = $data['status'] ?? null; - $this->container['detail'] = $data['detail'] ?? null; - $this->container['instance'] = $data['instance'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; + $this->container['company_id'] = $data['company_id'] ?? null; + $this->container['reference_id'] = $data['reference_id'] ?? null; + $this->container['email'] = $data['email'] ?? null; } /** @@ -232,6 +241,22 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -260,133 +285,100 @@ public function getType() /** * Sets type * - * @param string|null $type type + * @param string|null $type The form type. * * @return self */ public function setType($type) { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } $this->container['type'] = $type; return $this; } /** - * Gets title + * Gets company_id * - * @return string|null + * @return string */ - public function getTitle() + public function getCompanyId() { - return $this->container['title']; + return $this->container['company_id']; } /** - * Sets title + * Sets company_id * - * @param string|null $title title + * @param string $company_id The ID of the associated company. * * @return self */ - public function setTitle($title) + public function setCompanyId($company_id) { - $this->container['title'] = $title; - return $this; - } + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling W9FormBaseMinimalRequest., must be bigger than or equal to 1.'); + } - /** - * Gets status - * - * @return int|null - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param int|null $status status - * - * @return self - */ - public function setStatus($status) - { - $this->container['status'] = $status; + $this->container['company_id'] = $company_id; return $this; } /** - * Gets detail + * Gets reference_id * * @return string|null */ - public function getDetail() + public function getReferenceId() { - return $this->container['detail']; + return $this->container['reference_id']; } /** - * Sets detail + * Sets reference_id * - * @param string|null $detail detail + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setDetail($detail) + public function setReferenceId($reference_id) { - $this->container['detail'] = $detail; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets instance + * Gets email * * @return string|null */ - public function getInstance() - { - return $this->container['instance']; - } - - /** - * Sets instance - * - * @param string|null $instance instance - * - * @return self - */ - public function setInstance($instance) - { - $this->container['instance'] = $instance; - - return $this; - } - - /** - * Gets errors - * - * @return array|null - */ - public function getErrors() + public function getEmail() { - return $this->container['errors']; + return $this->container['email']; } /** - * Sets errors + * Sets email * - * @param array|null $errors errors + * @param string|null $email The email address of the individual associated with the form. * * @return self */ - public function setErrors($errors) + public function setEmail($email) { - $this->container['errors'] = $errors; + $this->container['email'] = $email; return $this; } diff --git a/lib/Model/A1099/V2/W9FormBaseRequest.php b/lib/Model/A1099/V2/W9FormBaseRequest.php index 08844fb..7edb8cf 100644 --- a/lib/Model/A1099/V2/W9FormBaseRequest.php +++ b/lib/Model/A1099/V2/W9FormBaseRequest.php @@ -71,12 +71,12 @@ class W9FormBaseRequest implements ModelInterface, ArrayAccess, \JsonSerializabl * @var string[] */ protected static $openAPITypes = [ + 'e_delivery_consented_at' => '\DateTime', + 'signature' => 'string', 'type' => 'string', 'company_id' => 'string', 'reference_id' => 'string', - 'email' => 'string', - 'e_delivery_consented_at' => '\DateTime', - 'signature' => 'string' + 'email' => 'string' ]; /** @@ -87,12 +87,12 @@ class W9FormBaseRequest implements ModelInterface, ArrayAccess, \JsonSerializabl * @psalm-var array */ protected static $openAPIFormats = [ + 'e_delivery_consented_at' => 'date-time', + 'signature' => null, 'type' => null, 'company_id' => null, 'reference_id' => null, - 'email' => null, - 'e_delivery_consented_at' => 'date-time', - 'signature' => null + 'email' => null ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'e_delivery_consented_at' => 'eDeliveryConsentedAt', + 'signature' => 'signature', 'type' => 'type', 'company_id' => 'companyId', 'reference_id' => 'referenceId', - 'email' => 'email', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'signature' => 'signature' + 'email' => 'email' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', + 'signature' => 'setSignature', 'type' => 'setType', 'company_id' => 'setCompanyId', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'signature' => 'setSignature' + 'email' => 'setEmail' ]; /** @@ -150,12 +150,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', + 'signature' => 'getSignature', 'type' => 'getType', 'company_id' => 'getCompanyId', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'signature' => 'getSignature' + 'email' => 'getEmail' ]; /** @@ -236,12 +236,12 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { + $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; + $this->container['signature'] = $data['signature'] ?? null; $this->container['type'] = $data['type'] ?? null; $this->container['company_id'] = $data['company_id'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['email'] = $data['email'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; } /** @@ -262,6 +262,13 @@ public function listInvalidProperties() ); } + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -277,6 +284,54 @@ public function valid() } + /** + * Gets e_delivery_consented_at + * + * @return \DateTime|null + */ + public function getEDeliveryConsentedAt() + { + return $this->container['e_delivery_consented_at']; + } + + /** + * Sets e_delivery_consented_at + * + * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. + * + * @return self + */ + public function setEDeliveryConsentedAt($e_delivery_consented_at) + { + $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; + + return $this; + } + + /** + * Gets signature + * + * @return string|null + */ + public function getSignature() + { + return $this->container['signature']; + } + + /** + * Sets signature + * + * @param string|null $signature The signature of the form. + * + * @return self + */ + public function setSignature($signature) + { + $this->container['signature'] = $signature; + + return $this; + } + /** * Gets type * @@ -314,7 +369,7 @@ public function setType($type) /** * Gets company_id * - * @return string|null + * @return string */ public function getCompanyId() { @@ -324,12 +379,17 @@ public function getCompanyId() /** * Sets company_id * - * @param string|null $company_id The ID of the associated company. + * @param string $company_id The ID of the associated company. * * @return self */ public function setCompanyId($company_id) { + + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling W9FormBaseRequest., must be bigger than or equal to 1.'); + } + $this->container['company_id'] = $company_id; return $this; @@ -382,54 +442,6 @@ public function setEmail($email) return $this; } - - /** - * Gets e_delivery_consented_at - * - * @return \DateTime|null - */ - public function getEDeliveryConsentedAt() - { - return $this->container['e_delivery_consented_at']; - } - - /** - * Sets e_delivery_consented_at - * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. - * - * @return self - */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) - { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; - - return $this; - } - - /** - * Gets signature - * - * @return string|null - */ - public function getSignature() - { - return $this->container['signature']; - } - - /** - * Sets signature - * - * @param string|null $signature The signature of the form. - * - * @return self - */ - public function setSignature($signature) - { - $this->container['signature'] = $signature; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/W9FormBaseResponse.php b/lib/Model/A1099/V2/W9FormBaseResponse.php index d0b7c27..ade4d6f 100644 --- a/lib/Model/A1099/V2/W9FormBaseResponse.php +++ b/lib/Model/A1099/V2/W9FormBaseResponse.php @@ -56,7 +56,7 @@ */ class W9FormBaseResponse implements ModelInterface, ArrayAccess, \JsonSerializable { - public const DISCRIMINATOR = null; + public const DISCRIMINATOR = 'type'; /** * The original name of the model. @@ -72,19 +72,19 @@ class W9FormBaseResponse implements ModelInterface, ArrayAccess, \JsonSerializab */ protected static $openAPITypes = [ 'id' => 'string', - 'type' => 'string', - 'entry_status' => 'string', - 'entry_status_date' => '\DateTime', + 'entry_status' => '\Avalara\SDK\Model\A1099\V2\EntryStatusResponse', 'reference_id' => 'string', 'company_id' => 'string', 'display_name' => 'string', 'email' => 'string', 'archived' => 'bool', + 'ancestor_id' => 'string', 'signature' => 'string', 'signed_date' => '\DateTime', 'e_delivery_consented_at' => '\DateTime', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' + 'updated_at' => '\DateTime', + 'type' => 'string' ]; /** @@ -96,19 +96,19 @@ class W9FormBaseResponse implements ModelInterface, ArrayAccess, \JsonSerializab */ protected static $openAPIFormats = [ 'id' => null, - 'type' => null, 'entry_status' => null, - 'entry_status_date' => 'date-time', 'reference_id' => null, 'company_id' => null, 'display_name' => null, 'email' => null, 'archived' => null, + 'ancestor_id' => null, 'signature' => null, 'signed_date' => 'date-time', 'e_delivery_consented_at' => 'date-time', 'created_at' => 'date-time', - 'updated_at' => 'date-time' + 'updated_at' => 'date-time', + 'type' => null ]; /** @@ -139,19 +139,19 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'id' => 'id', - 'type' => 'type', 'entry_status' => 'entryStatus', - 'entry_status_date' => 'entryStatusDate', 'reference_id' => 'referenceId', 'company_id' => 'companyId', 'display_name' => 'displayName', 'email' => 'email', 'archived' => 'archived', + 'ancestor_id' => 'ancestorId', 'signature' => 'signature', 'signed_date' => 'signedDate', 'e_delivery_consented_at' => 'eDeliveryConsentedAt', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt' + 'updated_at' => 'updatedAt', + 'type' => 'type' ]; /** @@ -161,19 +161,19 @@ public static function openAPIFormats() */ protected static $setters = [ 'id' => 'setId', - 'type' => 'setType', 'entry_status' => 'setEntryStatus', - 'entry_status_date' => 'setEntryStatusDate', 'reference_id' => 'setReferenceId', 'company_id' => 'setCompanyId', 'display_name' => 'setDisplayName', 'email' => 'setEmail', 'archived' => 'setArchived', + 'ancestor_id' => 'setAncestorId', 'signature' => 'setSignature', 'signed_date' => 'setSignedDate', 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' + 'updated_at' => 'setUpdatedAt', + 'type' => 'setType' ]; /** @@ -183,19 +183,19 @@ public static function openAPIFormats() */ protected static $getters = [ 'id' => 'getId', - 'type' => 'getType', 'entry_status' => 'getEntryStatus', - 'entry_status_date' => 'getEntryStatusDate', 'reference_id' => 'getReferenceId', 'company_id' => 'getCompanyId', 'display_name' => 'getDisplayName', 'email' => 'getEmail', 'archived' => 'getArchived', + 'ancestor_id' => 'getAncestorId', 'signature' => 'getSignature', 'signed_date' => 'getSignedDate', 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' + 'updated_at' => 'getUpdatedAt', + 'type' => 'getType' ]; /** @@ -256,19 +256,22 @@ public function getModelName() public function __construct(array $data = null) { $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; $this->container['entry_status'] = $data['entry_status'] ?? null; - $this->container['entry_status_date'] = $data['entry_status_date'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['company_id'] = $data['company_id'] ?? null; $this->container['display_name'] = $data['display_name'] ?? null; $this->container['email'] = $data['email'] ?? null; $this->container['archived'] = $data['archived'] ?? null; + $this->container['ancestor_id'] = $data['ancestor_id'] ?? null; $this->container['signature'] = $data['signature'] ?? null; $this->container['signed_date'] = $data['signed_date'] ?? null; $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; + $this->container['type'] = $data['type'] ?? null; + + // Initialize discriminator property with the model name. + $this->container['type'] = static::$openAPIModelName; } /** @@ -319,34 +322,10 @@ public function setId($id) return $this; } - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type The form type. - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - /** * Gets entry_status * - * @return string|null + * @return \Avalara\SDK\Model\A1099\V2\EntryStatusResponse|null */ public function getEntryStatus() { @@ -356,7 +335,7 @@ public function getEntryStatus() /** * Sets entry_status * - * @param string|null $entry_status The form status. + * @param \Avalara\SDK\Model\A1099\V2\EntryStatusResponse|null $entry_status The entry status information for the form. * * @return self */ @@ -367,30 +346,6 @@ public function setEntryStatus($entry_status) return $this; } - /** - * Gets entry_status_date - * - * @return \DateTime|null - */ - public function getEntryStatusDate() - { - return $this->container['entry_status_date']; - } - - /** - * Sets entry_status_date - * - * @param \DateTime|null $entry_status_date The timestamp for the latest status update. - * - * @return self - */ - public function setEntryStatusDate($entry_status_date) - { - $this->container['entry_status_date'] = $entry_status_date; - - return $this; - } - /** * Gets reference_id * @@ -511,6 +466,30 @@ public function setArchived($archived) return $this; } + /** + * Gets ancestor_id + * + * @return string|null + */ + public function getAncestorId() + { + return $this->container['ancestor_id']; + } + + /** + * Sets ancestor_id + * + * @param string|null $ancestor_id Form ID of previous version. + * + * @return self + */ + public function setAncestorId($ancestor_id) + { + $this->container['ancestor_id'] = $ancestor_id; + + return $this; + } + /** * Gets signature * @@ -630,6 +609,30 @@ public function setUpdatedAt($updated_at) return $this; } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of the response object. + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/A1099/V2/HttpValidationProblemDetails.php b/lib/Model/A1099/V2/W9FormMinimalRequest.php similarity index 58% rename from lib/Model/A1099/V2/HttpValidationProblemDetails.php rename to lib/Model/A1099/V2/W9FormMinimalRequest.php index 4d3530b..35047e5 100644 --- a/lib/Model/A1099/V2/HttpValidationProblemDetails.php +++ b/lib/Model/A1099/V2/W9FormMinimalRequest.php @@ -1,6 +1,6 @@ 'array', 'type' => 'string', - 'title' => 'string', - 'status' => 'int', - 'detail' => 'string', - 'instance' => 'string' + 'email' => 'string', + 'name' => 'string', + 'account_number' => 'string', + 'company_id' => 'string', + 'reference_id' => 'string' ]; /** @@ -87,12 +87,12 @@ class HttpValidationProblemDetails implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ - 'errors' => null, 'type' => null, - 'title' => null, - 'status' => 'int32', - 'detail' => null, - 'instance' => null + 'email' => null, + 'name' => null, + 'account_number' => null, + 'company_id' => null, + 'reference_id' => null ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'errors' => 'errors', 'type' => 'type', - 'title' => 'title', - 'status' => 'status', - 'detail' => 'detail', - 'instance' => 'instance' + 'email' => 'email', + 'name' => 'name', + 'account_number' => 'accountNumber', + 'company_id' => 'companyId', + 'reference_id' => 'referenceId' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'errors' => 'setErrors', 'type' => 'setType', - 'title' => 'setTitle', - 'status' => 'setStatus', - 'detail' => 'setDetail', - 'instance' => 'setInstance' + 'email' => 'setEmail', + 'name' => 'setName', + 'account_number' => 'setAccountNumber', + 'company_id' => 'setCompanyId', + 'reference_id' => 'setReferenceId' ]; /** @@ -150,12 +150,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'errors' => 'getErrors', 'type' => 'getType', - 'title' => 'getTitle', - 'status' => 'getStatus', - 'detail' => 'getDetail', - 'instance' => 'getInstance' + 'email' => 'getEmail', + 'name' => 'getName', + 'account_number' => 'getAccountNumber', + 'company_id' => 'getCompanyId', + 'reference_id' => 'getReferenceId' ]; /** @@ -199,6 +199,27 @@ public function getModelName() return self::$openAPIModelName; } + const TYPE_W4 = 'W4'; + const TYPE_W8_BEN = 'W8Ben'; + const TYPE_W8_BEN_E = 'W8BenE'; + const TYPE_W8_IMY = 'W8Imy'; + const TYPE_W9 = 'W9'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_W4, + self::TYPE_W8_BEN, + self::TYPE_W8_BEN_E, + self::TYPE_W8_IMY, + self::TYPE_W9, + ]; + } /** * Associative array for storing property values @@ -215,12 +236,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['errors'] = $data['errors'] ?? null; $this->container['type'] = $data['type'] ?? null; - $this->container['title'] = $data['title'] ?? null; - $this->container['status'] = $data['status'] ?? null; - $this->container['detail'] = $data['detail'] ?? null; - $this->container['instance'] = $data['instance'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['name'] = $data['name'] ?? null; + $this->container['account_number'] = $data['account_number'] ?? null; + $this->container['company_id'] = $data['company_id'] ?? null; + $this->container['reference_id'] = $data['reference_id'] ?? null; } /** @@ -232,6 +253,36 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ((mb_strlen($this->container['email']) < 1)) { + $invalidProperties[] = "invalid value for 'email', the character length must be bigger than or equal to 1."; + } + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -248,145 +299,170 @@ public function valid() /** - * Gets errors + * Gets type * - * @return array|null + * @return string|null */ - public function getErrors() + public function getType() { - return $this->container['errors']; + return $this->container['type']; } /** - * Sets errors + * Sets type * - * @param array|null $errors errors + * @param string|null $type The form type (always \"w9\" for this model). * * @return self */ - public function setErrors($errors) + public function setType($type) { - $this->container['errors'] = $errors; + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; return $this; } /** - * Gets type + * Gets email * - * @return string|null + * @return string */ - public function getType() + public function getEmail() { - return $this->container['type']; + return $this->container['email']; } /** - * Sets type + * Sets email * - * @param string|null $type type + * @param string $email The email address of the individual associated with the form. * * @return self */ - public function setType($type) + public function setEmail($email) { - $this->container['type'] = $type; + + if ((mb_strlen($email) < 1)) { + throw new \InvalidArgumentException('invalid length for $email when calling W9FormMinimalRequest., must be bigger than or equal to 1.'); + } + + $this->container['email'] = $email; return $this; } /** - * Gets title + * Gets name * - * @return string|null + * @return string */ - public function getTitle() + public function getName() { - return $this->container['title']; + return $this->container['name']; } /** - * Sets title + * Sets name * - * @param string|null $title title + * @param string $name The name of the individual or entity associated with the form. * * @return self */ - public function setTitle($title) + public function setName($name) { - $this->container['title'] = $title; + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling W9FormMinimalRequest., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; return $this; } /** - * Gets status + * Gets account_number * - * @return int|null + * @return string|null */ - public function getStatus() + public function getAccountNumber() { - return $this->container['status']; + return $this->container['account_number']; } /** - * Sets status + * Sets account_number * - * @param int|null $status status + * @param string|null $account_number The account number associated with the form. * * @return self */ - public function setStatus($status) + public function setAccountNumber($account_number) { - $this->container['status'] = $status; + $this->container['account_number'] = $account_number; return $this; } /** - * Gets detail + * Gets company_id * - * @return string|null + * @return string */ - public function getDetail() + public function getCompanyId() { - return $this->container['detail']; + return $this->container['company_id']; } /** - * Sets detail + * Sets company_id * - * @param string|null $detail detail + * @param string $company_id The ID of the associated company. * * @return self */ - public function setDetail($detail) + public function setCompanyId($company_id) { - $this->container['detail'] = $detail; + + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling W9FormMinimalRequest., must be bigger than or equal to 1.'); + } + + $this->container['company_id'] = $company_id; return $this; } /** - * Gets instance + * Gets reference_id * * @return string|null */ - public function getInstance() + public function getReferenceId() { - return $this->container['instance']; + return $this->container['reference_id']; } /** - * Sets instance + * Sets reference_id * - * @param string|null $instance instance + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setInstance($instance) + public function setReferenceId($reference_id) { - $this->container['instance'] = $instance; + $this->container['reference_id'] = $reference_id; return $this; } diff --git a/lib/Model/A1099/V2/W9FormRequest.php b/lib/Model/A1099/V2/W9FormRequest.php index 51136ea..7e5566a 100644 --- a/lib/Model/A1099/V2/W9FormRequest.php +++ b/lib/Model/A1099/V2/W9FormRequest.php @@ -90,11 +90,11 @@ class W9FormRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'tin' => 'string', 'backup_withholding' => 'bool', 'is1099able' => 'bool', + 'e_delivery_consented_at' => '\DateTime', + 'signature' => 'string', 'company_id' => 'string', 'reference_id' => 'string', - 'email' => 'string', - 'e_delivery_consented_at' => '\DateTime', - 'signature' => 'string' + 'email' => 'string' ]; /** @@ -124,11 +124,11 @@ class W9FormRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'tin' => null, 'backup_withholding' => null, 'is1099able' => null, + 'e_delivery_consented_at' => 'date-time', + 'signature' => null, 'company_id' => null, 'reference_id' => null, - 'email' => null, - 'e_delivery_consented_at' => 'date-time', - 'signature' => null + 'email' => null ]; /** @@ -177,11 +177,11 @@ public static function openAPIFormats() 'tin' => 'tin', 'backup_withholding' => 'backupWithholding', 'is1099able' => 'is1099able', + 'e_delivery_consented_at' => 'eDeliveryConsentedAt', + 'signature' => 'signature', 'company_id' => 'companyId', 'reference_id' => 'referenceId', - 'email' => 'email', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'signature' => 'signature' + 'email' => 'email' ]; /** @@ -209,11 +209,11 @@ public static function openAPIFormats() 'tin' => 'setTin', 'backup_withholding' => 'setBackupWithholding', 'is1099able' => 'setIs1099able', + 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', + 'signature' => 'setSignature', 'company_id' => 'setCompanyId', 'reference_id' => 'setReferenceId', - 'email' => 'setEmail', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'signature' => 'setSignature' + 'email' => 'setEmail' ]; /** @@ -241,11 +241,11 @@ public static function openAPIFormats() 'tin' => 'getTin', 'backup_withholding' => 'getBackupWithholding', 'is1099able' => 'getIs1099able', + 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', + 'signature' => 'getSignature', 'company_id' => 'getCompanyId', 'reference_id' => 'getReferenceId', - 'email' => 'getEmail', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'signature' => 'getSignature' + 'email' => 'getEmail' ]; /** @@ -345,11 +345,11 @@ public function __construct(array $data = null) $this->container['tin'] = $data['tin'] ?? null; $this->container['backup_withholding'] = $data['backup_withholding'] ?? null; $this->container['is1099able'] = $data['is1099able'] ?? null; + $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; + $this->container['signature'] = $data['signature'] ?? null; $this->container['company_id'] = $data['company_id'] ?? null; $this->container['reference_id'] = $data['reference_id'] ?? null; $this->container['email'] = $data['email'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; } /** @@ -370,6 +370,13 @@ public function listInvalidProperties() ); } + if ($this->container['company_id'] === null) { + $invalidProperties[] = "'company_id' can't be null"; + } + if ((mb_strlen($this->container['company_id']) < 1)) { + $invalidProperties[] = "invalid value for 'company_id', the character length must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -852,121 +859,126 @@ public function setIs1099able($is1099able) } /** - * Gets company_id + * Gets e_delivery_consented_at * - * @return string|null + * @return \DateTime|null */ - public function getCompanyId() + public function getEDeliveryConsentedAt() { - return $this->container['company_id']; + return $this->container['e_delivery_consented_at']; } /** - * Sets company_id + * Sets e_delivery_consented_at * - * @param string|null $company_id The ID of the associated company. + * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. * * @return self */ - public function setCompanyId($company_id) + public function setEDeliveryConsentedAt($e_delivery_consented_at) { - $this->container['company_id'] = $company_id; + $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; return $this; } /** - * Gets reference_id + * Gets signature * * @return string|null */ - public function getReferenceId() + public function getSignature() { - return $this->container['reference_id']; + return $this->container['signature']; } /** - * Sets reference_id + * Sets signature * - * @param string|null $reference_id A reference identifier for the form. + * @param string|null $signature The signature of the form. * * @return self */ - public function setReferenceId($reference_id) + public function setSignature($signature) { - $this->container['reference_id'] = $reference_id; + $this->container['signature'] = $signature; return $this; } /** - * Gets email + * Gets company_id * - * @return string|null + * @return string */ - public function getEmail() + public function getCompanyId() { - return $this->container['email']; + return $this->container['company_id']; } /** - * Sets email + * Sets company_id * - * @param string|null $email The email address of the individual associated with the form. + * @param string $company_id The ID of the associated company. * * @return self */ - public function setEmail($email) + public function setCompanyId($company_id) { - $this->container['email'] = $email; + + if ((mb_strlen($company_id) < 1)) { + throw new \InvalidArgumentException('invalid length for $company_id when calling W9FormRequest., must be bigger than or equal to 1.'); + } + + $this->container['company_id'] = $company_id; return $this; } /** - * Gets e_delivery_consented_at + * Gets reference_id * - * @return \DateTime|null + * @return string|null */ - public function getEDeliveryConsentedAt() + public function getReferenceId() { - return $this->container['e_delivery_consented_at']; + return $this->container['reference_id']; } /** - * Sets e_delivery_consented_at + * Sets reference_id * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. + * @param string|null $reference_id A reference identifier for the form. * * @return self */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) + public function setReferenceId($reference_id) { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; + $this->container['reference_id'] = $reference_id; return $this; } /** - * Gets signature + * Gets email * * @return string|null */ - public function getSignature() + public function getEmail() { - return $this->container['signature']; + return $this->container['email']; } /** - * Sets signature + * Sets email * - * @param string|null $signature The signature of the form. + * @param string|null $email The email address of the individual associated with the form. * * @return self */ - public function setSignature($signature) + public function setEmail($email) { - $this->container['signature'] = $signature; + $this->container['email'] = $email; return $this; } diff --git a/lib/Model/A1099/V2/W9FormResponse.php b/lib/Model/A1099/V2/W9FormResponse.php index 773162b..0c8ddec 100644 --- a/lib/Model/A1099/V2/W9FormResponse.php +++ b/lib/Model/A1099/V2/W9FormResponse.php @@ -39,8 +39,6 @@ */ namespace Avalara\SDK\Model\A1099\V2; - -use \ArrayAccess; use \Avalara\SDK\ObjectSerializer; use \Avalara\SDK\Model\ModelInterface; /** @@ -54,7 +52,7 @@ * @template TKey int|null * @template TValue mixed|null */ -class W9FormResponse implements ModelInterface, ArrayAccess, \JsonSerializable +class W9FormResponse extends W9FormBaseResponse { public const DISCRIMINATOR = null; @@ -89,21 +87,7 @@ class W9FormResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'tin' => 'string', 'backup_withholding' => 'bool', 'is1099able' => 'bool', - 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\TinMatchStatusResponse', - 'id' => 'string', - 'type' => 'string', - 'entry_status' => 'string', - 'entry_status_date' => '\DateTime', - 'reference_id' => 'string', - 'company_id' => 'string', - 'display_name' => 'string', - 'email' => 'string', - 'archived' => 'bool', - 'signature' => 'string', - 'signed_date' => '\DateTime', - 'e_delivery_consented_at' => '\DateTime', - 'created_at' => '\DateTime', - 'updated_at' => '\DateTime' + 'tin_match_status' => '\Avalara\SDK\Model\A1099\V2\TinMatchStatusResponse' ]; /** @@ -132,21 +116,7 @@ class W9FormResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'tin' => null, 'backup_withholding' => null, 'is1099able' => null, - 'tin_match_status' => null, - 'id' => null, - 'type' => null, - 'entry_status' => null, - 'entry_status_date' => 'date-time', - 'reference_id' => null, - 'company_id' => null, - 'display_name' => null, - 'email' => null, - 'archived' => null, - 'signature' => null, - 'signed_date' => 'date-time', - 'e_delivery_consented_at' => 'date-time', - 'created_at' => 'date-time', - 'updated_at' => 'date-time' + 'tin_match_status' => null ]; /** @@ -156,7 +126,7 @@ class W9FormResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ public static function openAPITypes() { - return self::$openAPITypes; + return self::$openAPITypes + parent::openAPITypes(); } /** @@ -166,7 +136,7 @@ public static function openAPITypes() */ public static function openAPIFormats() { - return self::$openAPIFormats; + return self::$openAPIFormats + parent::openAPIFormats(); } /** @@ -194,21 +164,7 @@ public static function openAPIFormats() 'tin' => 'tin', 'backup_withholding' => 'backupWithholding', 'is1099able' => 'is1099able', - 'tin_match_status' => 'tinMatchStatus', - 'id' => 'id', - 'type' => 'type', - 'entry_status' => 'entryStatus', - 'entry_status_date' => 'entryStatusDate', - 'reference_id' => 'referenceId', - 'company_id' => 'companyId', - 'display_name' => 'displayName', - 'email' => 'email', - 'archived' => 'archived', - 'signature' => 'signature', - 'signed_date' => 'signedDate', - 'e_delivery_consented_at' => 'eDeliveryConsentedAt', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt' + 'tin_match_status' => 'tinMatchStatus' ]; /** @@ -235,21 +191,7 @@ public static function openAPIFormats() 'tin' => 'setTin', 'backup_withholding' => 'setBackupWithholding', 'is1099able' => 'setIs1099able', - 'tin_match_status' => 'setTinMatchStatus', - 'id' => 'setId', - 'type' => 'setType', - 'entry_status' => 'setEntryStatus', - 'entry_status_date' => 'setEntryStatusDate', - 'reference_id' => 'setReferenceId', - 'company_id' => 'setCompanyId', - 'display_name' => 'setDisplayName', - 'email' => 'setEmail', - 'archived' => 'setArchived', - 'signature' => 'setSignature', - 'signed_date' => 'setSignedDate', - 'e_delivery_consented_at' => 'setEDeliveryConsentedAt', - 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt' + 'tin_match_status' => 'setTinMatchStatus' ]; /** @@ -276,21 +218,7 @@ public static function openAPIFormats() 'tin' => 'getTin', 'backup_withholding' => 'getBackupWithholding', 'is1099able' => 'getIs1099able', - 'tin_match_status' => 'getTinMatchStatus', - 'id' => 'getId', - 'type' => 'getType', - 'entry_status' => 'getEntryStatus', - 'entry_status_date' => 'getEntryStatusDate', - 'reference_id' => 'getReferenceId', - 'company_id' => 'getCompanyId', - 'display_name' => 'getDisplayName', - 'email' => 'getEmail', - 'archived' => 'getArchived', - 'signature' => 'getSignature', - 'signed_date' => 'getSignedDate', - 'e_delivery_consented_at' => 'getEDeliveryConsentedAt', - 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt' + 'tin_match_status' => 'getTinMatchStatus' ]; /** @@ -301,7 +229,7 @@ public static function openAPIFormats() */ public static function attributeMap() { - return self::$attributeMap; + return parent::attributeMap() + self::$attributeMap; } /** @@ -311,7 +239,7 @@ public static function attributeMap() */ public static function setters() { - return self::$setters; + return parent::setters() + self::$setters; } /** @@ -321,7 +249,7 @@ public static function setters() */ public static function getters() { - return self::$getters; + return parent::getters() + self::$getters; } /** @@ -335,12 +263,6 @@ public function getModelName() } - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; /** * Constructor @@ -350,6 +272,8 @@ public function getModelName() */ public function __construct(array $data = null) { + parent::__construct($data); + $this->container['name'] = $data['name'] ?? null; $this->container['business_name'] = $data['business_name'] ?? null; $this->container['business_classification'] = $data['business_classification'] ?? null; @@ -369,20 +293,6 @@ public function __construct(array $data = null) $this->container['backup_withholding'] = $data['backup_withholding'] ?? null; $this->container['is1099able'] = $data['is1099able'] ?? null; $this->container['tin_match_status'] = $data['tin_match_status'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['entry_status'] = $data['entry_status'] ?? null; - $this->container['entry_status_date'] = $data['entry_status_date'] ?? null; - $this->container['reference_id'] = $data['reference_id'] ?? null; - $this->container['company_id'] = $data['company_id'] ?? null; - $this->container['display_name'] = $data['display_name'] ?? null; - $this->container['email'] = $data['email'] ?? null; - $this->container['archived'] = $data['archived'] ?? null; - $this->container['signature'] = $data['signature'] ?? null; - $this->container['signed_date'] = $data['signed_date'] ?? null; - $this->container['e_delivery_consented_at'] = $data['e_delivery_consented_at'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -392,7 +302,7 @@ public function __construct(array $data = null) */ public function listInvalidProperties() { - $invalidProperties = []; + $invalidProperties = parent::listInvalidProperties(); return $invalidProperties; } @@ -864,342 +774,6 @@ public function setTinMatchStatus($tin_match_status) return $this; } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id The unique identifier for the form. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type The form type. - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets entry_status - * - * @return string|null - */ - public function getEntryStatus() - { - return $this->container['entry_status']; - } - - /** - * Sets entry_status - * - * @param string|null $entry_status The form status. - * - * @return self - */ - public function setEntryStatus($entry_status) - { - $this->container['entry_status'] = $entry_status; - - return $this; - } - - /** - * Gets entry_status_date - * - * @return \DateTime|null - */ - public function getEntryStatusDate() - { - return $this->container['entry_status_date']; - } - - /** - * Sets entry_status_date - * - * @param \DateTime|null $entry_status_date The timestamp for the latest status update. - * - * @return self - */ - public function setEntryStatusDate($entry_status_date) - { - $this->container['entry_status_date'] = $entry_status_date; - - return $this; - } - - /** - * Gets reference_id - * - * @return string|null - */ - public function getReferenceId() - { - return $this->container['reference_id']; - } - - /** - * Sets reference_id - * - * @param string|null $reference_id A reference identifier for the form. - * - * @return self - */ - public function setReferenceId($reference_id) - { - $this->container['reference_id'] = $reference_id; - - return $this; - } - - /** - * Gets company_id - * - * @return string|null - */ - public function getCompanyId() - { - return $this->container['company_id']; - } - - /** - * Sets company_id - * - * @param string|null $company_id The ID of the associated company. - * - * @return self - */ - public function setCompanyId($company_id) - { - $this->container['company_id'] = $company_id; - - return $this; - } - - /** - * Gets display_name - * - * @return string|null - */ - public function getDisplayName() - { - return $this->container['display_name']; - } - - /** - * Sets display_name - * - * @param string|null $display_name The display name associated with the form. - * - * @return self - */ - public function setDisplayName($display_name) - { - $this->container['display_name'] = $display_name; - - return $this; - } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email The email address of the individual associated with the form. - * - * @return self - */ - public function setEmail($email) - { - $this->container['email'] = $email; - - return $this; - } - - /** - * Gets archived - * - * @return bool|null - */ - public function getArchived() - { - return $this->container['archived']; - } - - /** - * Sets archived - * - * @param bool|null $archived Indicates whether the form is archived. - * - * @return self - */ - public function setArchived($archived) - { - $this->container['archived'] = $archived; - - return $this; - } - - /** - * Gets signature - * - * @return string|null - */ - public function getSignature() - { - return $this->container['signature']; - } - - /** - * Sets signature - * - * @param string|null $signature The signature of the form. - * - * @return self - */ - public function setSignature($signature) - { - $this->container['signature'] = $signature; - - return $this; - } - - /** - * Gets signed_date - * - * @return \DateTime|null - */ - public function getSignedDate() - { - return $this->container['signed_date']; - } - - /** - * Sets signed_date - * - * @param \DateTime|null $signed_date The date the form was signed. - * - * @return self - */ - public function setSignedDate($signed_date) - { - $this->container['signed_date'] = $signed_date; - - return $this; - } - - /** - * Gets e_delivery_consented_at - * - * @return \DateTime|null - */ - public function getEDeliveryConsentedAt() - { - return $this->container['e_delivery_consented_at']; - } - - /** - * Sets e_delivery_consented_at - * - * @param \DateTime|null $e_delivery_consented_at The date when e-delivery was consented. - * - * @return self - */ - public function setEDeliveryConsentedAt($e_delivery_consented_at) - { - $this->container['e_delivery_consented_at'] = $e_delivery_consented_at; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at The creation date of the form. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at The last updated date of the form. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/EInvoicing/V1/BadDownloadRequest.php b/lib/Model/EInvoicing/V1/BadDownloadRequest.php index 982943e..d32b894 100644 --- a/lib/Model/EInvoicing/V1/BadDownloadRequest.php +++ b/lib/Model/EInvoicing/V1/BadDownloadRequest.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/BadRequest.php b/lib/Model/EInvoicing/V1/BadRequest.php index 1df6434..694f293 100644 --- a/lib/Model/EInvoicing/V1/BadRequest.php +++ b/lib/Model/EInvoicing/V1/BadRequest.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/BatchSearch.php b/lib/Model/EInvoicing/V1/BatchSearch.php index f4e71d3..34a947b 100644 --- a/lib/Model/EInvoicing/V1/BatchSearch.php +++ b/lib/Model/EInvoicing/V1/BatchSearch.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/BatchSearchListResponse.php b/lib/Model/EInvoicing/V1/BatchSearchListResponse.php index 71e005d..767f250 100644 --- a/lib/Model/EInvoicing/V1/BatchSearchListResponse.php +++ b/lib/Model/EInvoicing/V1/BatchSearchListResponse.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/ConditionalForField.php b/lib/Model/EInvoicing/V1/ConditionalForField.php index eaab7e0..6bdab05 100644 --- a/lib/Model/EInvoicing/V1/ConditionalForField.php +++ b/lib/Model/EInvoicing/V1/ConditionalForField.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/DataInputField.php b/lib/Model/EInvoicing/V1/DataInputField.php index c77b823..e0906d1 100644 --- a/lib/Model/EInvoicing/V1/DataInputField.php +++ b/lib/Model/EInvoicing/V1/DataInputField.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/DataInputFieldNotUsedFor.php b/lib/Model/EInvoicing/V1/DataInputFieldNotUsedFor.php index 574658d..666e99d 100644 --- a/lib/Model/EInvoicing/V1/DataInputFieldNotUsedFor.php +++ b/lib/Model/EInvoicing/V1/DataInputFieldNotUsedFor.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/DataInputFieldOptionalFor.php b/lib/Model/EInvoicing/V1/DataInputFieldOptionalFor.php index e5fb53a..1bc01d9 100644 --- a/lib/Model/EInvoicing/V1/DataInputFieldOptionalFor.php +++ b/lib/Model/EInvoicing/V1/DataInputFieldOptionalFor.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/DataInputFieldRequiredFor.php b/lib/Model/EInvoicing/V1/DataInputFieldRequiredFor.php index 6f12457..9363e50 100644 --- a/lib/Model/EInvoicing/V1/DataInputFieldRequiredFor.php +++ b/lib/Model/EInvoicing/V1/DataInputFieldRequiredFor.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/DataInputFieldsResponse.php b/lib/Model/EInvoicing/V1/DataInputFieldsResponse.php index a8d238e..71cc13b 100644 --- a/lib/Model/EInvoicing/V1/DataInputFieldsResponse.php +++ b/lib/Model/EInvoicing/V1/DataInputFieldsResponse.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponse.php b/lib/Model/EInvoicing/V1/DirectorySearchResponse.php deleted file mode 100644 index fe007d7..0000000 --- a/lib/Model/EInvoicing/V1/DirectorySearchResponse.php +++ /dev/null @@ -1,393 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\EInvoicing\V1; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * DirectorySearchResponse Class Doc Comment - * - * @category Class - * @description Response schema for directory search results - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class DirectorySearchResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'DirectorySearchResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'at_record_set_count' => 'int', - 'at_next_link' => 'string', - 'value' => '\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInner[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'at_record_set_count' => 'int32', - 'at_next_link' => null, - 'value' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'at_record_set_count' => '@recordSetCount', - 'at_next_link' => '@nextLink', - 'value' => 'value' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'at_record_set_count' => 'setAtRecordSetCount', - 'at_next_link' => 'setAtNextLink', - 'value' => 'setValue' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'at_record_set_count' => 'getAtRecordSetCount', - 'at_next_link' => 'getAtNextLink', - 'value' => 'getValue' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['at_record_set_count'] = $data['at_record_set_count'] ?? null; - $this->container['at_next_link'] = $data['at_next_link'] ?? null; - $this->container['value'] = $data['value'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets at_record_set_count - * - * @return int|null - */ - public function getAtRecordSetCount() - { - return $this->container['at_record_set_count']; - } - - /** - * Sets at_record_set_count - * - * @param int|null $at_record_set_count The count of records in the result set - * - * @return self - */ - public function setAtRecordSetCount($at_record_set_count) - { - $this->container['at_record_set_count'] = $at_record_set_count; - - return $this; - } - - /** - * Gets at_next_link - * - * @return string|null - */ - public function getAtNextLink() - { - return $this->container['at_next_link']; - } - - /** - * Sets at_next_link - * - * @param string|null $at_next_link The next page link to get the next set of results. - * - * @return self - */ - public function setAtNextLink($at_next_link) - { - $this->container['at_next_link'] = $at_next_link; - - return $this; - } - - /** - * Gets value - * - * @return \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInner[]|null - */ - public function getValue() - { - return $this->container['value']; - } - - /** - * Sets value - * - * @param \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInner[]|null $value value - * - * @return self - */ - public function setValue($value) - { - $this->container['value'] = $value; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInner.php b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInner.php deleted file mode 100644 index e69986a..0000000 --- a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInner.php +++ /dev/null @@ -1,512 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\EInvoicing\V1; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * DirectorySearchResponseValueInner Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class DirectorySearchResponseValueInner implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'DirectorySearchResponse_value_inner'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'id' => 'string', - 'name' => 'string', - 'network' => 'string', - 'registration_date' => '\DateTime', - 'identifiers' => '\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerIdentifiersInner[]', - 'addresses' => '\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerAddressesInner[]', - 'supported_document_types' => '\Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'id' => null, - 'name' => null, - 'network' => null, - 'registration_date' => 'date', - 'identifiers' => null, - 'addresses' => null, - 'supported_document_types' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'name' => 'name', - 'network' => 'network', - 'registration_date' => 'registrationDate', - 'identifiers' => 'identifiers', - 'addresses' => 'addresses', - 'supported_document_types' => 'supportedDocumentTypes' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'name' => 'setName', - 'network' => 'setNetwork', - 'registration_date' => 'setRegistrationDate', - 'identifiers' => 'setIdentifiers', - 'addresses' => 'setAddresses', - 'supported_document_types' => 'setSupportedDocumentTypes' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'name' => 'getName', - 'network' => 'getNetwork', - 'registration_date' => 'getRegistrationDate', - 'identifiers' => 'getIdentifiers', - 'addresses' => 'getAddresses', - 'supported_document_types' => 'getSupportedDocumentTypes' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = $data['id'] ?? null; - $this->container['name'] = $data['name'] ?? null; - $this->container['network'] = $data['network'] ?? null; - $this->container['registration_date'] = $data['registration_date'] ?? null; - $this->container['identifiers'] = $data['identifiers'] ?? null; - $this->container['addresses'] = $data['addresses'] ?? null; - $this->container['supported_document_types'] = $data['supported_document_types'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Avalara unique ID of the participant in the directory. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name Name of the participant (typically, the name of the business entity). - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets network - * - * @return string|null - */ - public function getNetwork() - { - return $this->container['network']; - } - - /** - * Sets network - * - * @param string|null $network The network where the participant is present. - * - * @return self - */ - public function setNetwork($network) - { - $this->container['network'] = $network; - - return $this; - } - - /** - * Gets registration_date - * - * @return \DateTime|null - */ - public function getRegistrationDate() - { - return $this->container['registration_date']; - } - - /** - * Sets registration_date - * - * @param \DateTime|null $registration_date Registration date of the participant if available - * - * @return self - */ - public function setRegistrationDate($registration_date) - { - $this->container['registration_date'] = $registration_date; - - return $this; - } - - /** - * Gets identifiers - * - * @return \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerIdentifiersInner[]|null - */ - public function getIdentifiers() - { - return $this->container['identifiers']; - } - - /** - * Sets identifiers - * - * @param \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerIdentifiersInner[]|null $identifiers identifiers - * - * @return self - */ - public function setIdentifiers($identifiers) - { - $this->container['identifiers'] = $identifiers; - - return $this; - } - - /** - * Gets addresses - * - * @return \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerAddressesInner[]|null - */ - public function getAddresses() - { - return $this->container['addresses']; - } - - /** - * Sets addresses - * - * @param \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerAddressesInner[]|null $addresses addresses - * - * @return self - */ - public function setAddresses($addresses) - { - $this->container['addresses'] = $addresses; - - return $this; - } - - /** - * Gets supported_document_types - * - * @return \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]|null - */ - public function getSupportedDocumentTypes() - { - return $this->container['supported_document_types']; - } - - /** - * Sets supported_document_types - * - * @param \Avalara\SDK\Model\EInvoicing\V1\DirectorySearchResponseValueInnerSupportedDocumentTypesInner[]|null $supported_document_types supported_document_types - * - * @return self - */ - public function setSupportedDocumentTypes($supported_document_types) - { - $this->container['supported_document_types'] = $supported_document_types; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.php b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.php deleted file mode 100644 index 9deabd7..0000000 --- a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.php +++ /dev/null @@ -1,452 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\EInvoicing\V1; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * DirectorySearchResponseValueInnerAddressesInner Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class DirectorySearchResponseValueInnerAddressesInner implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'DirectorySearchResponse_value_inner_addresses_inner'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'line1' => 'string', - 'line2' => 'string', - 'city' => 'string', - 'state' => 'string', - 'country' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'line1' => null, - 'line2' => null, - 'city' => null, - 'state' => null, - 'country' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'line1' => 'line1', - 'line2' => 'line2', - 'city' => 'city', - 'state' => 'state', - 'country' => 'country' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'line1' => 'setLine1', - 'line2' => 'setLine2', - 'city' => 'setCity', - 'state' => 'setState', - 'country' => 'setCountry' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'line1' => 'getLine1', - 'line2' => 'getLine2', - 'city' => 'getCity', - 'state' => 'getState', - 'country' => 'getCountry' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['line1'] = $data['line1'] ?? null; - $this->container['line2'] = $data['line2'] ?? null; - $this->container['city'] = $data['city'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['country'] = $data['country'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets line1 - * - * @return string|null - */ - public function getLine1() - { - return $this->container['line1']; - } - - /** - * Sets line1 - * - * @param string|null $line1 Address line 1 - * - * @return self - */ - public function setLine1($line1) - { - $this->container['line1'] = $line1; - - return $this; - } - - /** - * Gets line2 - * - * @return string|null - */ - public function getLine2() - { - return $this->container['line2']; - } - - /** - * Sets line2 - * - * @param string|null $line2 Address line 2 - * - * @return self - */ - public function setLine2($line2) - { - $this->container['line2'] = $line2; - - return $this; - } - - /** - * Gets city - * - * @return string|null - */ - public function getCity() - { - return $this->container['city']; - } - - /** - * Sets city - * - * @param string|null $city City - * - * @return self - */ - public function setCity($city) - { - $this->container['city'] = $city; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state State - * - * @return self - */ - public function setState($state) - { - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets country - * - * @return string|null - */ - public function getCountry() - { - return $this->container['country']; - } - - /** - * Sets country - * - * @param string|null $country Country - * - * @return self - */ - public function setCountry($country) - { - $this->container['country'] = $country; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.php b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.php deleted file mode 100644 index 3cd280a..0000000 --- a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.php +++ /dev/null @@ -1,362 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\EInvoicing\V1; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * DirectorySearchResponseValueInnerIdentifiersInner Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class DirectorySearchResponseValueInnerIdentifiersInner implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'DirectorySearchResponse_value_inner_identifiers_inner'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'value' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'value' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'value' => 'value' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'value' => 'setValue' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'value' => 'getValue' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['value'] = $data['value'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name Peppol Participant ID if the participant is in Peppol network - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets value - * - * @return string|null - */ - public function getValue() - { - return $this->container['value']; - } - - /** - * Sets value - * - * @param string|null $value Value of the identifier - * - * @return self - */ - public function setValue($value) - { - $this->container['value'] = $value; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.php b/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.php deleted file mode 100644 index 820672b..0000000 --- a/lib/Model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.php +++ /dev/null @@ -1,422 +0,0 @@ - - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ - -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace Avalara\SDK\Model\EInvoicing\V1; - -use \ArrayAccess; -use \Avalara\SDK\ObjectSerializer; -use \Avalara\SDK\Model\ModelInterface; -/** - * DirectorySearchResponseValueInnerSupportedDocumentTypesInner Class Doc Comment - * - * @category Class - * @package Avalara\SDK - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - * @implements \ArrayAccess - * @template TKey int|null - * @template TValue mixed|null - */ -class DirectorySearchResponseValueInnerSupportedDocumentTypesInner implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'DirectorySearchResponse_value_inner_supportedDocumentTypes_inner'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'value' => 'string', - 'supported_by_trading_partner' => 'bool', - 'supported_by_avalara' => 'bool' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'value' => null, - 'supported_by_trading_partner' => null, - 'supported_by_avalara' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'value' => 'value', - 'supported_by_trading_partner' => 'supportedByTradingPartner', - 'supported_by_avalara' => 'supportedByAvalara' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'value' => 'setValue', - 'supported_by_trading_partner' => 'setSupportedByTradingPartner', - 'supported_by_avalara' => 'setSupportedByAvalara' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'value' => 'getValue', - 'supported_by_trading_partner' => 'getSupportedByTradingPartner', - 'supported_by_avalara' => 'getSupportedByAvalara' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['value'] = $data['value'] ?? null; - $this->container['supported_by_trading_partner'] = $data['supported_by_trading_partner'] ?? null; - $this->container['supported_by_avalara'] = $data['supported_by_avalara'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name Document type name. - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets value - * - * @return string|null - */ - public function getValue() - { - return $this->container['value']; - } - - /** - * Sets value - * - * @param string|null $value Document type identifier. - * - * @return self - */ - public function setValue($value) - { - $this->container['value'] = $value; - - return $this; - } - - /** - * Gets supported_by_trading_partner - * - * @return bool|null - */ - public function getSupportedByTradingPartner() - { - return $this->container['supported_by_trading_partner']; - } - - /** - * Sets supported_by_trading_partner - * - * @param bool|null $supported_by_trading_partner Does trading partner support receiving this document type - * - * @return self - */ - public function setSupportedByTradingPartner($supported_by_trading_partner) - { - $this->container['supported_by_trading_partner'] = $supported_by_trading_partner; - - return $this; - } - - /** - * Gets supported_by_avalara - * - * @return bool|null - */ - public function getSupportedByAvalara() - { - return $this->container['supported_by_avalara']; - } - - /** - * Sets supported_by_avalara - * - * @param bool|null $supported_by_avalara Does avalara support exchanging this document type - * - * @return self - */ - public function setSupportedByAvalara($supported_by_avalara) - { - $this->container['supported_by_avalara'] = $supported_by_avalara; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset):bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset):mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value):void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset):void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize():mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString():string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue():string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/EInvoicing/V1/DocumentFetch.php b/lib/Model/EInvoicing/V1/DocumentFetch.php index c8d1910..cb3f263 100644 --- a/lib/Model/EInvoicing/V1/DocumentFetch.php +++ b/lib/Model/EInvoicing/V1/DocumentFetch.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/DocumentListResponse.php b/lib/Model/EInvoicing/V1/DocumentListResponse.php index 5af7214..596a536 100644 --- a/lib/Model/EInvoicing/V1/DocumentListResponse.php +++ b/lib/Model/EInvoicing/V1/DocumentListResponse.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/DocumentStatusResponse.php b/lib/Model/EInvoicing/V1/DocumentStatusResponse.php index 8e0387a..83879d4 100644 --- a/lib/Model/EInvoicing/V1/DocumentStatusResponse.php +++ b/lib/Model/EInvoicing/V1/DocumentStatusResponse.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/DocumentSubmissionError.php b/lib/Model/EInvoicing/V1/DocumentSubmissionError.php index 11074d0..1248882 100644 --- a/lib/Model/EInvoicing/V1/DocumentSubmissionError.php +++ b/lib/Model/EInvoicing/V1/DocumentSubmissionError.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/DocumentSubmitResponse.php b/lib/Model/EInvoicing/V1/DocumentSubmitResponse.php index 95972ff..3284800 100644 --- a/lib/Model/EInvoicing/V1/DocumentSubmitResponse.php +++ b/lib/Model/EInvoicing/V1/DocumentSubmitResponse.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/DocumentSummary.php b/lib/Model/EInvoicing/V1/DocumentSummary.php index 9c14054..842423e 100644 --- a/lib/Model/EInvoicing/V1/DocumentSummary.php +++ b/lib/Model/EInvoicing/V1/DocumentSummary.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/ErrorResponse.php b/lib/Model/EInvoicing/V1/ErrorResponse.php index 367ad87..9094ad9 100644 --- a/lib/Model/EInvoicing/V1/ErrorResponse.php +++ b/lib/Model/EInvoicing/V1/ErrorResponse.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/FetchDocumentsRequest.php b/lib/Model/EInvoicing/V1/FetchDocumentsRequest.php index ea22f97..1befb5b 100644 --- a/lib/Model/EInvoicing/V1/FetchDocumentsRequest.php +++ b/lib/Model/EInvoicing/V1/FetchDocumentsRequest.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/FetchDocumentsRequestDataInner.php b/lib/Model/EInvoicing/V1/FetchDocumentsRequestDataInner.php index a7f41a0..219aef9 100644 --- a/lib/Model/EInvoicing/V1/FetchDocumentsRequestDataInner.php +++ b/lib/Model/EInvoicing/V1/FetchDocumentsRequestDataInner.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/FetchDocumentsRequestMetadata.php b/lib/Model/EInvoicing/V1/FetchDocumentsRequestMetadata.php index 7ae9240..9c192db 100644 --- a/lib/Model/EInvoicing/V1/FetchDocumentsRequestMetadata.php +++ b/lib/Model/EInvoicing/V1/FetchDocumentsRequestMetadata.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/ForbiddenError.php b/lib/Model/EInvoicing/V1/ForbiddenError.php index cbd5428..bec8051 100644 --- a/lib/Model/EInvoicing/V1/ForbiddenError.php +++ b/lib/Model/EInvoicing/V1/ForbiddenError.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/InputDataFormats.php b/lib/Model/EInvoicing/V1/InputDataFormats.php index 8a3d7fd..2c36ed4 100644 --- a/lib/Model/EInvoicing/V1/InputDataFormats.php +++ b/lib/Model/EInvoicing/V1/InputDataFormats.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/InternalServerError.php b/lib/Model/EInvoicing/V1/InternalServerError.php index d6aa4d8..78363a9 100644 --- a/lib/Model/EInvoicing/V1/InternalServerError.php +++ b/lib/Model/EInvoicing/V1/InternalServerError.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/Mandate.php b/lib/Model/EInvoicing/V1/Mandate.php index 7b940af..2006ee9 100644 --- a/lib/Model/EInvoicing/V1/Mandate.php +++ b/lib/Model/EInvoicing/V1/Mandate.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/MandateDataInputField.php b/lib/Model/EInvoicing/V1/MandateDataInputField.php index f8d2a90..65c5454 100644 --- a/lib/Model/EInvoicing/V1/MandateDataInputField.php +++ b/lib/Model/EInvoicing/V1/MandateDataInputField.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/MandateDataInputFieldNamespace.php b/lib/Model/EInvoicing/V1/MandateDataInputFieldNamespace.php index d848cd8..526a4d3 100644 --- a/lib/Model/EInvoicing/V1/MandateDataInputFieldNamespace.php +++ b/lib/Model/EInvoicing/V1/MandateDataInputFieldNamespace.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/MandatesResponse.php b/lib/Model/EInvoicing/V1/MandatesResponse.php index 5378ba1..368cc36 100644 --- a/lib/Model/EInvoicing/V1/MandatesResponse.php +++ b/lib/Model/EInvoicing/V1/MandatesResponse.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/ModelInterface.php b/lib/Model/EInvoicing/V1/ModelInterface.php index b138ddd..ca79a8e 100644 --- a/lib/Model/EInvoicing/V1/ModelInterface.php +++ b/lib/Model/EInvoicing/V1/ModelInterface.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/NotFoundError.php b/lib/Model/EInvoicing/V1/NotFoundError.php index 1610935..2031bbb 100644 --- a/lib/Model/EInvoicing/V1/NotFoundError.php +++ b/lib/Model/EInvoicing/V1/NotFoundError.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/NotUsedForField.php b/lib/Model/EInvoicing/V1/NotUsedForField.php index b50f86c..5ca7a21 100644 --- a/lib/Model/EInvoicing/V1/NotUsedForField.php +++ b/lib/Model/EInvoicing/V1/NotUsedForField.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/RequiredWhenField.php b/lib/Model/EInvoicing/V1/RequiredWhenField.php index b795325..ff2f69b 100644 --- a/lib/Model/EInvoicing/V1/RequiredWhenField.php +++ b/lib/Model/EInvoicing/V1/RequiredWhenField.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/StatusEvent.php b/lib/Model/EInvoicing/V1/StatusEvent.php index 21828fa..de0662d 100644 --- a/lib/Model/EInvoicing/V1/StatusEvent.php +++ b/lib/Model/EInvoicing/V1/StatusEvent.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/SubmitDocumentMetadata.php b/lib/Model/EInvoicing/V1/SubmitDocumentMetadata.php index 6805d7d..ba457c5 100644 --- a/lib/Model/EInvoicing/V1/SubmitDocumentMetadata.php +++ b/lib/Model/EInvoicing/V1/SubmitDocumentMetadata.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/SubmitInteropDocument202Response.php b/lib/Model/EInvoicing/V1/SubmitInteropDocument202Response.php index 9c94459..aebf9c7 100644 --- a/lib/Model/EInvoicing/V1/SubmitInteropDocument202Response.php +++ b/lib/Model/EInvoicing/V1/SubmitInteropDocument202Response.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/lib/Model/EInvoicing/V1/WorkflowIds.php b/lib/Model/EInvoicing/V1/WorkflowIds.php index f3b6e3e..bf32fa9 100644 --- a/lib/Model/EInvoicing/V1/WorkflowIds.php +++ b/lib/Model/EInvoicing/V1/WorkflowIds.php @@ -10,27 +10,27 @@ * @link https://openapi-generator.tech */ -/* - * AvaTax Software Development Kit for PHP - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @category Avalara client libraries - * @package Avalara\SDK\API\EInvoicing\V1 - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK - - */ +/* + * AvaTax Software Development Kit for PHP + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @category Avalara client libraries + * @package Avalara\SDK\API\EInvoicing\V1 + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/AvaTax-REST-V3-PHP-SDK + + */ /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).