winrt-Windows.ApplicationModel.Payments.Provider 2.0.0b1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/PKG-INFO +22 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/README.md +7 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/all-requirements.txt +5 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/py.Windows.ApplicationModel.Payments.Provider.cpp +892 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/pyproject.toml +43 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/pywinrt-version.txt +1 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/requirements.txt +3 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/setup.cfg +4 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/setup.py +17 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/winrt/_winrt_windows_applicationmodel_payments_provider.pyi +65 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/winrt/windows/applicationmodel/payments/provider/__init__.py +16 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/winrt_Windows.ApplicationModel.Payments.Provider.egg-info/PKG-INFO +22 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/winrt_Windows.ApplicationModel.Payments.Provider.egg-info/SOURCES.txt +14 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/winrt_Windows.ApplicationModel.Payments.Provider.egg-info/dependency_links.txt +1 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/winrt_Windows.ApplicationModel.Payments.Provider.egg-info/requires.txt +6 -0
- winrt-Windows.ApplicationModel.Payments.Provider-2.0.0b1/winrt_Windows.ApplicationModel.Payments.Provider.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: winrt-Windows.ApplicationModel.Payments.Provider
|
|
3
|
+
Version: 2.0.0b1
|
|
4
|
+
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Repository, https://github.com/pywrint/pywrinrt
|
|
7
|
+
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
|
|
8
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Requires-Python: <3.13,>=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Provides-Extra: all
|
|
15
|
+
|
|
16
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
17
|
+
|
|
18
|
+
# winrt-Windows.ApplicationModel.Payments.Provider
|
|
19
|
+
|
|
20
|
+
Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.Payments.Provider` namespace.
|
|
21
|
+
|
|
22
|
+
This package provides the `winrt.windows.applicationmodel.payments.provider` module.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
2
|
+
|
|
3
|
+
# winrt-Windows.ApplicationModel.Payments.Provider
|
|
4
|
+
|
|
5
|
+
Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.Payments.Provider` namespace.
|
|
6
|
+
|
|
7
|
+
This package provides the `winrt.windows.applicationmodel.payments.provider` module.
|
|
@@ -0,0 +1,892 @@
|
|
|
1
|
+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
|
|
2
|
+
|
|
3
|
+
#include "py.Windows.ApplicationModel.Payments.Provider.h"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
namespace py::cpp::Windows::ApplicationModel::Payments::Provider
|
|
7
|
+
{
|
|
8
|
+
// ----- PaymentAppCanMakePaymentTriggerDetails class --------------------
|
|
9
|
+
|
|
10
|
+
static PyObject* _new_PaymentAppCanMakePaymentTriggerDetails(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
11
|
+
{
|
|
12
|
+
static_assert(py::py_type<winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppCanMakePaymentTriggerDetails>::type_name);
|
|
13
|
+
py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppCanMakePaymentTriggerDetails>::type_name);
|
|
14
|
+
return nullptr;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static void _dealloc_PaymentAppCanMakePaymentTriggerDetails(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentAppCanMakePaymentTriggerDetails* self) noexcept
|
|
18
|
+
{
|
|
19
|
+
auto tp = Py_TYPE(self);
|
|
20
|
+
std::destroy_at(&self->obj);
|
|
21
|
+
tp->tp_free(self);
|
|
22
|
+
Py_DECREF(tp);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static PyObject* PaymentAppCanMakePaymentTriggerDetails_ReportCanMakePaymentResult(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentAppCanMakePaymentTriggerDetails* self, PyObject* args) noexcept
|
|
26
|
+
{
|
|
27
|
+
auto arg_count = PyTuple_Size(args);
|
|
28
|
+
|
|
29
|
+
if (arg_count == 1)
|
|
30
|
+
{
|
|
31
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentAppCanMakePaymentTriggerDetails", L"ReportCanMakePaymentResult", 1))
|
|
32
|
+
{
|
|
33
|
+
py::set_arg_count_version_error(1);
|
|
34
|
+
return nullptr;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
try
|
|
38
|
+
{
|
|
39
|
+
auto param0 = py::convert_to<winrt::Windows::ApplicationModel::Payments::PaymentCanMakePaymentResult>(args, 0);
|
|
40
|
+
|
|
41
|
+
self->obj.ReportCanMakePaymentResult(param0);
|
|
42
|
+
Py_RETURN_NONE;
|
|
43
|
+
}
|
|
44
|
+
catch (...)
|
|
45
|
+
{
|
|
46
|
+
py::to_PyErr();
|
|
47
|
+
return nullptr;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else
|
|
51
|
+
{
|
|
52
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
53
|
+
return nullptr;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
static PyObject* PaymentAppCanMakePaymentTriggerDetails_get_Request(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentAppCanMakePaymentTriggerDetails* self, void* /*unused*/) noexcept
|
|
58
|
+
{
|
|
59
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentAppCanMakePaymentTriggerDetails", L"Request"))
|
|
60
|
+
{
|
|
61
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
62
|
+
return nullptr;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
try
|
|
66
|
+
{
|
|
67
|
+
return py::convert(self->obj.Request());
|
|
68
|
+
}
|
|
69
|
+
catch (...)
|
|
70
|
+
{
|
|
71
|
+
py::to_PyErr();
|
|
72
|
+
return nullptr;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
static PyObject* _assign_array_PaymentAppCanMakePaymentTriggerDetails(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
77
|
+
{
|
|
78
|
+
auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppCanMakePaymentTriggerDetails>>();
|
|
79
|
+
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
80
|
+
{
|
|
81
|
+
return nullptr;
|
|
82
|
+
}
|
|
83
|
+
Py_RETURN_NONE;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
static PyObject* _from_PaymentAppCanMakePaymentTriggerDetails(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
87
|
+
{
|
|
88
|
+
try
|
|
89
|
+
{
|
|
90
|
+
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
91
|
+
return py::convert(return_value.as<winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppCanMakePaymentTriggerDetails>());
|
|
92
|
+
}
|
|
93
|
+
catch (...)
|
|
94
|
+
{
|
|
95
|
+
py::to_PyErr();
|
|
96
|
+
return nullptr;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
static PyMethodDef _methods_PaymentAppCanMakePaymentTriggerDetails[] = {
|
|
101
|
+
{ "report_can_make_payment_result", reinterpret_cast<PyCFunction>(PaymentAppCanMakePaymentTriggerDetails_ReportCanMakePaymentResult), METH_VARARGS, nullptr },
|
|
102
|
+
{ "_assign_array_", _assign_array_PaymentAppCanMakePaymentTriggerDetails, METH_O | METH_STATIC, nullptr },
|
|
103
|
+
{ "_from", reinterpret_cast<PyCFunction>(_from_PaymentAppCanMakePaymentTriggerDetails), METH_O | METH_STATIC, nullptr },
|
|
104
|
+
{ }
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
static PyGetSetDef _getset_PaymentAppCanMakePaymentTriggerDetails[] = {
|
|
108
|
+
{ "request", reinterpret_cast<getter>(PaymentAppCanMakePaymentTriggerDetails_get_Request), nullptr, nullptr, nullptr },
|
|
109
|
+
{ }
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
static PyType_Slot _type_slots_PaymentAppCanMakePaymentTriggerDetails[] =
|
|
113
|
+
{
|
|
114
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_PaymentAppCanMakePaymentTriggerDetails) },
|
|
115
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PaymentAppCanMakePaymentTriggerDetails) },
|
|
116
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_PaymentAppCanMakePaymentTriggerDetails) },
|
|
117
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_PaymentAppCanMakePaymentTriggerDetails) },
|
|
118
|
+
{ },
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
static PyType_Spec type_spec_PaymentAppCanMakePaymentTriggerDetails =
|
|
122
|
+
{
|
|
123
|
+
"winrt._winrt_windows_applicationmodel_payments_provider.PaymentAppCanMakePaymentTriggerDetails",
|
|
124
|
+
sizeof(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentAppCanMakePaymentTriggerDetails),
|
|
125
|
+
0,
|
|
126
|
+
Py_TPFLAGS_DEFAULT,
|
|
127
|
+
_type_slots_PaymentAppCanMakePaymentTriggerDetails
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// ----- PaymentAppManager class --------------------
|
|
131
|
+
|
|
132
|
+
static PyObject* _new_PaymentAppManager(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
133
|
+
{
|
|
134
|
+
static_assert(py::py_type<winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppManager>::type_name);
|
|
135
|
+
py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppManager>::type_name);
|
|
136
|
+
return nullptr;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
static void _dealloc_PaymentAppManager(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentAppManager* self) noexcept
|
|
140
|
+
{
|
|
141
|
+
auto tp = Py_TYPE(self);
|
|
142
|
+
std::destroy_at(&self->obj);
|
|
143
|
+
tp->tp_free(self);
|
|
144
|
+
Py_DECREF(tp);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
static PyObject* PaymentAppManager_RegisterAsync(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentAppManager* self, PyObject* args) noexcept
|
|
148
|
+
{
|
|
149
|
+
auto arg_count = PyTuple_Size(args);
|
|
150
|
+
|
|
151
|
+
if (arg_count == 1)
|
|
152
|
+
{
|
|
153
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentAppManager", L"RegisterAsync", 1))
|
|
154
|
+
{
|
|
155
|
+
py::set_arg_count_version_error(1);
|
|
156
|
+
return nullptr;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
try
|
|
160
|
+
{
|
|
161
|
+
auto param0 = py::convert_to<winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>>(args, 0);
|
|
162
|
+
|
|
163
|
+
return py::convert(self->obj.RegisterAsync(param0));
|
|
164
|
+
}
|
|
165
|
+
catch (...)
|
|
166
|
+
{
|
|
167
|
+
py::to_PyErr();
|
|
168
|
+
return nullptr;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
else
|
|
172
|
+
{
|
|
173
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
174
|
+
return nullptr;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
static PyObject* PaymentAppManager_UnregisterAsync(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentAppManager* self, PyObject* args) noexcept
|
|
179
|
+
{
|
|
180
|
+
auto arg_count = PyTuple_Size(args);
|
|
181
|
+
|
|
182
|
+
if (arg_count == 0)
|
|
183
|
+
{
|
|
184
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentAppManager", L"UnregisterAsync", 0))
|
|
185
|
+
{
|
|
186
|
+
py::set_arg_count_version_error(0);
|
|
187
|
+
return nullptr;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
try
|
|
191
|
+
{
|
|
192
|
+
return py::convert(self->obj.UnregisterAsync());
|
|
193
|
+
}
|
|
194
|
+
catch (...)
|
|
195
|
+
{
|
|
196
|
+
py::to_PyErr();
|
|
197
|
+
return nullptr;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
else
|
|
201
|
+
{
|
|
202
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
203
|
+
return nullptr;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
static PyObject* PaymentAppManager_get_Current(PyObject* /*unused*/, void* /*unused*/) noexcept
|
|
208
|
+
{
|
|
209
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentAppManager", L"Current"))
|
|
210
|
+
{
|
|
211
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
212
|
+
return nullptr;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
try
|
|
216
|
+
{
|
|
217
|
+
return py::convert(winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppManager::Current());
|
|
218
|
+
}
|
|
219
|
+
catch (...)
|
|
220
|
+
{
|
|
221
|
+
py::to_PyErr();
|
|
222
|
+
return nullptr;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
static PyObject* _assign_array_PaymentAppManager(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
227
|
+
{
|
|
228
|
+
auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppManager>>();
|
|
229
|
+
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
230
|
+
{
|
|
231
|
+
return nullptr;
|
|
232
|
+
}
|
|
233
|
+
Py_RETURN_NONE;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
static PyObject* _from_PaymentAppManager(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
237
|
+
{
|
|
238
|
+
try
|
|
239
|
+
{
|
|
240
|
+
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
241
|
+
return py::convert(return_value.as<winrt::Windows::ApplicationModel::Payments::Provider::PaymentAppManager>());
|
|
242
|
+
}
|
|
243
|
+
catch (...)
|
|
244
|
+
{
|
|
245
|
+
py::to_PyErr();
|
|
246
|
+
return nullptr;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
static PyMethodDef _methods_PaymentAppManager[] = {
|
|
251
|
+
{ "register_async", reinterpret_cast<PyCFunction>(PaymentAppManager_RegisterAsync), METH_VARARGS, nullptr },
|
|
252
|
+
{ "unregister_async", reinterpret_cast<PyCFunction>(PaymentAppManager_UnregisterAsync), METH_VARARGS, nullptr },
|
|
253
|
+
{ "_assign_array_", _assign_array_PaymentAppManager, METH_O | METH_STATIC, nullptr },
|
|
254
|
+
{ "_from", reinterpret_cast<PyCFunction>(_from_PaymentAppManager), METH_O | METH_STATIC, nullptr },
|
|
255
|
+
{ }
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
static PyGetSetDef _getset_PaymentAppManager[] = {
|
|
259
|
+
{ }
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
static PyType_Slot _type_slots_PaymentAppManager[] =
|
|
263
|
+
{
|
|
264
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_PaymentAppManager) },
|
|
265
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PaymentAppManager) },
|
|
266
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_PaymentAppManager) },
|
|
267
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_PaymentAppManager) },
|
|
268
|
+
{ },
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
static PyType_Spec type_spec_PaymentAppManager =
|
|
272
|
+
{
|
|
273
|
+
"winrt._winrt_windows_applicationmodel_payments_provider.PaymentAppManager",
|
|
274
|
+
sizeof(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentAppManager),
|
|
275
|
+
0,
|
|
276
|
+
Py_TPFLAGS_DEFAULT,
|
|
277
|
+
_type_slots_PaymentAppManager
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
static PyGetSetDef getset_PaymentAppManager_Static[] = {
|
|
281
|
+
{ "current", reinterpret_cast<getter>(PaymentAppManager_get_Current), nullptr, nullptr, nullptr },
|
|
282
|
+
{ }
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
static PyMethodDef methods_PaymentAppManager_Static[] = {
|
|
286
|
+
{ }
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
static PyType_Slot type_slots_PaymentAppManager_Static[] =
|
|
290
|
+
{
|
|
291
|
+
{ Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
|
|
292
|
+
{ Py_tp_getset, reinterpret_cast<void*>(getset_PaymentAppManager_Static) },
|
|
293
|
+
{ Py_tp_methods, reinterpret_cast<void*>(methods_PaymentAppManager_Static) },
|
|
294
|
+
{ }
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
static PyType_Spec type_spec_PaymentAppManager_Static =
|
|
298
|
+
{
|
|
299
|
+
"winrt._winrt_windows_applicationmodel_payments_provider.PaymentAppManager_Static",
|
|
300
|
+
static_cast<int>(PyType_Type.tp_basicsize),
|
|
301
|
+
static_cast<int>(PyType_Type.tp_itemsize),
|
|
302
|
+
Py_TPFLAGS_DEFAULT,
|
|
303
|
+
type_slots_PaymentAppManager_Static
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
// ----- PaymentTransaction class --------------------
|
|
307
|
+
|
|
308
|
+
static PyObject* _new_PaymentTransaction(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
309
|
+
{
|
|
310
|
+
static_assert(py::py_type<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransaction>::type_name);
|
|
311
|
+
py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransaction>::type_name);
|
|
312
|
+
return nullptr;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
static void _dealloc_PaymentTransaction(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction* self) noexcept
|
|
316
|
+
{
|
|
317
|
+
auto tp = Py_TYPE(self);
|
|
318
|
+
std::destroy_at(&self->obj);
|
|
319
|
+
tp->tp_free(self);
|
|
320
|
+
Py_DECREF(tp);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
static PyObject* PaymentTransaction_AcceptAsync(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction* self, PyObject* args) noexcept
|
|
324
|
+
{
|
|
325
|
+
auto arg_count = PyTuple_Size(args);
|
|
326
|
+
|
|
327
|
+
if (arg_count == 1)
|
|
328
|
+
{
|
|
329
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransaction", L"AcceptAsync", 1))
|
|
330
|
+
{
|
|
331
|
+
py::set_arg_count_version_error(1);
|
|
332
|
+
return nullptr;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
try
|
|
336
|
+
{
|
|
337
|
+
auto param0 = py::convert_to<winrt::Windows::ApplicationModel::Payments::PaymentToken>(args, 0);
|
|
338
|
+
|
|
339
|
+
return py::convert(self->obj.AcceptAsync(param0));
|
|
340
|
+
}
|
|
341
|
+
catch (...)
|
|
342
|
+
{
|
|
343
|
+
py::to_PyErr();
|
|
344
|
+
return nullptr;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
else
|
|
348
|
+
{
|
|
349
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
350
|
+
return nullptr;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
static PyObject* PaymentTransaction_FromIdAsync(PyObject* /*unused*/, PyObject* args) noexcept
|
|
355
|
+
{
|
|
356
|
+
auto arg_count = PyTuple_Size(args);
|
|
357
|
+
|
|
358
|
+
if (arg_count == 1)
|
|
359
|
+
{
|
|
360
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransaction", L"FromIdAsync", 1))
|
|
361
|
+
{
|
|
362
|
+
py::set_arg_count_version_error(1);
|
|
363
|
+
return nullptr;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
try
|
|
367
|
+
{
|
|
368
|
+
auto param0 = py::convert_to<winrt::hstring>(args, 0);
|
|
369
|
+
|
|
370
|
+
return py::convert(winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransaction::FromIdAsync(param0));
|
|
371
|
+
}
|
|
372
|
+
catch (...)
|
|
373
|
+
{
|
|
374
|
+
py::to_PyErr();
|
|
375
|
+
return nullptr;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
else
|
|
379
|
+
{
|
|
380
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
381
|
+
return nullptr;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
static PyObject* PaymentTransaction_Reject(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction* self, PyObject* args) noexcept
|
|
386
|
+
{
|
|
387
|
+
auto arg_count = PyTuple_Size(args);
|
|
388
|
+
|
|
389
|
+
if (arg_count == 0)
|
|
390
|
+
{
|
|
391
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransaction", L"Reject", 0))
|
|
392
|
+
{
|
|
393
|
+
py::set_arg_count_version_error(0);
|
|
394
|
+
return nullptr;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
try
|
|
398
|
+
{
|
|
399
|
+
self->obj.Reject();
|
|
400
|
+
Py_RETURN_NONE;
|
|
401
|
+
}
|
|
402
|
+
catch (...)
|
|
403
|
+
{
|
|
404
|
+
py::to_PyErr();
|
|
405
|
+
return nullptr;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
else
|
|
409
|
+
{
|
|
410
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
411
|
+
return nullptr;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
static PyObject* PaymentTransaction_UpdateSelectedShippingOptionAsync(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction* self, PyObject* args) noexcept
|
|
416
|
+
{
|
|
417
|
+
auto arg_count = PyTuple_Size(args);
|
|
418
|
+
|
|
419
|
+
if (arg_count == 1)
|
|
420
|
+
{
|
|
421
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransaction", L"UpdateSelectedShippingOptionAsync", 1))
|
|
422
|
+
{
|
|
423
|
+
py::set_arg_count_version_error(1);
|
|
424
|
+
return nullptr;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
try
|
|
428
|
+
{
|
|
429
|
+
auto param0 = py::convert_to<winrt::Windows::ApplicationModel::Payments::PaymentShippingOption>(args, 0);
|
|
430
|
+
|
|
431
|
+
return py::convert(self->obj.UpdateSelectedShippingOptionAsync(param0));
|
|
432
|
+
}
|
|
433
|
+
catch (...)
|
|
434
|
+
{
|
|
435
|
+
py::to_PyErr();
|
|
436
|
+
return nullptr;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
else
|
|
440
|
+
{
|
|
441
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
442
|
+
return nullptr;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
static PyObject* PaymentTransaction_UpdateShippingAddressAsync(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction* self, PyObject* args) noexcept
|
|
447
|
+
{
|
|
448
|
+
auto arg_count = PyTuple_Size(args);
|
|
449
|
+
|
|
450
|
+
if (arg_count == 1)
|
|
451
|
+
{
|
|
452
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransaction", L"UpdateShippingAddressAsync", 1))
|
|
453
|
+
{
|
|
454
|
+
py::set_arg_count_version_error(1);
|
|
455
|
+
return nullptr;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
try
|
|
459
|
+
{
|
|
460
|
+
auto param0 = py::convert_to<winrt::Windows::ApplicationModel::Payments::PaymentAddress>(args, 0);
|
|
461
|
+
|
|
462
|
+
return py::convert(self->obj.UpdateShippingAddressAsync(param0));
|
|
463
|
+
}
|
|
464
|
+
catch (...)
|
|
465
|
+
{
|
|
466
|
+
py::to_PyErr();
|
|
467
|
+
return nullptr;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
else
|
|
471
|
+
{
|
|
472
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
473
|
+
return nullptr;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
static PyObject* PaymentTransaction_get_PayerPhoneNumber(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction* self, void* /*unused*/) noexcept
|
|
478
|
+
{
|
|
479
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransaction", L"PayerPhoneNumber"))
|
|
480
|
+
{
|
|
481
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
482
|
+
return nullptr;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
try
|
|
486
|
+
{
|
|
487
|
+
return py::convert(self->obj.PayerPhoneNumber());
|
|
488
|
+
}
|
|
489
|
+
catch (...)
|
|
490
|
+
{
|
|
491
|
+
py::to_PyErr();
|
|
492
|
+
return nullptr;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
static int PaymentTransaction_put_PayerPhoneNumber(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction* self, PyObject* arg, void* /*unused*/) noexcept
|
|
497
|
+
{
|
|
498
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransaction", L"PayerPhoneNumber"))
|
|
499
|
+
{
|
|
500
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
501
|
+
return -1;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
if (arg == nullptr)
|
|
505
|
+
{
|
|
506
|
+
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
507
|
+
return -1;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
try
|
|
511
|
+
{
|
|
512
|
+
auto param0 = py::convert_to<winrt::hstring>(arg);
|
|
513
|
+
|
|
514
|
+
self->obj.PayerPhoneNumber(param0);
|
|
515
|
+
return 0;
|
|
516
|
+
}
|
|
517
|
+
catch (...)
|
|
518
|
+
{
|
|
519
|
+
py::to_PyErr();
|
|
520
|
+
return -1;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
static PyObject* PaymentTransaction_get_PayerName(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction* self, void* /*unused*/) noexcept
|
|
525
|
+
{
|
|
526
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransaction", L"PayerName"))
|
|
527
|
+
{
|
|
528
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
529
|
+
return nullptr;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
try
|
|
533
|
+
{
|
|
534
|
+
return py::convert(self->obj.PayerName());
|
|
535
|
+
}
|
|
536
|
+
catch (...)
|
|
537
|
+
{
|
|
538
|
+
py::to_PyErr();
|
|
539
|
+
return nullptr;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
static int PaymentTransaction_put_PayerName(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction* self, PyObject* arg, void* /*unused*/) noexcept
|
|
544
|
+
{
|
|
545
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransaction", L"PayerName"))
|
|
546
|
+
{
|
|
547
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
548
|
+
return -1;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
if (arg == nullptr)
|
|
552
|
+
{
|
|
553
|
+
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
554
|
+
return -1;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
try
|
|
558
|
+
{
|
|
559
|
+
auto param0 = py::convert_to<winrt::hstring>(arg);
|
|
560
|
+
|
|
561
|
+
self->obj.PayerName(param0);
|
|
562
|
+
return 0;
|
|
563
|
+
}
|
|
564
|
+
catch (...)
|
|
565
|
+
{
|
|
566
|
+
py::to_PyErr();
|
|
567
|
+
return -1;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
static PyObject* PaymentTransaction_get_PayerEmail(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction* self, void* /*unused*/) noexcept
|
|
572
|
+
{
|
|
573
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransaction", L"PayerEmail"))
|
|
574
|
+
{
|
|
575
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
576
|
+
return nullptr;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
try
|
|
580
|
+
{
|
|
581
|
+
return py::convert(self->obj.PayerEmail());
|
|
582
|
+
}
|
|
583
|
+
catch (...)
|
|
584
|
+
{
|
|
585
|
+
py::to_PyErr();
|
|
586
|
+
return nullptr;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
static int PaymentTransaction_put_PayerEmail(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction* self, PyObject* arg, void* /*unused*/) noexcept
|
|
591
|
+
{
|
|
592
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransaction", L"PayerEmail"))
|
|
593
|
+
{
|
|
594
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
595
|
+
return -1;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
if (arg == nullptr)
|
|
599
|
+
{
|
|
600
|
+
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
601
|
+
return -1;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
try
|
|
605
|
+
{
|
|
606
|
+
auto param0 = py::convert_to<winrt::hstring>(arg);
|
|
607
|
+
|
|
608
|
+
self->obj.PayerEmail(param0);
|
|
609
|
+
return 0;
|
|
610
|
+
}
|
|
611
|
+
catch (...)
|
|
612
|
+
{
|
|
613
|
+
py::to_PyErr();
|
|
614
|
+
return -1;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
static PyObject* PaymentTransaction_get_PaymentRequest(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction* self, void* /*unused*/) noexcept
|
|
619
|
+
{
|
|
620
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransaction", L"PaymentRequest"))
|
|
621
|
+
{
|
|
622
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
623
|
+
return nullptr;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
try
|
|
627
|
+
{
|
|
628
|
+
return py::convert(self->obj.PaymentRequest());
|
|
629
|
+
}
|
|
630
|
+
catch (...)
|
|
631
|
+
{
|
|
632
|
+
py::to_PyErr();
|
|
633
|
+
return nullptr;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
static PyObject* _assign_array_PaymentTransaction(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
638
|
+
{
|
|
639
|
+
auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransaction>>();
|
|
640
|
+
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
641
|
+
{
|
|
642
|
+
return nullptr;
|
|
643
|
+
}
|
|
644
|
+
Py_RETURN_NONE;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
static PyObject* _from_PaymentTransaction(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
648
|
+
{
|
|
649
|
+
try
|
|
650
|
+
{
|
|
651
|
+
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
652
|
+
return py::convert(return_value.as<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransaction>());
|
|
653
|
+
}
|
|
654
|
+
catch (...)
|
|
655
|
+
{
|
|
656
|
+
py::to_PyErr();
|
|
657
|
+
return nullptr;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
static PyMethodDef _methods_PaymentTransaction[] = {
|
|
662
|
+
{ "accept_async", reinterpret_cast<PyCFunction>(PaymentTransaction_AcceptAsync), METH_VARARGS, nullptr },
|
|
663
|
+
{ "reject", reinterpret_cast<PyCFunction>(PaymentTransaction_Reject), METH_VARARGS, nullptr },
|
|
664
|
+
{ "update_selected_shipping_option_async", reinterpret_cast<PyCFunction>(PaymentTransaction_UpdateSelectedShippingOptionAsync), METH_VARARGS, nullptr },
|
|
665
|
+
{ "update_shipping_address_async", reinterpret_cast<PyCFunction>(PaymentTransaction_UpdateShippingAddressAsync), METH_VARARGS, nullptr },
|
|
666
|
+
{ "_assign_array_", _assign_array_PaymentTransaction, METH_O | METH_STATIC, nullptr },
|
|
667
|
+
{ "_from", reinterpret_cast<PyCFunction>(_from_PaymentTransaction), METH_O | METH_STATIC, nullptr },
|
|
668
|
+
{ }
|
|
669
|
+
};
|
|
670
|
+
|
|
671
|
+
static PyGetSetDef _getset_PaymentTransaction[] = {
|
|
672
|
+
{ "payer_phone_number", reinterpret_cast<getter>(PaymentTransaction_get_PayerPhoneNumber), reinterpret_cast<setter>(PaymentTransaction_put_PayerPhoneNumber), nullptr, nullptr },
|
|
673
|
+
{ "payer_name", reinterpret_cast<getter>(PaymentTransaction_get_PayerName), reinterpret_cast<setter>(PaymentTransaction_put_PayerName), nullptr, nullptr },
|
|
674
|
+
{ "payer_email", reinterpret_cast<getter>(PaymentTransaction_get_PayerEmail), reinterpret_cast<setter>(PaymentTransaction_put_PayerEmail), nullptr, nullptr },
|
|
675
|
+
{ "payment_request", reinterpret_cast<getter>(PaymentTransaction_get_PaymentRequest), nullptr, nullptr, nullptr },
|
|
676
|
+
{ }
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
static PyType_Slot _type_slots_PaymentTransaction[] =
|
|
680
|
+
{
|
|
681
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_PaymentTransaction) },
|
|
682
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PaymentTransaction) },
|
|
683
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_PaymentTransaction) },
|
|
684
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_PaymentTransaction) },
|
|
685
|
+
{ },
|
|
686
|
+
};
|
|
687
|
+
|
|
688
|
+
static PyType_Spec type_spec_PaymentTransaction =
|
|
689
|
+
{
|
|
690
|
+
"winrt._winrt_windows_applicationmodel_payments_provider.PaymentTransaction",
|
|
691
|
+
sizeof(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransaction),
|
|
692
|
+
0,
|
|
693
|
+
Py_TPFLAGS_DEFAULT,
|
|
694
|
+
_type_slots_PaymentTransaction
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
static PyGetSetDef getset_PaymentTransaction_Static[] = {
|
|
698
|
+
{ }
|
|
699
|
+
};
|
|
700
|
+
|
|
701
|
+
static PyMethodDef methods_PaymentTransaction_Static[] = {
|
|
702
|
+
{ "from_id_async", reinterpret_cast<PyCFunction>(PaymentTransaction_FromIdAsync), METH_VARARGS, nullptr },
|
|
703
|
+
{ }
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
static PyType_Slot type_slots_PaymentTransaction_Static[] =
|
|
707
|
+
{
|
|
708
|
+
{ Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
|
|
709
|
+
{ Py_tp_getset, reinterpret_cast<void*>(getset_PaymentTransaction_Static) },
|
|
710
|
+
{ Py_tp_methods, reinterpret_cast<void*>(methods_PaymentTransaction_Static) },
|
|
711
|
+
{ }
|
|
712
|
+
};
|
|
713
|
+
|
|
714
|
+
static PyType_Spec type_spec_PaymentTransaction_Static =
|
|
715
|
+
{
|
|
716
|
+
"winrt._winrt_windows_applicationmodel_payments_provider.PaymentTransaction_Static",
|
|
717
|
+
static_cast<int>(PyType_Type.tp_basicsize),
|
|
718
|
+
static_cast<int>(PyType_Type.tp_itemsize),
|
|
719
|
+
Py_TPFLAGS_DEFAULT,
|
|
720
|
+
type_slots_PaymentTransaction_Static
|
|
721
|
+
};
|
|
722
|
+
|
|
723
|
+
// ----- PaymentTransactionAcceptResult class --------------------
|
|
724
|
+
|
|
725
|
+
static PyObject* _new_PaymentTransactionAcceptResult(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
726
|
+
{
|
|
727
|
+
static_assert(py::py_type<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransactionAcceptResult>::type_name);
|
|
728
|
+
py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransactionAcceptResult>::type_name);
|
|
729
|
+
return nullptr;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
static void _dealloc_PaymentTransactionAcceptResult(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransactionAcceptResult* self) noexcept
|
|
733
|
+
{
|
|
734
|
+
auto tp = Py_TYPE(self);
|
|
735
|
+
std::destroy_at(&self->obj);
|
|
736
|
+
tp->tp_free(self);
|
|
737
|
+
Py_DECREF(tp);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
static PyObject* PaymentTransactionAcceptResult_get_Status(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransactionAcceptResult* self, void* /*unused*/) noexcept
|
|
741
|
+
{
|
|
742
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Payments.Provider.PaymentTransactionAcceptResult", L"Status"))
|
|
743
|
+
{
|
|
744
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
745
|
+
return nullptr;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
try
|
|
749
|
+
{
|
|
750
|
+
return py::convert(self->obj.Status());
|
|
751
|
+
}
|
|
752
|
+
catch (...)
|
|
753
|
+
{
|
|
754
|
+
py::to_PyErr();
|
|
755
|
+
return nullptr;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
static PyObject* _assign_array_PaymentTransactionAcceptResult(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
760
|
+
{
|
|
761
|
+
auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransactionAcceptResult>>();
|
|
762
|
+
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
763
|
+
{
|
|
764
|
+
return nullptr;
|
|
765
|
+
}
|
|
766
|
+
Py_RETURN_NONE;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
static PyObject* _from_PaymentTransactionAcceptResult(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
770
|
+
{
|
|
771
|
+
try
|
|
772
|
+
{
|
|
773
|
+
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
774
|
+
return py::convert(return_value.as<winrt::Windows::ApplicationModel::Payments::Provider::PaymentTransactionAcceptResult>());
|
|
775
|
+
}
|
|
776
|
+
catch (...)
|
|
777
|
+
{
|
|
778
|
+
py::to_PyErr();
|
|
779
|
+
return nullptr;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
static PyMethodDef _methods_PaymentTransactionAcceptResult[] = {
|
|
784
|
+
{ "_assign_array_", _assign_array_PaymentTransactionAcceptResult, METH_O | METH_STATIC, nullptr },
|
|
785
|
+
{ "_from", reinterpret_cast<PyCFunction>(_from_PaymentTransactionAcceptResult), METH_O | METH_STATIC, nullptr },
|
|
786
|
+
{ }
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
static PyGetSetDef _getset_PaymentTransactionAcceptResult[] = {
|
|
790
|
+
{ "status", reinterpret_cast<getter>(PaymentTransactionAcceptResult_get_Status), nullptr, nullptr, nullptr },
|
|
791
|
+
{ }
|
|
792
|
+
};
|
|
793
|
+
|
|
794
|
+
static PyType_Slot _type_slots_PaymentTransactionAcceptResult[] =
|
|
795
|
+
{
|
|
796
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_PaymentTransactionAcceptResult) },
|
|
797
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PaymentTransactionAcceptResult) },
|
|
798
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_PaymentTransactionAcceptResult) },
|
|
799
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_PaymentTransactionAcceptResult) },
|
|
800
|
+
{ },
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
static PyType_Spec type_spec_PaymentTransactionAcceptResult =
|
|
804
|
+
{
|
|
805
|
+
"winrt._winrt_windows_applicationmodel_payments_provider.PaymentTransactionAcceptResult",
|
|
806
|
+
sizeof(py::wrapper::Windows::ApplicationModel::Payments::Provider::PaymentTransactionAcceptResult),
|
|
807
|
+
0,
|
|
808
|
+
Py_TPFLAGS_DEFAULT,
|
|
809
|
+
_type_slots_PaymentTransactionAcceptResult
|
|
810
|
+
};
|
|
811
|
+
|
|
812
|
+
// ----- Windows.ApplicationModel.Payments.Provider Initialization --------------------
|
|
813
|
+
PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::Payments::Provider");
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
static PyModuleDef module_def
|
|
817
|
+
= {PyModuleDef_HEAD_INIT,
|
|
818
|
+
"_winrt_windows_applicationmodel_payments_provider",
|
|
819
|
+
module_doc,
|
|
820
|
+
0,
|
|
821
|
+
nullptr,
|
|
822
|
+
nullptr,
|
|
823
|
+
nullptr,
|
|
824
|
+
nullptr,
|
|
825
|
+
nullptr};
|
|
826
|
+
|
|
827
|
+
} // py::cpp::Windows::ApplicationModel::Payments::Provider
|
|
828
|
+
|
|
829
|
+
PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_payments_provider(void) noexcept
|
|
830
|
+
{
|
|
831
|
+
using namespace py::cpp::Windows::ApplicationModel::Payments::Provider;
|
|
832
|
+
|
|
833
|
+
if (py::import_winrt_runtime() == -1)
|
|
834
|
+
{
|
|
835
|
+
return nullptr;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
py::pyobj_handle module{PyModule_Create(&module_def)};
|
|
839
|
+
|
|
840
|
+
if (!module)
|
|
841
|
+
{
|
|
842
|
+
return nullptr;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
auto object_type = py::get_object_type();
|
|
846
|
+
if (!object_type)
|
|
847
|
+
{
|
|
848
|
+
return nullptr;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
|
|
852
|
+
|
|
853
|
+
if (!object_bases)
|
|
854
|
+
{
|
|
855
|
+
return nullptr;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
if (py::register_python_type(module.get(), &type_spec_PaymentAppCanMakePaymentTriggerDetails, object_bases.get(), nullptr) == -1)
|
|
859
|
+
{
|
|
860
|
+
return nullptr;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
py::pyobj_handle type_PaymentAppManager_Static{PyType_FromSpec(&type_spec_PaymentAppManager_Static)};
|
|
864
|
+
if (!type_PaymentAppManager_Static)
|
|
865
|
+
{
|
|
866
|
+
return nullptr;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
if (py::register_python_type(module.get(), &type_spec_PaymentAppManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_PaymentAppManager_Static.get())) == -1)
|
|
870
|
+
{
|
|
871
|
+
return nullptr;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
py::pyobj_handle type_PaymentTransaction_Static{PyType_FromSpec(&type_spec_PaymentTransaction_Static)};
|
|
875
|
+
if (!type_PaymentTransaction_Static)
|
|
876
|
+
{
|
|
877
|
+
return nullptr;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
if (py::register_python_type(module.get(), &type_spec_PaymentTransaction, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_PaymentTransaction_Static.get())) == -1)
|
|
881
|
+
{
|
|
882
|
+
return nullptr;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
if (py::register_python_type(module.get(), &type_spec_PaymentTransactionAcceptResult, object_bases.get(), nullptr) == -1)
|
|
886
|
+
{
|
|
887
|
+
return nullptr;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
|
|
891
|
+
return module.detach();
|
|
892
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
[build-system]
|
|
4
|
+
requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
|
|
5
|
+
build-backend = "setuptools.build_meta"
|
|
6
|
+
|
|
7
|
+
[project]
|
|
8
|
+
name = "winrt-Windows.ApplicationModel.Payments.Provider"
|
|
9
|
+
description = "Python projection of Windows Runtime (WinRT) APIs"
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Operating System :: Microsoft :: Windows",
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
]
|
|
18
|
+
dynamic = ["version", "dependencies", "optional-dependencies"]
|
|
19
|
+
requires-python = ">=3.9,<3.13"
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
# Homepage = "https://github.com/pywrint/pywrinrt"
|
|
23
|
+
# Documentation = "https://readthedocs.org"
|
|
24
|
+
Repository = "https://github.com/pywrint/pywrinrt"
|
|
25
|
+
Changelog = "https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md"
|
|
26
|
+
|
|
27
|
+
[tool.setuptools.dynamic]
|
|
28
|
+
version = { file = "pywinrt-version.txt" }
|
|
29
|
+
dependencies = { file = "requirements.txt" }
|
|
30
|
+
optional-dependencies.all = { file = "all-requirements.txt" }
|
|
31
|
+
|
|
32
|
+
[tool.cibuildwheel]
|
|
33
|
+
# use local winrt-sdk build dependency
|
|
34
|
+
environment = { PYTHONPATH="../winrt-sdk/src" }
|
|
35
|
+
# don't install winrt-sdk from PyPI
|
|
36
|
+
build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
|
|
37
|
+
# don't build for PyPy
|
|
38
|
+
skip = "pp*"
|
|
39
|
+
# suppress warnings about ARM64 testing
|
|
40
|
+
test-skip = "*-win_arm64"
|
|
41
|
+
|
|
42
|
+
[tool.cibuildwheel.windows]
|
|
43
|
+
archs = ["x86", "AMD64", "ARM64"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.0.0-beta.1
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
from setuptools import Extension, setup
|
|
4
|
+
from winrt_sdk import get_include_dirs
|
|
5
|
+
|
|
6
|
+
setup(
|
|
7
|
+
ext_modules=[
|
|
8
|
+
Extension(
|
|
9
|
+
"winrt._winrt_windows_applicationmodel_payments_provider",
|
|
10
|
+
sources=["py.Windows.ApplicationModel.Payments.Provider.cpp"],
|
|
11
|
+
include_dirs=get_include_dirs(),
|
|
12
|
+
extra_compile_args=["/std:c++20", "/permissive-"],
|
|
13
|
+
libraries=["windowsapp"],
|
|
14
|
+
)
|
|
15
|
+
],
|
|
16
|
+
package_data={"winrt": ["*.pyi"]},
|
|
17
|
+
)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
import sys
|
|
5
|
+
import types
|
|
6
|
+
import typing
|
|
7
|
+
import uuid as _uuid
|
|
8
|
+
from builtins import property as _property
|
|
9
|
+
|
|
10
|
+
import winrt._winrt
|
|
11
|
+
import winrt.system
|
|
12
|
+
import winrt.windows.applicationmodel.payments
|
|
13
|
+
import winrt.windows.foundation
|
|
14
|
+
import winrt.windows.foundation.collections
|
|
15
|
+
|
|
16
|
+
Self = typing.TypeVar('Self')
|
|
17
|
+
|
|
18
|
+
class PaymentAppCanMakePaymentTriggerDetails(winrt.system.Object):
|
|
19
|
+
@staticmethod
|
|
20
|
+
def _from(obj: winrt.system.Object, /) -> PaymentAppCanMakePaymentTriggerDetails: ...
|
|
21
|
+
def report_can_make_payment_result(self, value: typing.Optional[winrt.windows.applicationmodel.payments.PaymentCanMakePaymentResult], /) -> None: ...
|
|
22
|
+
@_property
|
|
23
|
+
def request(self) -> typing.Optional[winrt.windows.applicationmodel.payments.PaymentRequest]: ...
|
|
24
|
+
|
|
25
|
+
class PaymentAppManager_Static(type):
|
|
26
|
+
@_property
|
|
27
|
+
def current(cls) -> typing.Optional[PaymentAppManager]: ...
|
|
28
|
+
|
|
29
|
+
class PaymentAppManager(winrt.system.Object, metaclass=PaymentAppManager_Static):
|
|
30
|
+
@staticmethod
|
|
31
|
+
def _from(obj: winrt.system.Object, /) -> PaymentAppManager: ...
|
|
32
|
+
def register_async(self, supported_payment_method_ids: typing.Iterable[str], /) -> winrt.windows.foundation.IAsyncAction: ...
|
|
33
|
+
def unregister_async(self) -> winrt.windows.foundation.IAsyncAction: ...
|
|
34
|
+
|
|
35
|
+
class PaymentTransaction_Static(type):
|
|
36
|
+
def from_id_async(cls, id: str, /) -> winrt.windows.foundation.IAsyncOperation[PaymentTransaction]: ...
|
|
37
|
+
|
|
38
|
+
class PaymentTransaction(winrt.system.Object, metaclass=PaymentTransaction_Static):
|
|
39
|
+
@staticmethod
|
|
40
|
+
def _from(obj: winrt.system.Object, /) -> PaymentTransaction: ...
|
|
41
|
+
def accept_async(self, payment_token: typing.Optional[winrt.windows.applicationmodel.payments.PaymentToken], /) -> winrt.windows.foundation.IAsyncOperation[PaymentTransactionAcceptResult]: ...
|
|
42
|
+
def reject(self) -> None: ...
|
|
43
|
+
def update_selected_shipping_option_async(self, selected_shipping_option: typing.Optional[winrt.windows.applicationmodel.payments.PaymentShippingOption], /) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.applicationmodel.payments.PaymentRequestChangedResult]: ...
|
|
44
|
+
def update_shipping_address_async(self, shipping_address: typing.Optional[winrt.windows.applicationmodel.payments.PaymentAddress], /) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.applicationmodel.payments.PaymentRequestChangedResult]: ...
|
|
45
|
+
@_property
|
|
46
|
+
def payer_phone_number(self) -> str: ...
|
|
47
|
+
@payer_phone_number.setter
|
|
48
|
+
def payer_phone_number(self, value: str) -> None: ...
|
|
49
|
+
@_property
|
|
50
|
+
def payer_name(self) -> str: ...
|
|
51
|
+
@payer_name.setter
|
|
52
|
+
def payer_name(self, value: str) -> None: ...
|
|
53
|
+
@_property
|
|
54
|
+
def payer_email(self) -> str: ...
|
|
55
|
+
@payer_email.setter
|
|
56
|
+
def payer_email(self, value: str) -> None: ...
|
|
57
|
+
@_property
|
|
58
|
+
def payment_request(self) -> typing.Optional[winrt.windows.applicationmodel.payments.PaymentRequest]: ...
|
|
59
|
+
|
|
60
|
+
class PaymentTransactionAcceptResult(winrt.system.Object):
|
|
61
|
+
@staticmethod
|
|
62
|
+
def _from(obj: winrt.system.Object, /) -> PaymentTransactionAcceptResult: ...
|
|
63
|
+
@_property
|
|
64
|
+
def status(self) -> winrt.windows.applicationmodel.payments.PaymentRequestCompletionStatus: ...
|
|
65
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
|
|
2
|
+
|
|
3
|
+
import winrt.system
|
|
4
|
+
from winrt import _winrt_windows_applicationmodel_payments_provider
|
|
5
|
+
|
|
6
|
+
__all__ = [
|
|
7
|
+
"PaymentAppCanMakePaymentTriggerDetails",
|
|
8
|
+
"PaymentAppManager",
|
|
9
|
+
"PaymentTransaction",
|
|
10
|
+
"PaymentTransactionAcceptResult",
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
PaymentAppCanMakePaymentTriggerDetails = _winrt_windows_applicationmodel_payments_provider.PaymentAppCanMakePaymentTriggerDetails
|
|
14
|
+
PaymentAppManager = _winrt_windows_applicationmodel_payments_provider.PaymentAppManager
|
|
15
|
+
PaymentTransaction = _winrt_windows_applicationmodel_payments_provider.PaymentTransaction
|
|
16
|
+
PaymentTransactionAcceptResult = _winrt_windows_applicationmodel_payments_provider.PaymentTransactionAcceptResult
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: winrt-Windows.ApplicationModel.Payments.Provider
|
|
3
|
+
Version: 2.0.0b1
|
|
4
|
+
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Repository, https://github.com/pywrint/pywrinrt
|
|
7
|
+
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
|
|
8
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Requires-Python: <3.13,>=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Provides-Extra: all
|
|
15
|
+
|
|
16
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
17
|
+
|
|
18
|
+
# winrt-Windows.ApplicationModel.Payments.Provider
|
|
19
|
+
|
|
20
|
+
Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.Payments.Provider` namespace.
|
|
21
|
+
|
|
22
|
+
This package provides the `winrt.windows.applicationmodel.payments.provider` module.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
all-requirements.txt
|
|
3
|
+
py.Windows.ApplicationModel.Payments.Provider.cpp
|
|
4
|
+
pyproject.toml
|
|
5
|
+
pywinrt-version.txt
|
|
6
|
+
requirements.txt
|
|
7
|
+
setup.py
|
|
8
|
+
winrt/_winrt_windows_applicationmodel_payments_provider.pyi
|
|
9
|
+
winrt/windows/applicationmodel/payments/provider/__init__.py
|
|
10
|
+
winrt_Windows.ApplicationModel.Payments.Provider.egg-info/PKG-INFO
|
|
11
|
+
winrt_Windows.ApplicationModel.Payments.Provider.egg-info/SOURCES.txt
|
|
12
|
+
winrt_Windows.ApplicationModel.Payments.Provider.egg-info/dependency_links.txt
|
|
13
|
+
winrt_Windows.ApplicationModel.Payments.Provider.egg-info/requires.txt
|
|
14
|
+
winrt_Windows.ApplicationModel.Payments.Provider.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|