-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbilling_enquiry.go
88 lines (73 loc) · 3.79 KB
/
billing_enquiry.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package tdproto
import "time"
const (
EnquiryTypeUnspecified EnquiryType = "ENQUIRY_TYPE_UNSPECIFIED"
EnquiryTypeRenewal EnquiryType = "ENQUIRY_TYPE_RENEWAL"
EnquiryTypeBasic EnquiryType = "ENQUIRY_TYPE_BASIC"
EnquiryTypeExtension EnquiryType = "ENQUIRY_TYPE_EXTENSION"
PaymentTypeUnspecified PaymentType = "PAYMENT_TYPE_UNSPECIFIED"
PaymentTypePaperDocumentManagement PaymentType = "PAYMENT_TYPE_PAPER_DOCUMENT_MANAGEMENT"
PaymentTypeElectronicDocumentManagement PaymentType = "PAYMENT_TYPE_ELECTRONIC_DOCUMENT_MANAGEMENT"
PaymentTypeBankCard PaymentType = "PAYMENT_TYPE_BANK_CARD"
PaymentTypeTechnical PaymentType = "PAYMENT_TYPE_TECHNICAL"
EnquiryStatusUnspecified EnquiryStatus = "ENQUIRY_STATUS_UNSPECIFIED"
EnquiryStatusWaiting EnquiryStatus = "ENQUIRY_STATUS_WAITING"
EnquiryStatusCancelled EnquiryStatus = "ENQUIRY_STATUS_CANCELLED"
EnquiryStatusActive EnquiryStatus = "ENQUIRY_STATUS_ACTIVE"
EnquiryStatusExpired EnquiryStatus = "ENQUIRY_STATUS_EXPIRED"
EnquiryStatusDone EnquiryStatus = "ENQUIRY_STATUS_DONE"
EnquiryPaymentStatusUnspecified EnquiryPaymentStatus = "ENQUIRY_PAYMENT_STATUS"
EnquiryPaymentStatusWaitingConfirmation EnquiryPaymentStatus = "ENQUIRY_PAYMENT_STATUS_WAITING_CONFIRMATION"
EnquiryPaymentStatusWaitingCrediting EnquiryPaymentStatus = "ENQUIRY_PAYMENT_STATUS_WAITING_CREDITING"
EnquiryPaymentStatusPaid EnquiryPaymentStatus = "ENQUIRY_PAYMENT_STATUS_PAID"
)
type EnquiryType string
type PaymentType string
type EnquiryStatus string
type EnquiryPaymentStatus string
type Enquiry struct {
Id string `json:"id"`
PersonalAccountId string `json:"personal_account_id"`
SelectableWorkplaceCount uint32 `json:"selectable_workplace_count"`
Amount float64 `json:"amount"`
TariffName string `json:"tariff_name"`
WorkplacePrice float64 `json:"workplace_price"`
PeriodDays uint32 `json:"period_days"`
FreeWorkplaceCount uint32 `json:"free_workplace_count"`
ActivationDate *time.Time `json:"activation_date,omitempty"`
DeactivationDate *time.Time `json:"deactivation_date,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
CreditedAt *time.Time `json:"credited_at,omitempty"`
ActuallyPaidAt *time.Time `json:"actually_paid_at,omitempty"`
FixationPaidAt *time.Time `json:"fixation_paid_at,omitempty"`
ExpirationDate *time.Time `json:"expiration_date,omitempty"`
ExpiredAt *time.Time `json:"expired_at,omitempty"`
ActivateAt *time.Time `json:"activate_at,omitempty"`
DeactivateAt *time.Time `json:"deactivate_at,omitempty"`
EnquiryType EnquiryType `json:"enquiry_type"`
Status EnquiryStatus `json:"status"`
PaymentStatus EnquiryPaymentStatus `json:"payment_status"`
PaymentType PaymentType `json:"payment_type"`
FileName string `json:"file_name,omitempty"`
MediaUrl string `json:"media_url,omitempty"`
}
type EnquiryCreateRequest struct {
SelectableTariffId string `json:"selectable_tariff_id"`
SelectableWorkplaceCount uint32 `json:"selectable_workplace_count"`
CounterpartyId string `json:"counterparty_id"`
}
type EnquiryCreateResponse struct {
Enquiry
}
type EnquiryGetListRequest struct {
DateCreateFrom *time.Time `json:"date_create_from,omitempty"`
DateCreateTo *time.Time `json:"date_create_to,omitempty"`
DateActivateTo *time.Time `json:"date_activate_to,omitempty"`
DateDeactivateTo *time.Time `json:"date_deactivate_to,omitempty"`
Status EnquiryStatus `json:"status,omitempty"`
Limit *uint32 `json:"limit,omitempty"`
Offset *uint32 `json:"offset,omitempty"`
}
type EnquiryGetListResponse struct {
PaginatedBillingEnquiries
}