@astrada.co/ts-astrada-sdk 1.0.0

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.
Files changed (200) hide show
  1. package/.editorconfig +10 -0
  2. package/.github/workflows/on-push.yml +65 -0
  3. package/.releaserc +21 -0
  4. package/CHANGELOG.md +13 -0
  5. package/README.md +1 -0
  6. package/dist/astrada.co-ts-astrada-sdk-1.0.0.tgz +0 -0
  7. package/lib/apis/CardApi.d.ts +57 -0
  8. package/lib/apis/CardApi.js +109 -0
  9. package/lib/apis/CardSubscriptionApi.d.ts +61 -0
  10. package/lib/apis/CardSubscriptionApi.js +133 -0
  11. package/lib/apis/CardholderApi.d.ts +31 -0
  12. package/lib/apis/CardholderApi.js +56 -0
  13. package/lib/apis/EnrollmentMethodsApi.d.ts +31 -0
  14. package/lib/apis/EnrollmentMethodsApi.js +57 -0
  15. package/lib/apis/NetworkBulkFeedsApi.d.ts +60 -0
  16. package/lib/apis/NetworkBulkFeedsApi.js +129 -0
  17. package/lib/apis/SubaccountsApi.d.ts +72 -0
  18. package/lib/apis/SubaccountsApi.js +157 -0
  19. package/lib/apis/TransactionMessagesApi.d.ts +31 -0
  20. package/lib/apis/TransactionMessagesApi.js +56 -0
  21. package/lib/apis/TransactionsApi.d.ts +56 -0
  22. package/lib/apis/TransactionsApi.js +106 -0
  23. package/lib/apis/WebhooksApi.d.ts +86 -0
  24. package/lib/apis/WebhooksApi.js +194 -0
  25. package/lib/apis/index.d.ts +9 -0
  26. package/lib/apis/index.js +27 -0
  27. package/lib/index.d.ts +3 -0
  28. package/lib/index.js +21 -0
  29. package/lib/models/Card.d.ts +112 -0
  30. package/lib/models/Card.js +109 -0
  31. package/lib/models/CardLinks.d.ts +39 -0
  32. package/lib/models/CardLinks.js +53 -0
  33. package/lib/models/CardSubscription.d.ts +118 -0
  34. package/lib/models/CardSubscription.js +109 -0
  35. package/lib/models/CardSubscriptionLinks.d.ts +45 -0
  36. package/lib/models/CardSubscriptionLinks.js +57 -0
  37. package/lib/models/Cardholder.d.ts +64 -0
  38. package/lib/models/Cardholder.js +68 -0
  39. package/lib/models/CardholderCorporate.d.ts +38 -0
  40. package/lib/models/CardholderCorporate.js +50 -0
  41. package/lib/models/CardholderLinks.d.ts +33 -0
  42. package/lib/models/CardholderLinks.js +51 -0
  43. package/lib/models/Conflict.d.ts +57 -0
  44. package/lib/models/Conflict.js +67 -0
  45. package/lib/models/CreateNetworkBulkFeedRequest.d.ts +52 -0
  46. package/lib/models/CreateNetworkBulkFeedRequest.js +66 -0
  47. package/lib/models/CreateSubaccountRequest.d.ts +39 -0
  48. package/lib/models/CreateSubaccountRequest.js +55 -0
  49. package/lib/models/CreateWebhook201Response.d.ts +98 -0
  50. package/lib/models/CreateWebhook201Response.js +96 -0
  51. package/lib/models/CreateWebhookRequest.d.ts +67 -0
  52. package/lib/models/CreateWebhookRequest.js +73 -0
  53. package/lib/models/EnrollmentMethods200Response.d.ts +40 -0
  54. package/lib/models/EnrollmentMethods200Response.js +58 -0
  55. package/lib/models/EnrollmentMethodsRequest.d.ts +32 -0
  56. package/lib/models/EnrollmentMethodsRequest.js +50 -0
  57. package/lib/models/GetSubaccounts200Response.d.ts +40 -0
  58. package/lib/models/GetSubaccounts200Response.js +56 -0
  59. package/lib/models/GetSubaccounts200ResponseEmbedded.d.ts +33 -0
  60. package/lib/models/GetSubaccounts200ResponseEmbedded.js +51 -0
  61. package/lib/models/GetSubaccounts200ResponseLinks.d.ts +39 -0
  62. package/lib/models/GetSubaccounts200ResponseLinks.js +53 -0
  63. package/lib/models/GetTransactions200Response.d.ts +40 -0
  64. package/lib/models/GetTransactions200Response.js +56 -0
  65. package/lib/models/GetTransactions200ResponseEmbedded.d.ts +33 -0
  66. package/lib/models/GetTransactions200ResponseEmbedded.js +51 -0
  67. package/lib/models/InlineObject.d.ts +52 -0
  68. package/lib/models/InlineObject.js +64 -0
  69. package/lib/models/InlineObject1.d.ts +45 -0
  70. package/lib/models/InlineObject1.js +61 -0
  71. package/lib/models/InlineObject2.d.ts +45 -0
  72. package/lib/models/InlineObject2.js +61 -0
  73. package/lib/models/InlineObject3.d.ts +45 -0
  74. package/lib/models/InlineObject3.js +61 -0
  75. package/lib/models/InlineObject4.d.ts +57 -0
  76. package/lib/models/InlineObject4.js +65 -0
  77. package/lib/models/InlineObject5.d.ts +45 -0
  78. package/lib/models/InlineObject5.js +61 -0
  79. package/lib/models/InlineObjectErrorsInner.d.ts +38 -0
  80. package/lib/models/InlineObjectErrorsInner.js +54 -0
  81. package/lib/models/Link.d.ts +74 -0
  82. package/lib/models/Link.js +64 -0
  83. package/lib/models/ListCardSubscriptions200Response.d.ts +46 -0
  84. package/lib/models/ListCardSubscriptions200Response.js +60 -0
  85. package/lib/models/ListCardSubscriptions200ResponseEmbedded.d.ts +33 -0
  86. package/lib/models/ListCardSubscriptions200ResponseEmbedded.js +51 -0
  87. package/lib/models/ListCardSubscriptions200ResponseLinks.d.ts +57 -0
  88. package/lib/models/ListCardSubscriptions200ResponseLinks.js +59 -0
  89. package/lib/models/ListCards200Response.d.ts +46 -0
  90. package/lib/models/ListCards200Response.js +60 -0
  91. package/lib/models/ListCards200ResponseEmbedded.d.ts +33 -0
  92. package/lib/models/ListCards200ResponseEmbedded.js +51 -0
  93. package/lib/models/ListNetworkBulkFeeds200Response.d.ts +46 -0
  94. package/lib/models/ListNetworkBulkFeeds200Response.js +60 -0
  95. package/lib/models/ListNetworkBulkFeeds200ResponseEmbedded.d.ts +33 -0
  96. package/lib/models/ListNetworkBulkFeeds200ResponseEmbedded.js +51 -0
  97. package/lib/models/ListWebhooks200Response.d.ts +40 -0
  98. package/lib/models/ListWebhooks200Response.js +56 -0
  99. package/lib/models/ListWebhooks200ResponseEmbedded.d.ts +33 -0
  100. package/lib/models/ListWebhooks200ResponseEmbedded.js +49 -0
  101. package/lib/models/ListWebhooks200ResponseLinks.d.ts +39 -0
  102. package/lib/models/ListWebhooks200ResponseLinks.js +51 -0
  103. package/lib/models/NetworkBulkFeeds.d.ts +81 -0
  104. package/lib/models/NetworkBulkFeeds.js +83 -0
  105. package/lib/models/Subaccount.d.ts +70 -0
  106. package/lib/models/Subaccount.js +76 -0
  107. package/lib/models/SubaccountConfiguration.d.ts +39 -0
  108. package/lib/models/SubaccountConfiguration.js +51 -0
  109. package/lib/models/SubaccountConfigurationVISA.d.ts +43 -0
  110. package/lib/models/SubaccountConfigurationVISA.js +61 -0
  111. package/lib/models/Transaction.d.ts +140 -0
  112. package/lib/models/Transaction.js +126 -0
  113. package/lib/models/TransactionAcceptor.d.ts +50 -0
  114. package/lib/models/TransactionAcceptor.js +62 -0
  115. package/lib/models/TransactionLinks.d.ts +51 -0
  116. package/lib/models/TransactionLinks.js +57 -0
  117. package/lib/models/TransactionMessage.d.ts +184 -0
  118. package/lib/models/TransactionMessage.js +159 -0
  119. package/lib/models/TransactionMessageAcceptor.d.ts +68 -0
  120. package/lib/models/TransactionMessageAcceptor.js +72 -0
  121. package/lib/models/UnprocessableEntity.d.ts +45 -0
  122. package/lib/models/UnprocessableEntity.js +61 -0
  123. package/lib/models/UpdateCardSubscriptionRequest.d.ts +39 -0
  124. package/lib/models/UpdateCardSubscriptionRequest.js +55 -0
  125. package/lib/models/UpdateSubaccountRequest.d.ts +39 -0
  126. package/lib/models/UpdateSubaccountRequest.js +51 -0
  127. package/lib/models/UpdateWebhookRequest.d.ts +61 -0
  128. package/lib/models/UpdateWebhookRequest.js +65 -0
  129. package/lib/models/Webhook.d.ts +92 -0
  130. package/lib/models/Webhook.js +92 -0
  131. package/lib/models/index.d.ts +51 -0
  132. package/lib/models/index.js +69 -0
  133. package/lib/runtime.d.ts +215 -0
  134. package/lib/runtime.js +394 -0
  135. package/package.json +21 -0
  136. package/src/apis/CardApi.ts +174 -0
  137. package/src/apis/CardSubscriptionApi.ts +223 -0
  138. package/src/apis/CardholderApi.ts +93 -0
  139. package/src/apis/EnrollmentMethodsApi.ts +98 -0
  140. package/src/apis/NetworkBulkFeedsApi.ts +211 -0
  141. package/src/apis/SubaccountsApi.ts +253 -0
  142. package/src/apis/TransactionMessagesApi.ts +93 -0
  143. package/src/apis/TransactionsApi.ts +169 -0
  144. package/src/apis/WebhooksApi.ts +315 -0
  145. package/src/apis/index.ts +11 -0
  146. package/src/index.ts +5 -0
  147. package/src/models/Card.ts +187 -0
  148. package/src/models/CardLinks.ts +82 -0
  149. package/src/models/CardSubscription.ts +194 -0
  150. package/src/models/CardSubscriptionLinks.ts +91 -0
  151. package/src/models/Cardholder.ts +124 -0
  152. package/src/models/CardholderCorporate.ts +73 -0
  153. package/src/models/CardholderLinks.ts +74 -0
  154. package/src/models/Conflict.ts +102 -0
  155. package/src/models/CreateNetworkBulkFeedRequest.ts +95 -0
  156. package/src/models/CreateSubaccountRequest.ts +83 -0
  157. package/src/models/CreateWebhook201Response.ts +168 -0
  158. package/src/models/CreateWebhookRequest.ts +114 -0
  159. package/src/models/EnrollmentMethods200Response.ts +77 -0
  160. package/src/models/EnrollmentMethodsRequest.ts +66 -0
  161. package/src/models/GetSubaccounts200Response.ts +90 -0
  162. package/src/models/GetSubaccounts200ResponseEmbedded.ts +74 -0
  163. package/src/models/GetSubaccounts200ResponseLinks.ts +82 -0
  164. package/src/models/GetTransactions200Response.ts +90 -0
  165. package/src/models/GetTransactions200ResponseEmbedded.ts +74 -0
  166. package/src/models/InlineObject.ts +101 -0
  167. package/src/models/InlineObject1.ts +85 -0
  168. package/src/models/InlineObject2.ts +85 -0
  169. package/src/models/InlineObject3.ts +85 -0
  170. package/src/models/InlineObject4.ts +101 -0
  171. package/src/models/InlineObject5.ts +85 -0
  172. package/src/models/InlineObjectErrorsInner.ts +75 -0
  173. package/src/models/Link.ts +122 -0
  174. package/src/models/ListCardSubscriptions200Response.ts +99 -0
  175. package/src/models/ListCardSubscriptions200ResponseEmbedded.ts +74 -0
  176. package/src/models/ListCardSubscriptions200ResponseLinks.ts +106 -0
  177. package/src/models/ListCards200Response.ts +99 -0
  178. package/src/models/ListCards200ResponseEmbedded.ts +74 -0
  179. package/src/models/ListNetworkBulkFeeds200Response.ts +99 -0
  180. package/src/models/ListNetworkBulkFeeds200ResponseEmbedded.ts +74 -0
  181. package/src/models/ListWebhooks200Response.ts +90 -0
  182. package/src/models/ListWebhooks200ResponseEmbedded.ts +73 -0
  183. package/src/models/ListWebhooks200ResponseLinks.ts +81 -0
  184. package/src/models/NetworkBulkFeeds.ts +143 -0
  185. package/src/models/Subaccount.ts +135 -0
  186. package/src/models/SubaccountConfiguration.ts +81 -0
  187. package/src/models/SubaccountConfigurationVISA.ts +80 -0
  188. package/src/models/Transaction.ts +238 -0
  189. package/src/models/TransactionAcceptor.ts +93 -0
  190. package/src/models/TransactionLinks.ts +98 -0
  191. package/src/models/TransactionMessage.ts +289 -0
  192. package/src/models/TransactionMessageAcceptor.ts +119 -0
  193. package/src/models/UnprocessableEntity.ts +85 -0
  194. package/src/models/UpdateCardSubscriptionRequest.ts +75 -0
  195. package/src/models/UpdateSubaccountRequest.ts +81 -0
  196. package/src/models/UpdateWebhookRequest.ts +103 -0
  197. package/src/models/Webhook.ts +159 -0
  198. package/src/models/index.ts +53 -0
  199. package/src/runtime.ts +524 -0
  200. package/tsconfig.json +13 -0
@@ -0,0 +1,93 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Astrada API
5
+ * Welcome to our API Reference. 👋
6
+ *
7
+ * The version of the OpenAPI document: 2024-02-28
8
+ * Contact: developer@astrada.co
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * The details relating to the acceptor (merchant) from the latest transaction message.
18
+ * @export
19
+ * @interface TransactionAcceptor
20
+ */
21
+ export interface TransactionAcceptor {
22
+ /**
23
+ * The acceptor's registered city. Defined by the acquirer/processor.
24
+ * @type {string}
25
+ * @memberof TransactionAcceptor
26
+ */
27
+ city: string | null;
28
+ /**
29
+ * The acceptor's registered country following ISO 3166 alpha-3.
30
+ * @type {string}
31
+ * @memberof TransactionAcceptor
32
+ */
33
+ country: string | null;
34
+ /**
35
+ * The Merchant Category Code provided by the acquirer/processor. Used to classify businesses by the types of goods provided or services rendered.
36
+ * @type {string}
37
+ * @memberof TransactionAcceptor
38
+ */
39
+ mcc: string | null;
40
+ /**
41
+ * The acceptor's registered state (e.g. Michigan) as assigned by the acquirer/processor.
42
+ * @type {string}
43
+ * @memberof TransactionAcceptor
44
+ */
45
+ state: string | null;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the TransactionAcceptor interface.
50
+ */
51
+ export function instanceOfTransactionAcceptor(value: object): value is TransactionAcceptor {
52
+ if (!('city' in value) || value['city'] === undefined) return false;
53
+ if (!('country' in value) || value['country'] === undefined) return false;
54
+ if (!('mcc' in value) || value['mcc'] === undefined) return false;
55
+ if (!('state' in value) || value['state'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function TransactionAcceptorFromJSON(json: any): TransactionAcceptor {
60
+ return TransactionAcceptorFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function TransactionAcceptorFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionAcceptor {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'city': json['city'],
70
+ 'country': json['country'],
71
+ 'mcc': json['mcc'],
72
+ 'state': json['state'],
73
+ };
74
+ }
75
+
76
+ export function TransactionAcceptorToJSON(json: any): TransactionAcceptor {
77
+ return TransactionAcceptorToJSONTyped(json, false);
78
+ }
79
+
80
+ export function TransactionAcceptorToJSONTyped(value?: TransactionAcceptor | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'city': value['city'],
88
+ 'country': value['country'],
89
+ 'mcc': value['mcc'],
90
+ 'state': value['state'],
91
+ };
92
+ }
93
+
@@ -0,0 +1,98 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Astrada API
5
+ * Welcome to our API Reference. 👋
6
+ *
7
+ * The version of the OpenAPI document: 2024-02-28
8
+ * Contact: developer@astrada.co
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { Link } from './Link';
17
+ import {
18
+ LinkFromJSON,
19
+ LinkFromJSONTyped,
20
+ LinkToJSON,
21
+ LinkToJSONTyped,
22
+ } from './Link';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface TransactionLinks
28
+ */
29
+ export interface TransactionLinks {
30
+ /**
31
+ *
32
+ * @type {Array<Link>}
33
+ * @memberof TransactionLinks
34
+ */
35
+ messages: Array<Link>;
36
+ /**
37
+ *
38
+ * @type {Link}
39
+ * @memberof TransactionLinks
40
+ */
41
+ card?: Link;
42
+ /**
43
+ *
44
+ * @type {Link}
45
+ * @memberof TransactionLinks
46
+ */
47
+ self?: Link;
48
+ /**
49
+ *
50
+ * @type {Link}
51
+ * @memberof TransactionLinks
52
+ */
53
+ subaccount?: Link;
54
+ }
55
+
56
+ /**
57
+ * Check if a given object implements the TransactionLinks interface.
58
+ */
59
+ export function instanceOfTransactionLinks(value: object): value is TransactionLinks {
60
+ if (!('messages' in value) || value['messages'] === undefined) return false;
61
+ return true;
62
+ }
63
+
64
+ export function TransactionLinksFromJSON(json: any): TransactionLinks {
65
+ return TransactionLinksFromJSONTyped(json, false);
66
+ }
67
+
68
+ export function TransactionLinksFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionLinks {
69
+ if (json == null) {
70
+ return json;
71
+ }
72
+ return {
73
+
74
+ 'messages': ((json['messages'] as Array<any>).map(LinkFromJSON)),
75
+ 'card': json['card'] == null ? undefined : LinkFromJSON(json['card']),
76
+ 'self': json['self'] == null ? undefined : LinkFromJSON(json['self']),
77
+ 'subaccount': json['subaccount'] == null ? undefined : LinkFromJSON(json['subaccount']),
78
+ };
79
+ }
80
+
81
+ export function TransactionLinksToJSON(json: any): TransactionLinks {
82
+ return TransactionLinksToJSONTyped(json, false);
83
+ }
84
+
85
+ export function TransactionLinksToJSONTyped(value?: TransactionLinks | null, ignoreDiscriminator: boolean = false): any {
86
+ if (value == null) {
87
+ return value;
88
+ }
89
+
90
+ return {
91
+
92
+ 'messages': ((value['messages'] as Array<any>).map(LinkToJSON)),
93
+ 'card': LinkToJSON(value['card']),
94
+ 'self': LinkToJSON(value['self']),
95
+ 'subaccount': LinkToJSON(value['subaccount']),
96
+ };
97
+ }
98
+
@@ -0,0 +1,289 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Astrada API
5
+ * Welcome to our API Reference. 👋
6
+ *
7
+ * The version of the OpenAPI document: 2024-02-28
8
+ * Contact: developer@astrada.co
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { CardholderLinks } from './CardholderLinks';
17
+ import {
18
+ CardholderLinksFromJSON,
19
+ CardholderLinksFromJSONTyped,
20
+ CardholderLinksToJSON,
21
+ CardholderLinksToJSONTyped,
22
+ } from './CardholderLinks';
23
+ import type { TransactionMessageAcceptor } from './TransactionMessageAcceptor';
24
+ import {
25
+ TransactionMessageAcceptorFromJSON,
26
+ TransactionMessageAcceptorFromJSONTyped,
27
+ TransactionMessageAcceptorToJSON,
28
+ TransactionMessageAcceptorToJSONTyped,
29
+ } from './TransactionMessageAcceptor';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface TransactionMessage
35
+ */
36
+ export interface TransactionMessage {
37
+ /**
38
+ *
39
+ * @type {CardholderLinks}
40
+ * @memberof TransactionMessage
41
+ */
42
+ _links: CardholderLinks;
43
+ /**
44
+ * The unique identifier of this transaction message entity.
45
+ * @type {string}
46
+ * @memberof TransactionMessage
47
+ */
48
+ id: string;
49
+ /**
50
+ *
51
+ * @type {TransactionMessageAcceptor}
52
+ * @memberof TransactionMessage
53
+ */
54
+ acceptor: TransactionMessageAcceptor;
55
+ /**
56
+ * Unique code that authorizes a transaction message, sent by the card issuer/issuer-processor when approving a transaction.
57
+ * @type {string}
58
+ * @memberof TransactionMessage
59
+ */
60
+ approvalCode?: string;
61
+ /**
62
+ * The unique identifier of the card related to this entity.
63
+ * @type {string}
64
+ * @memberof TransactionMessage
65
+ */
66
+ cardId: string;
67
+ /**
68
+ * The type of card used in the transaction. The only available value is 'virtual' and the field is nullable.
69
+ * @type {string}
70
+ * @memberof TransactionMessage
71
+ */
72
+ cardType?: string;
73
+ /**
74
+ * The amount in the currency of the country of issuance. The transactionAmount and cardholderBillingAmount values may differ in case of international transactions.
75
+ * @type {number}
76
+ * @memberof TransactionMessage
77
+ */
78
+ cardholderBillingAmount: number;
79
+ /**
80
+ * The currency of the country of issuance following ISO 4217 alpha-3 format.
81
+ * @type {string}
82
+ * @memberof TransactionMessage
83
+ */
84
+ cardholderBillingCurrency: string;
85
+ /**
86
+ * Date and Time when this entity was created following ISO 8601 format.
87
+ * @type {Date}
88
+ * @memberof TransactionMessage
89
+ */
90
+ createdDateTime: Date;
91
+ /**
92
+ * The timestamp of the transaction message (e.g. authorization, movement of funds, etc) in either UTC or local time zone of the merchant/ acquirer following ISO 8601 format. We are not always able to provide a dateTime in UTC as this is not available at all sources. We are unable to provide the timezone. We may provide it in the future should it become available.
93
+ * @type {Date}
94
+ * @memberof TransactionMessage
95
+ */
96
+ dateTime: Date;
97
+ /**
98
+ * The type of operation this transaction message represents. [Learn More](https://docs.astrada.co/docs/transaction-message)
99
+ * @type {string}
100
+ * @memberof TransactionMessage
101
+ */
102
+ messageType: TransactionMessageMessageTypeEnum;
103
+ /**
104
+ * The card network that processed this payment.
105
+ * @type {string}
106
+ * @memberof TransactionMessage
107
+ */
108
+ network: TransactionMessageNetworkEnum;
109
+ /**
110
+ * The unique identifier of the subaccount related to this entity.
111
+ * @type {string}
112
+ * @memberof TransactionMessage
113
+ */
114
+ subaccountId: string;
115
+ /**
116
+ * The issuer's decision on whether the transaction message is authorized.
117
+ * @type {string}
118
+ * @memberof TransactionMessage
119
+ */
120
+ result: TransactionMessageResultEnum;
121
+ /**
122
+ * The amount of the transaction message in the currency it was charged in. In the case of international transactions, the transactionAmount and cardholderBillingAmount may differ due to being in different currencies.
123
+ * @type {number}
124
+ * @memberof TransactionMessage
125
+ */
126
+ transactionAmount: number;
127
+ /**
128
+ * The currency in which the transaction took place following ISO 4217 alpha-3 format.
129
+ * @type {string}
130
+ * @memberof TransactionMessage
131
+ */
132
+ transactionCurrency: string;
133
+ /**
134
+ * Identification of the Transaction that has to be unique for a time period.
135
+ * @type {string}
136
+ * @memberof TransactionMessage
137
+ */
138
+ transactionReference: string;
139
+ /**
140
+ * Types provide additional information about the transaction message, describing the effect that it had on the customer account and the type of accounts affected. [Learn More](https://docs.astrada.co/docs/transaction-message)
141
+ * @type {string}
142
+ * @memberof TransactionMessage
143
+ */
144
+ transactionType: TransactionMessageTransactionTypeEnum | null;
145
+ /**
146
+ * The timestamp of when the transaction message object was received by the data source (i.e. Mastercard or Visa) in UTC following ISO 8601 format.
147
+ * @type {Date}
148
+ * @memberof TransactionMessage
149
+ */
150
+ transmissionDateTime: Date | null;
151
+ }
152
+
153
+
154
+ /**
155
+ * @export
156
+ */
157
+ export const TransactionMessageMessageTypeEnum = {
158
+ AuthAdvc: 'AUTH_ADVC',
159
+ AuthRequ: 'AUTH_REQU',
160
+ FinlAdvc: 'FINL_ADVC',
161
+ CbckAdvc: 'CBCK_ADVC',
162
+ FinlRequ: 'FINL_REQU'
163
+ } as const;
164
+ export type TransactionMessageMessageTypeEnum = typeof TransactionMessageMessageTypeEnum[keyof typeof TransactionMessageMessageTypeEnum];
165
+
166
+ /**
167
+ * @export
168
+ */
169
+ export const TransactionMessageNetworkEnum = {
170
+ Visa: 'VISA',
171
+ Mastercard: 'MASTERCARD'
172
+ } as const;
173
+ export type TransactionMessageNetworkEnum = typeof TransactionMessageNetworkEnum[keyof typeof TransactionMessageNetworkEnum];
174
+
175
+ /**
176
+ * @export
177
+ */
178
+ export const TransactionMessageResultEnum = {
179
+ Approved: 'APPROVED',
180
+ Declined: 'DECLINED'
181
+ } as const;
182
+ export type TransactionMessageResultEnum = typeof TransactionMessageResultEnum[keyof typeof TransactionMessageResultEnum];
183
+
184
+ /**
185
+ * @export
186
+ */
187
+ export const TransactionMessageTransactionTypeEnum = {
188
+ Debit01: 'DEBIT_01',
189
+ Debit02: 'DEBIT_02',
190
+ Debit19: 'DEBIT_19',
191
+ Credit01: 'CREDIT_01',
192
+ Credit02: 'CREDIT_02',
193
+ Inquiry01: 'INQUIRY_01',
194
+ Transfer01: 'TRANSFER_01',
195
+ Admin01: 'ADMIN_01',
196
+ Admin02: 'ADMIN_02'
197
+ } as const;
198
+ export type TransactionMessageTransactionTypeEnum = typeof TransactionMessageTransactionTypeEnum[keyof typeof TransactionMessageTransactionTypeEnum];
199
+
200
+
201
+ /**
202
+ * Check if a given object implements the TransactionMessage interface.
203
+ */
204
+ export function instanceOfTransactionMessage(value: object): value is TransactionMessage {
205
+ if (!('_links' in value) || value['_links'] === undefined) return false;
206
+ if (!('id' in value) || value['id'] === undefined) return false;
207
+ if (!('acceptor' in value) || value['acceptor'] === undefined) return false;
208
+ if (!('cardId' in value) || value['cardId'] === undefined) return false;
209
+ if (!('cardholderBillingAmount' in value) || value['cardholderBillingAmount'] === undefined) return false;
210
+ if (!('cardholderBillingCurrency' in value) || value['cardholderBillingCurrency'] === undefined) return false;
211
+ if (!('createdDateTime' in value) || value['createdDateTime'] === undefined) return false;
212
+ if (!('dateTime' in value) || value['dateTime'] === undefined) return false;
213
+ if (!('messageType' in value) || value['messageType'] === undefined) return false;
214
+ if (!('network' in value) || value['network'] === undefined) return false;
215
+ if (!('subaccountId' in value) || value['subaccountId'] === undefined) return false;
216
+ if (!('result' in value) || value['result'] === undefined) return false;
217
+ if (!('transactionAmount' in value) || value['transactionAmount'] === undefined) return false;
218
+ if (!('transactionCurrency' in value) || value['transactionCurrency'] === undefined) return false;
219
+ if (!('transactionReference' in value) || value['transactionReference'] === undefined) return false;
220
+ if (!('transactionType' in value) || value['transactionType'] === undefined) return false;
221
+ if (!('transmissionDateTime' in value) || value['transmissionDateTime'] === undefined) return false;
222
+ return true;
223
+ }
224
+
225
+ export function TransactionMessageFromJSON(json: any): TransactionMessage {
226
+ return TransactionMessageFromJSONTyped(json, false);
227
+ }
228
+
229
+ export function TransactionMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionMessage {
230
+ if (json == null) {
231
+ return json;
232
+ }
233
+ return {
234
+
235
+ '_links': CardholderLinksFromJSON(json['_links']),
236
+ 'id': json['id'],
237
+ 'acceptor': TransactionMessageAcceptorFromJSON(json['acceptor']),
238
+ 'approvalCode': json['approvalCode'] == null ? undefined : json['approvalCode'],
239
+ 'cardId': json['cardId'],
240
+ 'cardType': json['cardType'] == null ? undefined : json['cardType'],
241
+ 'cardholderBillingAmount': json['cardholderBillingAmount'],
242
+ 'cardholderBillingCurrency': json['cardholderBillingCurrency'],
243
+ 'createdDateTime': (new Date(json['createdDateTime'])),
244
+ 'dateTime': (new Date(json['dateTime'])),
245
+ 'messageType': json['messageType'],
246
+ 'network': json['network'],
247
+ 'subaccountId': json['subaccountId'],
248
+ 'result': json['result'],
249
+ 'transactionAmount': json['transactionAmount'],
250
+ 'transactionCurrency': json['transactionCurrency'],
251
+ 'transactionReference': json['transactionReference'],
252
+ 'transactionType': json['transactionType'],
253
+ 'transmissionDateTime': (json['transmissionDateTime'] == null ? null : new Date(json['transmissionDateTime'])),
254
+ };
255
+ }
256
+
257
+ export function TransactionMessageToJSON(json: any): TransactionMessage {
258
+ return TransactionMessageToJSONTyped(json, false);
259
+ }
260
+
261
+ export function TransactionMessageToJSONTyped(value?: TransactionMessage | null, ignoreDiscriminator: boolean = false): any {
262
+ if (value == null) {
263
+ return value;
264
+ }
265
+
266
+ return {
267
+
268
+ '_links': CardholderLinksToJSON(value['_links']),
269
+ 'id': value['id'],
270
+ 'acceptor': TransactionMessageAcceptorToJSON(value['acceptor']),
271
+ 'approvalCode': value['approvalCode'],
272
+ 'cardId': value['cardId'],
273
+ 'cardType': value['cardType'],
274
+ 'cardholderBillingAmount': value['cardholderBillingAmount'],
275
+ 'cardholderBillingCurrency': value['cardholderBillingCurrency'],
276
+ 'createdDateTime': ((value['createdDateTime']).toISOString()),
277
+ 'dateTime': ((value['dateTime']).toISOString()),
278
+ 'messageType': value['messageType'],
279
+ 'network': value['network'],
280
+ 'subaccountId': value['subaccountId'],
281
+ 'result': value['result'],
282
+ 'transactionAmount': value['transactionAmount'],
283
+ 'transactionCurrency': value['transactionCurrency'],
284
+ 'transactionReference': value['transactionReference'],
285
+ 'transactionType': value['transactionType'],
286
+ 'transmissionDateTime': ((value['transmissionDateTime'] as any).toISOString()),
287
+ };
288
+ }
289
+
@@ -0,0 +1,119 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Astrada API
5
+ * Welcome to our API Reference. 👋
6
+ *
7
+ * The version of the OpenAPI document: 2024-02-28
8
+ * Contact: developer@astrada.co
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * The details relating to the acceptor (merchant) that initiated the transaction message.
18
+ * @export
19
+ * @interface TransactionMessageAcceptor
20
+ */
21
+ export interface TransactionMessageAcceptor {
22
+ /**
23
+ * The identifier of the acquirer/processor used by the acceptor as assigned by the network.
24
+ * @type {string}
25
+ * @memberof TransactionMessageAcceptor
26
+ */
27
+ acquirerId: string | null;
28
+ /**
29
+ * The acceptor's registered city. Defined by the acquirer/processor.
30
+ * @type {string}
31
+ * @memberof TransactionMessageAcceptor
32
+ */
33
+ city: string | null;
34
+ /**
35
+ * The acceptor's registered country following ISO 3166 alpha-3.
36
+ * @type {string}
37
+ * @memberof TransactionMessageAcceptor
38
+ */
39
+ country?: string | null;
40
+ /**
41
+ * The identifier of the payment acceptor (merchant) as assigned by the acquirer/processor.
42
+ * @type {string}
43
+ * @memberof TransactionMessageAcceptor
44
+ */
45
+ id: string | null;
46
+ /**
47
+ * The Merchant Category Code provided by the acquirer/processor. Used to classify businesses by the types of goods provided or services rendered.
48
+ * @type {string}
49
+ * @memberof TransactionMessageAcceptor
50
+ */
51
+ mcc: string | null;
52
+ /**
53
+ * The acceptor (merchant) name.
54
+ * @type {string}
55
+ * @memberof TransactionMessageAcceptor
56
+ */
57
+ name: string | null;
58
+ /**
59
+ * The acceptor's registered state (e.g. Michigan) as assigned by the acquirer/processor.
60
+ * @type {string}
61
+ * @memberof TransactionMessageAcceptor
62
+ */
63
+ state: string | null;
64
+ }
65
+
66
+ /**
67
+ * Check if a given object implements the TransactionMessageAcceptor interface.
68
+ */
69
+ export function instanceOfTransactionMessageAcceptor(value: object): value is TransactionMessageAcceptor {
70
+ if (!('acquirerId' in value) || value['acquirerId'] === undefined) return false;
71
+ if (!('city' in value) || value['city'] === undefined) return false;
72
+ if (!('id' in value) || value['id'] === undefined) return false;
73
+ if (!('mcc' in value) || value['mcc'] === undefined) return false;
74
+ if (!('name' in value) || value['name'] === undefined) return false;
75
+ if (!('state' in value) || value['state'] === undefined) return false;
76
+ return true;
77
+ }
78
+
79
+ export function TransactionMessageAcceptorFromJSON(json: any): TransactionMessageAcceptor {
80
+ return TransactionMessageAcceptorFromJSONTyped(json, false);
81
+ }
82
+
83
+ export function TransactionMessageAcceptorFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionMessageAcceptor {
84
+ if (json == null) {
85
+ return json;
86
+ }
87
+ return {
88
+
89
+ 'acquirerId': json['acquirerId'],
90
+ 'city': json['city'],
91
+ 'country': json['country'] == null ? undefined : json['country'],
92
+ 'id': json['id'],
93
+ 'mcc': json['mcc'],
94
+ 'name': json['name'],
95
+ 'state': json['state'],
96
+ };
97
+ }
98
+
99
+ export function TransactionMessageAcceptorToJSON(json: any): TransactionMessageAcceptor {
100
+ return TransactionMessageAcceptorToJSONTyped(json, false);
101
+ }
102
+
103
+ export function TransactionMessageAcceptorToJSONTyped(value?: TransactionMessageAcceptor | null, ignoreDiscriminator: boolean = false): any {
104
+ if (value == null) {
105
+ return value;
106
+ }
107
+
108
+ return {
109
+
110
+ 'acquirerId': value['acquirerId'],
111
+ 'city': value['city'],
112
+ 'country': value['country'],
113
+ 'id': value['id'],
114
+ 'mcc': value['mcc'],
115
+ 'name': value['name'],
116
+ 'state': value['state'],
117
+ };
118
+ }
119
+
@@ -0,0 +1,85 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Astrada API
5
+ * Welcome to our API Reference. 👋
6
+ *
7
+ * The version of the OpenAPI document: 2024-02-28
8
+ * Contact: developer@astrada.co
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface UnprocessableEntity
20
+ */
21
+ export interface UnprocessableEntity {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof UnprocessableEntity
26
+ */
27
+ detail: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof UnprocessableEntity
32
+ */
33
+ title: UnprocessableEntityTitleEnum;
34
+ }
35
+
36
+
37
+ /**
38
+ * @export
39
+ */
40
+ export const UnprocessableEntityTitleEnum = {
41
+ UnprocessableEntity: 'Unprocessable Entity'
42
+ } as const;
43
+ export type UnprocessableEntityTitleEnum = typeof UnprocessableEntityTitleEnum[keyof typeof UnprocessableEntityTitleEnum];
44
+
45
+
46
+ /**
47
+ * Check if a given object implements the UnprocessableEntity interface.
48
+ */
49
+ export function instanceOfUnprocessableEntity(value: object): value is UnprocessableEntity {
50
+ if (!('detail' in value) || value['detail'] === undefined) return false;
51
+ if (!('title' in value) || value['title'] === undefined) return false;
52
+ return true;
53
+ }
54
+
55
+ export function UnprocessableEntityFromJSON(json: any): UnprocessableEntity {
56
+ return UnprocessableEntityFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function UnprocessableEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnprocessableEntity {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'detail': json['detail'],
66
+ 'title': json['title'],
67
+ };
68
+ }
69
+
70
+ export function UnprocessableEntityToJSON(json: any): UnprocessableEntity {
71
+ return UnprocessableEntityToJSONTyped(json, false);
72
+ }
73
+
74
+ export function UnprocessableEntityToJSONTyped(value?: UnprocessableEntity | null, ignoreDiscriminator: boolean = false): any {
75
+ if (value == null) {
76
+ return value;
77
+ }
78
+
79
+ return {
80
+
81
+ 'detail': value['detail'],
82
+ 'title': value['title'],
83
+ };
84
+ }
85
+