github.com/tada-team/tdproto@v1.51.57/billing-counterparty.go (about) 1 package tdproto 2 3 import "time" 4 5 type Counterparty struct { 6 Id string `json:"id"` 7 PersonalAccountId string `json:"personal_account_id"` 8 ElectronicDocumentManagementId string `json:"electronic_document_management_id,omitempty"` 9 FullName string `json:"full_name"` 10 TaxpayerIdentificationNumber string `json:"taxpayer_identification_number"` 11 LegalAddress string `json:"legal_address"` 12 PhysicalAddress string `json:"physical_address"` 13 AccountingDictionaryCode string `json:"accounting_dictionary_code,omitempty"` 14 ClassifierOfIndustrialEnterprises string `json:"classifier_of_industrial_enterprises,omitempty"` 15 CreatedAt time.Time `json:"created_at"` 16 CounterpartyType CounterpartyType `json:"counterparty_type"` 17 } 18 19 type CounterpartyCreateRequest struct { 20 PersonalAccountId string `json:"personal_account_id"` 21 ElectronicDocumentManagementId string `json:"electronic_document_management_id,omitempty"` 22 FullName string `json:"full_name"` 23 TaxpayerIdentificationNumber string `json:"taxpayer_identification_number"` 24 LegalAddress string `json:"legal_address"` 25 PhysicalAddress string `json:"physical_address"` 26 AccountingDictionaryCode string `json:"accounting_dictionary_code,omitempty"` 27 ClassifierOfIndustrialEnterprises string `json:"classifier_of_industrial_enterprises,omitempty"` 28 CounterpartyType CounterpartyType `json:"counterparty_type"` 29 } 30 31 type CounterpartyCreateResponse struct { 32 Counterparty 33 } 34 35 type CounterpartyUpdateRequest struct { 36 PersonalAccountId string `json:"personal_account_id"` 37 ElectronicDocumentManagementId string `json:"electronic_document_management_id,omitempty"` 38 FullName string `json:"full_name"` 39 TaxpayerIdentificationNumber string `json:"taxpayer_identification_number"` 40 LegalAddress string `json:"legal_address"` 41 PhysicalAddress string `json:"physical_address"` 42 AccountingDictionaryCode string `json:"accounting_dictionary_code,omitempty"` 43 ClassifierOfIndustrialEnterprises string `json:"classifier_of_industrial_enterprises,omitempty"` 44 CounterpartyType CounterpartyType `json:"counterparty_type"` 45 } 46 47 type CounterpartyUpdateResponse struct { 48 Counterparty 49 } 50 51 type CounterpartyGetRequest struct { 52 CounterpartyIds string `json:"counterparty_ids,omitempty"` 53 AccountingDictionaryCode string `json:"accounting_dictionary_code,omitempty"` 54 PersonalAccountId string `json:"personal_account_id,omitempty"` 55 Limit uint32 `json:"limit,omitempty"` 56 Offset uint32 `json:"offset,omitempty"` 57 } 58 59 type CounterpartyGetResponse struct { 60 CounterpartyList []Counterparty `json:"counterparty_list"` 61 } 62 63 type CounterpartyType string 64 65 const ( 66 CounterpartyTypeUnspecified CounterpartyType = "COUNTERPARTY_TYPE_UNSPECIFIED" 67 CounterpartyTypePhysical CounterpartyType = "COUNTERPARTY_TYPE_PHYSICAL" 68 CounterpartyTypeSelfemployed CounterpartyType = "COUNTERPARTY_TYPE_SELFEMPLOYED" 69 CounterpartyTypeEntrepreneur CounterpartyType = "COUNTERPARTY_TYPE_ENTREPRENEUR" 70 CounterpartyTypeJuridical CounterpartyType = "COUNTERPARTY_TYPE_JURIDICAL" 71 )