-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplantuml_gist.puml
189 lines (189 loc) · 6.12 KB
/
plantuml_gist.puml
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
@startuml class-diagram
class "Settings" as Settings {
{static} +init()
{static} +admin_init()
{static} +render_section(args)
{static} +render_fields(args)
{static} +sanitize_text_field(fields)
}
class "Option" as Option {
+value : string
+__construct(key)
+get()
}
class "Plugin" as Plugin {
-file : string
-__construct(file)
{static} +init(file)
+plugins_loaded()
+block_init()
+dirname(path)
+plugin_dir_url()
}
class "AdminWidget" as AdminWidget {
#api_status_service : ApiStatusService
+__construct(api_status_service)
{static} +init(api_status_service)
+add_dashboard_widget()
+render()
}
class "OptionsPage" as OptionsPage {
{static} +init()
{static} +admin_menu()
{static} +render_page()
{static} +add_settings_error(arr)
}
package Integration as Integration {
class "EstimatedPrice" as Integration_EstimatedPrice {
+set(amount, currency_from, currency_to)
+get()
}
enum "EndpointMethods" as Integration_EndpointMethods {
}
class "Payment" as Integration_Payment {
+set(price_amount, price_currency, pay_currency, optional_params)
+post()
}
class "AvailableCurrencies" as Integration_AvailableCurrencies {
+get()
}
class "MinimumPaymentAmount" as Integration_MinimumPaymentAmount {
+set(currency_from, currency_to)
+get()
}
class "ApiStatus" as Integration_ApiStatus {
+get()
}
class "PaymentStatus" as Integration_PaymentStatus {
+set(payment_id)
+get()
}
}
package Logs as Logs {
class "StructuredLogsFormatter" as Logs_StructuredLogsFormatter {
+format(record)
}
class "ApplicationLogs" as Logs_ApplicationLogs {
#logger : LoggerInterface
-__construct(logger)
{static} +init(logger)
+http_api_debug(response, context, transport, parsed_args, url)
}
}
package Services as Services {
class "ApiStatusService" as Services_ApiStatusService {
-api_status : ApiStatus
+__construct(api_status)
+get_data()
}
class "AvailableCurrenciesService" as Services_AvailableCurrenciesService {
-available_currencies : AvailableCurrencies
+__construct(available_currencies)
#get_data()
+is_available(currency)
}
}
package Rest as Rest {
interface "EndpointGetInterface" as Rest_EndpointGetInterface {
+get()
}
class "Response" as Rest_Response {
#response : string[]
+__construct(response)
+get()
}
interface "EndpointInterface" as Rest_EndpointInterface {
+get_client()
}
interface "EndpointPostInterface" as Rest_EndpointPostInterface {
+post()
}
class "Error" as Rest_Error {
#error : WP_Error
+__construct(error)
+get()
}
class "Endpoint" as Rest_Endpoint {
-header : string[]
-body : string[]
#client : Client
+__construct(client)
+get_client()
#get_headers()
#set_header(params)
#get_body()
#set_body(params)
+__call(name, arguments)
}
class "Api" as Rest_Api {
-environment : string
-__construct(environment)
{static} +create()
+get_service_url()
+get(method)
+info()
}
interface "ResponseInterface" as Rest_ResponseInterface {
+get()
}
class "Client" as Rest_Client {
-service : Api
+__construct(service)
+get_service()
+get(endpoint, body, headers)
+post(endpoint, body, headers)
}
}
AdminWidget ..> AdminWidget
AdminWidget ..> Services_ApiStatusService
Integration_ApiStatus ..> Integration_EndpointMethods
Integration_ApiStatus ..> Rest_ResponseInterface
Integration_AvailableCurrencies ..> Integration_EndpointMethods
Integration_AvailableCurrencies ..> Rest_ResponseInterface
Integration_EstimatedPrice ..> Integration_EndpointMethods
Integration_EstimatedPrice ..> Rest_EndpointGetInterface
Integration_EstimatedPrice ..> Rest_ResponseInterface
Integration_MinimumPaymentAmount ..> Integration_EndpointMethods
Integration_MinimumPaymentAmount ..> Rest_EndpointGetInterface
Integration_MinimumPaymentAmount ..> Rest_ResponseInterface
Integration_Payment ..> Integration_EndpointMethods
Integration_Payment ..> Rest_EndpointPostInterface
Integration_Payment ..> Rest_ResponseInterface
Integration_PaymentStatus ..> Integration_EndpointMethods
Integration_PaymentStatus ..> Rest_EndpointGetInterface
Integration_PaymentStatus ..> Rest_ResponseInterface
Logs_ApplicationLogs ..> Logs_ApplicationLogs
OptionsPage ..> Plugin
OptionsPage ..> Settings
Plugin ..> Plugin
Rest_Api ..> Rest_Api
Rest_Client ..> Rest_Api
Rest_Client ..> Rest_Error
Rest_Client ..> Rest_Response
Rest_Client ..> Rest_ResponseInterface
Rest_Endpoint ..> Option
Rest_Endpoint ..> Rest_Client
Rest_Endpoint ..> Settings
Rest_Endpoint <|-- Integration_ApiStatus
Rest_Endpoint <|-- Integration_AvailableCurrencies
Rest_Endpoint <|-- Integration_EstimatedPrice
Rest_Endpoint <|-- Integration_MinimumPaymentAmount
Rest_Endpoint <|-- Integration_Payment
Rest_Endpoint <|-- Integration_PaymentStatus
Rest_EndpointGetInterface ..> Rest_ResponseInterface
Rest_EndpointGetInterface <|-- Integration_ApiStatus
Rest_EndpointGetInterface <|-- Integration_AvailableCurrencies
Rest_EndpointGetInterface <|-- Integration_EstimatedPrice
Rest_EndpointGetInterface <|-- Integration_MinimumPaymentAmount
Rest_EndpointGetInterface <|-- Integration_PaymentStatus
Rest_EndpointInterface ..> Rest_Client
Rest_EndpointInterface <|-- Rest_Endpoint
Rest_EndpointPostInterface ..> Rest_ResponseInterface
Rest_EndpointPostInterface <|-- Integration_Payment
Rest_ResponseInterface <|-- Rest_Error
Rest_ResponseInterface <|-- Rest_Response
Services_ApiStatusService ..> Integration_ApiStatus
Services_AvailableCurrenciesService ..> Integration_AvailableCurrencies
Settings ..> Option
Settings ..> OptionsPage
@enduml