1 module libwasm.bindings.BasicCardPayment;
2 
3 import libwasm.types;
4 
5 import memutils.ct: tuple;
6 import libwasm.bindings.PaymentAddress;
7 import libwasm.bindings.PaymentRequest;
8 
9 @safe:
10 nothrow:
11 
12 struct BasicCardChangeDetails {
13   nothrow:
14   JsHandle handle;
15   alias handle this;
16   this(Handle h) {
17     this.handle = JsHandle(h);
18   }
19   static auto create() {
20     return BasicCardChangeDetails(libwasm_add__object());
21   }
22   void billingAddress(T0)(scope auto ref Optional!(T0) billingAddress) if (isTOrPointer!(T0, PaymentAddress)) {
23     Serialize_Object_VarArgCall!void(this.handle, "billingAddress", "Optional!Handle", tuple(!billingAddress.empty, cast(Handle)billingAddress.front.handle));
24   }
25   auto billingAddress()() {
26     return recastOpt!(PaymentAddress)(Object_Getter__OptionalHandle(this.handle, "billingAddress"));
27   }
28 }
29 struct BasicCardErrors {
30   nothrow:
31   JsHandle handle;
32   alias handle this;
33   this(Handle h) {
34     this.handle = JsHandle(h);
35   }
36   static auto create() {
37     return BasicCardErrors(libwasm_add__object());
38   }
39   void cardNumber()(string cardNumber) {
40     Object_Call_string__void(this.handle, "cardNumber", cardNumber);
41   }
42   string cardNumber()() {
43     return Object_Getter__string(this.handle, "cardNumber");
44   }
45   void cardholderName()(string cardholderName) {
46     Object_Call_string__void(this.handle, "cardholderName", cardholderName);
47   }
48   string cardholderName()() {
49     return Object_Getter__string(this.handle, "cardholderName");
50   }
51   void cardSecurityCode()(string cardSecurityCode) {
52     Object_Call_string__void(this.handle, "cardSecurityCode", cardSecurityCode);
53   }
54   string cardSecurityCode()() {
55     return Object_Getter__string(this.handle, "cardSecurityCode");
56   }
57   void expiryMonth()(string expiryMonth) {
58     Object_Call_string__void(this.handle, "expiryMonth", expiryMonth);
59   }
60   string expiryMonth()() {
61     return Object_Getter__string(this.handle, "expiryMonth");
62   }
63   void expiryYear()(string expiryYear) {
64     Object_Call_string__void(this.handle, "expiryYear", expiryYear);
65   }
66   string expiryYear()() {
67     return Object_Getter__string(this.handle, "expiryYear");
68   }
69   void billingAddress()(scope ref AddressErrors billingAddress) {
70     Object_Call_Handle__void(this.handle, "billingAddress", billingAddress.handle);
71   }
72   auto billingAddress()() {
73     return AddressErrors(Object_Getter__Handle(this.handle, "billingAddress"));
74   }
75 }
76 struct BasicCardRequest {
77   nothrow:
78   JsHandle handle;
79   alias handle this;
80   this(Handle h) {
81     this.handle = JsHandle(h);
82   }
83   static auto create() {
84     return BasicCardRequest(libwasm_add__object());
85   }
86   void supportedNetworks()(scope ref Sequence!(string) supportedNetworks) {
87     Object_Call_Handle__void(this.handle, "supportedNetworks", supportedNetworks.handle);
88   }
89   auto supportedNetworks()() {
90     return Sequence!(string)(Object_Getter__Handle(this.handle, "supportedNetworks"));
91   }
92 }
93 struct BasicCardResponse {
94   nothrow:
95   JsHandle handle;
96   alias handle this;
97   this(Handle h) {
98     this.handle = JsHandle(h);
99   }
100   static auto create() {
101     return BasicCardResponse(libwasm_add__object());
102   }
103   void cardholderName()(string cardholderName) {
104     Object_Call_string__void(this.handle, "cardholderName", cardholderName);
105   }
106   string cardholderName()() {
107     return Object_Getter__string(this.handle, "cardholderName");
108   }
109   void cardNumber()(string cardNumber) {
110     Object_Call_string__void(this.handle, "cardNumber", cardNumber);
111   }
112   string cardNumber()() {
113     return Object_Getter__string(this.handle, "cardNumber");
114   }
115   void expiryMonth()(string expiryMonth) {
116     Object_Call_string__void(this.handle, "expiryMonth", expiryMonth);
117   }
118   string expiryMonth()() {
119     return Object_Getter__string(this.handle, "expiryMonth");
120   }
121   void expiryYear()(string expiryYear) {
122     Object_Call_string__void(this.handle, "expiryYear", expiryYear);
123   }
124   string expiryYear()() {
125     return Object_Getter__string(this.handle, "expiryYear");
126   }
127   void cardSecurityCode()(string cardSecurityCode) {
128     Object_Call_string__void(this.handle, "cardSecurityCode", cardSecurityCode);
129   }
130   string cardSecurityCode()() {
131     return Object_Getter__string(this.handle, "cardSecurityCode");
132   }
133   void billingAddress(T0)(scope auto ref Optional!(T0) billingAddress) if (isTOrPointer!(T0, PaymentAddress)) {
134     Serialize_Object_VarArgCall!void(this.handle, "billingAddress", "Optional!Handle", tuple(!billingAddress.empty, cast(Handle)billingAddress.front.handle));
135   }
136   auto billingAddress()() {
137     return recastOpt!(PaymentAddress)(Object_Getter__OptionalHandle(this.handle, "billingAddress"));
138   }
139 }
140 
141