apimatic-cp-sdk 0.0.1

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 (271) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +178 -0
  4. data/bin/console +15 -0
  5. data/lib/cell_point_api/api_helper.rb +10 -0
  6. data/lib/cell_point_api/apis/apple_pay_api.rb +51 -0
  7. data/lib/cell_point_api/apis/authentication_api.rb +81 -0
  8. data/lib/cell_point_api/apis/base_api.rb +67 -0
  9. data/lib/cell_point_api/apis/bulk_api.rb +93 -0
  10. data/lib/cell_point_api/apis/cards_api.rb +104 -0
  11. data/lib/cell_point_api/apis/notes_api.rb +66 -0
  12. data/lib/cell_point_api/apis/oauth_authorization_api.rb +44 -0
  13. data/lib/cell_point_api/apis/orders_api.rb +483 -0
  14. data/lib/cell_point_api/apis/payment_methods_api.rb +57 -0
  15. data/lib/cell_point_api/apis/proxy_api.rb +91 -0
  16. data/lib/cell_point_api/apis/transactions_api.rb +546 -0
  17. data/lib/cell_point_api/apis/wallet_api.rb +39 -0
  18. data/lib/cell_point_api/client.rb +145 -0
  19. data/lib/cell_point_api/configuration.rb +180 -0
  20. data/lib/cell_point_api/events/callbacks/callbacks_handler.rb +37 -0
  21. data/lib/cell_point_api/events/unknown_event.rb +32 -0
  22. data/lib/cell_point_api/exceptions/api_exception.rb +21 -0
  23. data/lib/cell_point_api/exceptions/oauth_provider_exception.rb +64 -0
  24. data/lib/cell_point_api/exceptions/problem_exception.rb +75 -0
  25. data/lib/cell_point_api/http/api_response.rb +19 -0
  26. data/lib/cell_point_api/http/auth/cpd_issued_jwt.rb +156 -0
  27. data/lib/cell_point_api/http/auth/merchant_issued_jwt.rb +53 -0
  28. data/lib/cell_point_api/http/http_call_back.rb +10 -0
  29. data/lib/cell_point_api/http/http_method_enum.rb +10 -0
  30. data/lib/cell_point_api/http/http_request.rb +10 -0
  31. data/lib/cell_point_api/http/http_response.rb +10 -0
  32. data/lib/cell_point_api/http/proxy_settings.rb +22 -0
  33. data/lib/cell_point_api/logging/configuration/api_logging_configuration.rb +186 -0
  34. data/lib/cell_point_api/logging/sdk_logger.rb +17 -0
  35. data/lib/cell_point_api/models/account.rb +168 -0
  36. data/lib/cell_point_api/models/account_status.rb +52 -0
  37. data/lib/cell_point_api/models/account_type.rb +44 -0
  38. data/lib/cell_point_api/models/action_base.rb +74 -0
  39. data/lib/cell_point_api/models/action_completion_response.rb +77 -0
  40. data/lib/cell_point_api/models/action_result_status.rb +40 -0
  41. data/lib/cell_point_api/models/action_type.rb +36 -0
  42. data/lib/cell_point_api/models/activity.rb +244 -0
  43. data/lib/cell_point_api/models/activity_data.rb +127 -0
  44. data/lib/cell_point_api/models/address_verification_status.rb +56 -0
  45. data/lib/cell_point_api/models/airline_ancillary.rb +244 -0
  46. data/lib/cell_point_api/models/airline_ancillary_data.rb +120 -0
  47. data/lib/cell_point_api/models/airline_fare.rb +348 -0
  48. data/lib/cell_point_api/models/airline_fare_data.rb +217 -0
  49. data/lib/cell_point_api/models/airline_industry_data.rb +152 -0
  50. data/lib/cell_point_api/models/airport.rb +144 -0
  51. data/lib/cell_point_api/models/amount.rb +105 -0
  52. data/lib/cell_point_api/models/ancillary_details.rb +366 -0
  53. data/lib/cell_point_api/models/apple_pay_config.rb +83 -0
  54. data/lib/cell_point_api/models/apple_pay_instrument_apple_pay_node.rb +119 -0
  55. data/lib/cell_point_api/models/apple_pay_payment_instrument.rb +123 -0
  56. data/lib/cell_point_api/models/apple_tokenized_token.rb +143 -0
  57. data/lib/cell_point_api/models/audience.rb +36 -0
  58. data/lib/cell_point_api/models/authorization.rb +145 -0
  59. data/lib/cell_point_api/models/authorization_group.rb +99 -0
  60. data/lib/cell_point_api/models/authorization_group1.rb +216 -0
  61. data/lib/cell_point_api/models/authorization_group_full.rb +193 -0
  62. data/lib/cell_point_api/models/authorize_order_by_id_post201_response.rb +128 -0
  63. data/lib/cell_point_api/models/auto_rental.rb +195 -0
  64. data/lib/cell_point_api/models/auto_rental_data.rb +76 -0
  65. data/lib/cell_point_api/models/auto_rental_industry_data.rb +182 -0
  66. data/lib/cell_point_api/models/base_model.rb +110 -0
  67. data/lib/cell_point_api/models/bin.rb +73 -0
  68. data/lib/cell_point_api/models/breadcrumb.rb +86 -0
  69. data/lib/cell_point_api/models/browser_info.rb +114 -0
  70. data/lib/cell_point_api/models/bundle.rb +195 -0
  71. data/lib/cell_point_api/models/bundled_activity.rb +229 -0
  72. data/lib/cell_point_api/models/bundled_airline_ancillary.rb +226 -0
  73. data/lib/cell_point_api/models/bundled_airline_fare.rb +330 -0
  74. data/lib/cell_point_api/models/bundled_auto_rental.rb +176 -0
  75. data/lib/cell_point_api/models/bundled_discount.rb +132 -0
  76. data/lib/cell_point_api/models/bundled_item_base.rb +123 -0
  77. data/lib/cell_point_api/models/bundled_lodging_reservation.rb +176 -0
  78. data/lib/cell_point_api/models/bundled_product.rb +161 -0
  79. data/lib/cell_point_api/models/buyer.rb +129 -0
  80. data/lib/cell_point_api/models/buyer_fingerprint.rb +125 -0
  81. data/lib/cell_point_api/models/buyer_history.rb +199 -0
  82. data/lib/cell_point_api/models/cancel.rb +109 -0
  83. data/lib/cell_point_api/models/cancelled_payment_transactions.rb +84 -0
  84. data/lib/cell_point_api/models/capabilities.rb +77 -0
  85. data/lib/cell_point_api/models/capture.rb +84 -0
  86. data/lib/cell_point_api/models/capture_payment_response.rb +159 -0
  87. data/lib/cell_point_api/models/card.rb +131 -0
  88. data/lib/cell_point_api/models/card_config.rb +105 -0
  89. data/lib/cell_point_api/models/card_identification.rb +126 -0
  90. data/lib/cell_point_api/models/card_instrument_card_node.rb +232 -0
  91. data/lib/cell_point_api/models/card_number.rb +122 -0
  92. data/lib/cell_point_api/models/card_payment_instrument.rb +136 -0
  93. data/lib/cell_point_api/models/card_scheme.rb +63 -0
  94. data/lib/cell_point_api/models/card_scheme_configuration.rb +87 -0
  95. data/lib/cell_point_api/models/carrier.rb +82 -0
  96. data/lib/cell_point_api/models/category.rb +36 -0
  97. data/lib/cell_point_api/models/client_assertion.rb +135 -0
  98. data/lib/cell_point_api/models/close.rb +89 -0
  99. data/lib/cell_point_api/models/close_refund_response.rb +73 -0
  100. data/lib/cell_point_api/models/closed_payment_transactions.rb +83 -0
  101. data/lib/cell_point_api/models/codeshare.rb +87 -0
  102. data/lib/cell_point_api/models/complete_person_name.rb +120 -0
  103. data/lib/cell_point_api/models/completion_redirect.rb +93 -0
  104. data/lib/cell_point_api/models/configuration.rb +86 -0
  105. data/lib/cell_point_api/models/contact_data.rb +82 -0
  106. data/lib/cell_point_api/models/cpu.rb +74 -0
  107. data/lib/cell_point_api/models/device_os.rb +60 -0
  108. data/lib/cell_point_api/models/discount.rb +150 -0
  109. data/lib/cell_point_api/models/discount_data.rb +83 -0
  110. data/lib/cell_point_api/models/driver.rb +86 -0
  111. data/lib/cell_point_api/models/external_transaction.rb +227 -0
  112. data/lib/cell_point_api/models/externally_tokenized_card.rb +81 -0
  113. data/lib/cell_point_api/models/failover.rb +105 -0
  114. data/lib/cell_point_api/models/failure_category.rb +62 -0
  115. data/lib/cell_point_api/models/failure_module.rb +58 -0
  116. data/lib/cell_point_api/models/fingerprint.rb +82 -0
  117. data/lib/cell_point_api/models/fraud_assessment.rb +163 -0
  118. data/lib/cell_point_api/models/fulfilled_activity.rb +207 -0
  119. data/lib/cell_point_api/models/fulfilled_airline_ancillary.rb +207 -0
  120. data/lib/cell_point_api/models/fulfilled_airline_fare.rb +207 -0
  121. data/lib/cell_point_api/models/fulfilled_auto_rental.rb +207 -0
  122. data/lib/cell_point_api/models/fulfilled_bundle.rb +207 -0
  123. data/lib/cell_point_api/models/fulfilled_discount.rb +178 -0
  124. data/lib/cell_point_api/models/fulfilled_line_item_base.rb +177 -0
  125. data/lib/cell_point_api/models/fulfilled_lodging_reservation.rb +207 -0
  126. data/lib/cell_point_api/models/fulfilled_order.rb +148 -0
  127. data/lib/cell_point_api/models/fulfilled_product.rb +207 -0
  128. data/lib/cell_point_api/models/fulfilled_tax_line.rb +162 -0
  129. data/lib/cell_point_api/models/fulfillment_data.rb +90 -0
  130. data/lib/cell_point_api/models/fulfillment_status.rb +41 -0
  131. data/lib/cell_point_api/models/funding_type.rb +40 -0
  132. data/lib/cell_point_api/models/gender.rb +40 -0
  133. data/lib/cell_point_api/models/hpp_data.rb +155 -0
  134. data/lib/cell_point_api/models/identifying_document.rb +159 -0
  135. data/lib/cell_point_api/models/identifying_document_type.rb +60 -0
  136. data/lib/cell_point_api/models/industry_data.rb +124 -0
  137. data/lib/cell_point_api/models/informational_price_row.rb +97 -0
  138. data/lib/cell_point_api/models/informational_price_section.rb +104 -0
  139. data/lib/cell_point_api/models/itinerary_type.rb +47 -0
  140. data/lib/cell_point_api/models/journey_segment.rb +83 -0
  141. data/lib/cell_point_api/models/line_item_base.rb +101 -0
  142. data/lib/cell_point_api/models/line_item_type.rb +60 -0
  143. data/lib/cell_point_api/models/links.rb +86 -0
  144. data/lib/cell_point_api/models/location.rb +153 -0
  145. data/lib/cell_point_api/models/lodging_industry_data.rb +216 -0
  146. data/lib/cell_point_api/models/lodging_reservation.rb +195 -0
  147. data/lib/cell_point_api/models/lodging_reservation_data.rb +76 -0
  148. data/lib/cell_point_api/models/loyalty_account.rb +103 -0
  149. data/lib/cell_point_api/models/network_info.rb +76 -0
  150. data/lib/cell_point_api/models/non_negative_amount.rb +105 -0
  151. data/lib/cell_point_api/models/non_positive_amount.rb +105 -0
  152. data/lib/cell_point_api/models/note.rb +139 -0
  153. data/lib/cell_point_api/models/note_request.rb +90 -0
  154. data/lib/cell_point_api/models/oauth_provider_error.rb +62 -0
  155. data/lib/cell_point_api/models/oauth_scope_cpd_issued_jwt.rb +158 -0
  156. data/lib/cell_point_api/models/oauth_token.rb +96 -0
  157. data/lib/cell_point_api/models/order.rb +414 -0
  158. data/lib/cell_point_api/models/order_canceled_reason.rb +56 -0
  159. data/lib/cell_point_api/models/order_core.rb +343 -0
  160. data/lib/cell_point_api/models/order_extended.rb +150 -0
  161. data/lib/cell_point_api/models/order_payment_summary.rb +117 -0
  162. data/lib/cell_point_api/models/order_status.rb +161 -0
  163. data/lib/cell_point_api/models/order_status_type.rb +58 -0
  164. data/lib/cell_point_api/models/order_transactions.rb +88 -0
  165. data/lib/cell_point_api/models/owner.rb +131 -0
  166. data/lib/cell_point_api/models/page_type.rb +26 -0
  167. data/lib/cell_point_api/models/passenger.rb +229 -0
  168. data/lib/cell_point_api/models/password_change_type.rb +41 -0
  169. data/lib/cell_point_api/models/pay_pal_action.rb +129 -0
  170. data/lib/cell_point_api/models/pay_pal_payment_instrument.rb +88 -0
  171. data/lib/cell_point_api/models/payment_data.rb +102 -0
  172. data/lib/cell_point_api/models/payment_data_header.rb +94 -0
  173. data/lib/cell_point_api/models/payment_data_version.rb +26 -0
  174. data/lib/cell_point_api/models/payment_field.rb +68 -0
  175. data/lib/cell_point_api/models/payment_instrument_base.rb +87 -0
  176. data/lib/cell_point_api/models/payment_method.rb +52 -0
  177. data/lib/cell_point_api/models/payment_methods_for_order_get200_response.rb +157 -0
  178. data/lib/cell_point_api/models/payment_methods_search_vouchers_post200_response.rb +82 -0
  179. data/lib/cell_point_api/models/payment_processor.rb +121 -0
  180. data/lib/cell_point_api/models/payment_status.rb +122 -0
  181. data/lib/cell_point_api/models/payment_transaction.rb +605 -0
  182. data/lib/cell_point_api/models/payment_transaction_authorized_amount.rb +105 -0
  183. data/lib/cell_point_api/models/payment_transaction_canceled_amount.rb +105 -0
  184. data/lib/cell_point_api/models/payment_transaction_captured_amount.rb +105 -0
  185. data/lib/cell_point_api/models/payment_transaction_pending_authorize_amount.rb +106 -0
  186. data/lib/cell_point_api/models/payment_transaction_pending_cancel_amount.rb +106 -0
  187. data/lib/cell_point_api/models/payment_transaction_pending_capture_amount.rb +106 -0
  188. data/lib/cell_point_api/models/payment_transaction_processing_fee.rb +106 -0
  189. data/lib/cell_point_api/models/payment_transaction_refunded_amount.rb +105 -0
  190. data/lib/cell_point_api/models/payments_v1_bulks_response.rb +74 -0
  191. data/lib/cell_point_api/models/payments_v1_orders_payments_retry_failed_refunds_request.rb +74 -0
  192. data/lib/cell_point_api/models/payments_v1_refunds_closures_request.rb +74 -0
  193. data/lib/cell_point_api/models/payments_v1_refunds_retry_failed_refunds_request.rb +74 -0
  194. data/lib/cell_point_api/models/payments_v1_schemes_response.rb +76 -0
  195. data/lib/cell_point_api/models/paypal_config.rb +94 -0
  196. data/lib/cell_point_api/models/person.rb +161 -0
  197. data/lib/cell_point_api/models/person_name.rb +89 -0
  198. data/lib/cell_point_api/models/phone.rb +132 -0
  199. data/lib/cell_point_api/models/pk_payment_method.rb +111 -0
  200. data/lib/cell_point_api/models/pk_payment_token.rb +94 -0
  201. data/lib/cell_point_api/models/postal_address.rb +217 -0
  202. data/lib/cell_point_api/models/price_summary.rb +191 -0
  203. data/lib/cell_point_api/models/product.rb +179 -0
  204. data/lib/cell_point_api/models/product_data.rb +104 -0
  205. data/lib/cell_point_api/models/property.rb +110 -0
  206. data/lib/cell_point_api/models/provider.rb +129 -0
  207. data/lib/cell_point_api/models/psp.rb +26 -0
  208. data/lib/cell_point_api/models/redirect_action.rb +116 -0
  209. data/lib/cell_point_api/models/refund_item.rb +310 -0
  210. data/lib/cell_point_api/models/refund_method.rb +36 -0
  211. data/lib/cell_point_api/models/refund_order_group_post201_response.rb +91 -0
  212. data/lib/cell_point_api/models/refund_reason.rb +104 -0
  213. data/lib/cell_point_api/models/refund_request.rb +161 -0
  214. data/lib/cell_point_api/models/refund_status.rb +44 -0
  215. data/lib/cell_point_api/models/refund_transaction.rb +311 -0
  216. data/lib/cell_point_api/models/refund_transaction_amount.rb +105 -0
  217. data/lib/cell_point_api/models/refund_type.rb +38 -0
  218. data/lib/cell_point_api/models/related_payment.rb +106 -0
  219. data/lib/cell_point_api/models/related_refund.rb +106 -0
  220. data/lib/cell_point_api/models/rental_location.rb +226 -0
  221. data/lib/cell_point_api/models/retry_refund_response.rb +73 -0
  222. data/lib/cell_point_api/models/reward.rb +101 -0
  223. data/lib/cell_point_api/models/room.rb +100 -0
  224. data/lib/cell_point_api/models/sales_channel.rb +36 -0
  225. data/lib/cell_point_api/models/save_pk_payment_token_request.rb +83 -0
  226. data/lib/cell_point_api/models/save_wallet_payment_token_request.rb +83 -0
  227. data/lib/cell_point_api/models/screen.rb +97 -0
  228. data/lib/cell_point_api/models/search_vouchers_request.rb +119 -0
  229. data/lib/cell_point_api/models/security_code.rb +83 -0
  230. data/lib/cell_point_api/models/security_code_match_status.rb +50 -0
  231. data/lib/cell_point_api/models/status.rb +43 -0
  232. data/lib/cell_point_api/models/status1.rb +52 -0
  233. data/lib/cell_point_api/models/summary.rb +82 -0
  234. data/lib/cell_point_api/models/tax.rb +134 -0
  235. data/lib/cell_point_api/models/taxes_and_fees_breakdown_page.rb +82 -0
  236. data/lib/cell_point_api/models/token_post200_response.rb +96 -0
  237. data/lib/cell_point_api/models/tokenized_card.rb +229 -0
  238. data/lib/cell_point_api/models/tokenized_card_with_contact_data.rb +247 -0
  239. data/lib/cell_point_api/models/tokenized_data.rb +169 -0
  240. data/lib/cell_point_api/models/total_row.rb +83 -0
  241. data/lib/cell_point_api/models/transaction_action.rb +108 -0
  242. data/lib/cell_point_api/models/transaction_action_result.rb +94 -0
  243. data/lib/cell_point_api/models/transaction_base.rb +132 -0
  244. data/lib/cell_point_api/models/transaction_failure.rb +222 -0
  245. data/lib/cell_point_api/models/travel_journey.rb +139 -0
  246. data/lib/cell_point_api/models/travel_leg.rb +194 -0
  247. data/lib/cell_point_api/models/trigger_bulk_request.rb +83 -0
  248. data/lib/cell_point_api/models/type.rb +67 -0
  249. data/lib/cell_point_api/models/type1.rb +47 -0
  250. data/lib/cell_point_api/models/type2.rb +40 -0
  251. data/lib/cell_point_api/models/type3.rb +41 -0
  252. data/lib/cell_point_api/models/type4.rb +56 -0
  253. data/lib/cell_point_api/models/type5.rb +78 -0
  254. data/lib/cell_point_api/models/uplift_config.rb +73 -0
  255. data/lib/cell_point_api/models/uplift_payment_instrument.rb +102 -0
  256. data/lib/cell_point_api/models/vehicle.rb +139 -0
  257. data/lib/cell_point_api/models/voucher_config.rb +92 -0
  258. data/lib/cell_point_api/models/voucher_issuer.rb +26 -0
  259. data/lib/cell_point_api/models/voucher_payment_instrument.rb +233 -0
  260. data/lib/cell_point_api/models/voucher_payment_instrument_node.rb +198 -0
  261. data/lib/cell_point_api/models/voucher_type.rb +36 -0
  262. data/lib/cell_point_api/models/wallet_instrument_wallet_node.rb +136 -0
  263. data/lib/cell_point_api/models/wallet_payment_instrument.rb +123 -0
  264. data/lib/cell_point_api/models/wallet_tokenized_token.rb +148 -0
  265. data/lib/cell_point_api/models/wallet_tokenized_token_identification.rb +75 -0
  266. data/lib/cell_point_api/models/wallet_type.rb +36 -0
  267. data/lib/cell_point_api/utilities/date_time_helper.rb +11 -0
  268. data/lib/cell_point_api/utilities/file_wrapper.rb +28 -0
  269. data/lib/cell_point_api/utilities/union_type_lookup.rb +260 -0
  270. data/lib/cell_point_api.rb +301 -0
  271. metadata +354 -0
@@ -0,0 +1,232 @@
1
+ # cell_point_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module CellPointApi
7
+ # Card that was used in the payment.
8
+ class CardInstrumentCardNode < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Card token identifier. Used for both cards and Apple Pay.
13
+ # @return [String]
14
+ attr_accessor :token
15
+
16
+ # Card token identifier. Used for both cards and Apple Pay.
17
+ # @return [Object]
18
+ attr_accessor :scheme
19
+
20
+ # Full name of the cardholder. As per IEC 7813, between 2-26 characters and
21
+ # using the T.50 character set.
22
+ # @return [String]
23
+ attr_accessor :cardholder_full_name
24
+
25
+ # Masked Payment Card Number (PAN). As per IEC 7813, up to 19 digits.
26
+ # At most the last four digits will be visible, and at least 6 digits will
27
+ # be replaced with '*'s.
28
+ # @return [String]
29
+ attr_accessor :masked_number
30
+
31
+ # Display Payment Card Name.
32
+ # A string, suitable for display, that describes the card.
33
+ # For debit and credit cards, the display name often includes the card brand
34
+ # and the last four digits of the credit card number when available, for
35
+ # example: “************0492”, “Visa 1233”, “MasterCard 5678”, “AmEx 9876”.
36
+ # For Apple Pay Cash cards, the display name is “Apple Pay Cash”. However,
37
+ # there is no guarantee about the display name’s content or format.
38
+ # To protect the user’s privacy, Apple Pay sets the display name only after
39
+ # the user authorizes the purchase.
40
+ # @return [String]
41
+ attr_accessor :display_name
42
+
43
+ # Display Payment Card Name.
44
+ # A string, suitable for display, that describes the card.
45
+ # For debit and credit cards, the display name often includes the card brand
46
+ # and the last four digits of the credit card number when available, for
47
+ # example: “************0492”, “Visa 1233”, “MasterCard 5678”, “AmEx 9876”.
48
+ # For Apple Pay Cash cards, the display name is “Apple Pay Cash”. However,
49
+ # there is no guarantee about the display name’s content or format.
50
+ # To protect the user’s privacy, Apple Pay sets the display name only after
51
+ # the user authorizes the purchase.
52
+ # @return [FundingType]
53
+ attr_accessor :funding_type
54
+
55
+ # Display Payment Card Name.
56
+ # A string, suitable for display, that describes the card.
57
+ # For debit and credit cards, the display name often includes the card brand
58
+ # and the last four digits of the credit card number when available, for
59
+ # example: “************0492”, “Visa 1233”, “MasterCard 5678”, “AmEx 9876”.
60
+ # For Apple Pay Cash cards, the display name is “Apple Pay Cash”. However,
61
+ # there is no guarantee about the display name’s content or format.
62
+ # To protect the user’s privacy, Apple Pay sets the display name only after
63
+ # the user authorizes the purchase.
64
+ # @return [String]
65
+ attr_accessor :country
66
+
67
+ # Display Payment Card Name.
68
+ # A string, suitable for display, that describes the card.
69
+ # For debit and credit cards, the display name often includes the card brand
70
+ # and the last four digits of the credit card number when available, for
71
+ # example: “************0492”, “Visa 1233”, “MasterCard 5678”, “AmEx 9876”.
72
+ # For Apple Pay Cash cards, the display name is “Apple Pay Cash”. However,
73
+ # there is no guarantee about the display name’s content or format.
74
+ # To protect the user’s privacy, Apple Pay sets the display name only after
75
+ # the user authorizes the purchase.
76
+ # @return [String]
77
+ attr_accessor :issuing_bank
78
+
79
+ # Display Payment Card Name.
80
+ # A string, suitable for display, that describes the card.
81
+ # For debit and credit cards, the display name often includes the card brand
82
+ # and the last four digits of the credit card number when available, for
83
+ # example: “************0492”, “Visa 1233”, “MasterCard 5678”, “AmEx 9876”.
84
+ # For Apple Pay Cash cards, the display name is “Apple Pay Cash”. However,
85
+ # there is no guarantee about the display name’s content or format.
86
+ # To protect the user’s privacy, Apple Pay sets the display name only after
87
+ # the user authorizes the purchase.
88
+ # @return [Category]
89
+ attr_accessor :category
90
+
91
+ # Display Payment Card Name.
92
+ # A string, suitable for display, that describes the card.
93
+ # For debit and credit cards, the display name often includes the card brand
94
+ # and the last four digits of the credit card number when available, for
95
+ # example: “************0492”, “Visa 1233”, “MasterCard 5678”, “AmEx 9876”.
96
+ # For Apple Pay Cash cards, the display name is “Apple Pay Cash”. However,
97
+ # there is no guarantee about the display name’s content or format.
98
+ # To protect the user’s privacy, Apple Pay sets the display name only after
99
+ # the user authorizes the purchase.
100
+ # @return [String]
101
+ attr_accessor :level
102
+
103
+ # A mapping from model property names to API property names.
104
+ def self.names
105
+ @_hash = {} if @_hash.nil?
106
+ @_hash['token'] = 'token'
107
+ @_hash['scheme'] = 'scheme'
108
+ @_hash['cardholder_full_name'] = 'cardholderFullName'
109
+ @_hash['masked_number'] = 'maskedNumber'
110
+ @_hash['display_name'] = 'displayName'
111
+ @_hash['funding_type'] = 'fundingType'
112
+ @_hash['country'] = 'country'
113
+ @_hash['issuing_bank'] = 'issuingBank'
114
+ @_hash['category'] = 'category'
115
+ @_hash['level'] = 'level'
116
+ @_hash
117
+ end
118
+
119
+ # An array for optional fields
120
+ def self.optionals
121
+ %w[
122
+ scheme
123
+ cardholder_full_name
124
+ masked_number
125
+ display_name
126
+ funding_type
127
+ country
128
+ issuing_bank
129
+ category
130
+ level
131
+ ]
132
+ end
133
+
134
+ # An array for nullable fields
135
+ def self.nullables
136
+ []
137
+ end
138
+
139
+ def initialize(token:, scheme: SKIP, cardholder_full_name: SKIP,
140
+ masked_number: SKIP, display_name: SKIP, funding_type: SKIP,
141
+ country: SKIP, issuing_bank: SKIP, category: SKIP,
142
+ level: SKIP, additional_properties: nil)
143
+ # Add additional model properties to the instance
144
+ additional_properties = {} if additional_properties.nil?
145
+
146
+ @token = token
147
+ @scheme = scheme unless scheme == SKIP
148
+ @cardholder_full_name = cardholder_full_name unless cardholder_full_name == SKIP
149
+ @masked_number = masked_number unless masked_number == SKIP
150
+ @display_name = display_name unless display_name == SKIP
151
+ @funding_type = funding_type unless funding_type == SKIP
152
+ @country = country unless country == SKIP
153
+ @issuing_bank = issuing_bank unless issuing_bank == SKIP
154
+ @category = category unless category == SKIP
155
+ @level = level unless level == SKIP
156
+ @additional_properties = additional_properties
157
+ end
158
+
159
+ # Creates an instance of the object from a hash.
160
+ def self.from_hash(hash)
161
+ return nil unless hash
162
+
163
+ # Extract variables from the hash.
164
+ token = hash.key?('token') ? hash['token'] : nil
165
+ scheme = hash.key?('scheme') ? hash['scheme'] : SKIP
166
+ cardholder_full_name =
167
+ hash.key?('cardholderFullName') ? hash['cardholderFullName'] : SKIP
168
+ masked_number = hash.key?('maskedNumber') ? hash['maskedNumber'] : SKIP
169
+ display_name = hash.key?('displayName') ? hash['displayName'] : SKIP
170
+ funding_type = hash.key?('fundingType') ? hash['fundingType'] : SKIP
171
+ country = hash.key?('country') ? hash['country'] : SKIP
172
+ issuing_bank = hash.key?('issuingBank') ? hash['issuingBank'] : SKIP
173
+ category = hash.key?('category') ? hash['category'] : SKIP
174
+ level = hash.key?('level') ? hash['level'] : SKIP
175
+
176
+ # Create a new hash for additional properties, removing known properties.
177
+ new_hash = hash.reject { |k, _| names.value?(k) }
178
+
179
+ additional_properties = APIHelper.get_additional_properties(
180
+ new_hash, proc { |value| value }
181
+ )
182
+
183
+ # Create object from extracted values.
184
+ CardInstrumentCardNode.new(token: token,
185
+ scheme: scheme,
186
+ cardholder_full_name: cardholder_full_name,
187
+ masked_number: masked_number,
188
+ display_name: display_name,
189
+ funding_type: funding_type,
190
+ country: country,
191
+ issuing_bank: issuing_bank,
192
+ category: category,
193
+ level: level,
194
+ additional_properties: additional_properties)
195
+ end
196
+
197
+ # Validates an instance of the object from a given value.
198
+ # @param [CardInstrumentCardNode | Hash] The value against the validation is performed.
199
+ def self.validate(value)
200
+ if value.instance_of? self
201
+ return APIHelper.valid_type?(value.token,
202
+ ->(val) { val.instance_of? String })
203
+ end
204
+
205
+ return false unless value.instance_of? Hash
206
+
207
+ APIHelper.valid_type?(value['token'],
208
+ ->(val) { val.instance_of? String })
209
+ end
210
+
211
+ # Provides a human-readable string representation of the object.
212
+ def to_s
213
+ class_name = self.class.name.split('::').last
214
+ "<#{class_name} token: #{@token}, scheme: #{@scheme}, cardholder_full_name:"\
215
+ " #{@cardholder_full_name}, masked_number: #{@masked_number}, display_name:"\
216
+ " #{@display_name}, funding_type: #{@funding_type}, country: #{@country}, issuing_bank:"\
217
+ " #{@issuing_bank}, category: #{@category}, level: #{@level}, additional_properties:"\
218
+ " #{@additional_properties}>"
219
+ end
220
+
221
+ # Provides a debugging-friendly string with detailed object information.
222
+ def inspect
223
+ class_name = self.class.name.split('::').last
224
+ "<#{class_name} token: #{@token.inspect}, scheme: #{@scheme.inspect}, cardholder_full_name:"\
225
+ " #{@cardholder_full_name.inspect}, masked_number: #{@masked_number.inspect}, display_name:"\
226
+ " #{@display_name.inspect}, funding_type: #{@funding_type.inspect}, country:"\
227
+ " #{@country.inspect}, issuing_bank: #{@issuing_bank.inspect}, category:"\
228
+ " #{@category.inspect}, level: #{@level.inspect}, additional_properties:"\
229
+ " #{@additional_properties}>"
230
+ end
231
+ end
232
+ end
@@ -0,0 +1,122 @@
1
+ # cell_point_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module CellPointApi
7
+ # CardNumber Model.
8
+ class CardNumber < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Minimum number of digits allowable for the card number.
13
+ # @return [Integer]
14
+ attr_accessor :minimum_digits
15
+
16
+ # Maximum number of digits allowable for the card number.
17
+ # @return [Integer]
18
+ attr_accessor :maximum_digits
19
+
20
+ # How the card number should be visually displayed for a given number of
21
+ # digits.
22
+ # Example:
23
+ # ```
24
+ # "16": "4,4,4,4"
25
+ # ```
26
+ # Would say that for card numbers with 16 digts, show the numbers in
27
+ # 4,4,4,4 chunks.
28
+ # So the number 1234123412341234 should show as:
29
+ # 1234-1234-1234-1234
30
+ # @return [Hash[String, String]]
31
+ attr_accessor :visual_formats
32
+
33
+ # Location of file to retrieve bin ranges for this card scheme.
34
+ # These bin ranges can be used to identify the card.
35
+ # @return [String]
36
+ attr_accessor :bin_ranges
37
+
38
+ # If numbers for this card scheme are verifiable using Luhn's algorithm or
39
+ # not.
40
+ # @return [TrueClass | FalseClass]
41
+ attr_accessor :luhn_verifiable
42
+
43
+ # A mapping from model property names to API property names.
44
+ def self.names
45
+ @_hash = {} if @_hash.nil?
46
+ @_hash['minimum_digits'] = 'minimumDigits'
47
+ @_hash['maximum_digits'] = 'maximumDigits'
48
+ @_hash['visual_formats'] = 'visualFormats'
49
+ @_hash['bin_ranges'] = 'binRanges'
50
+ @_hash['luhn_verifiable'] = 'luhnVerifiable'
51
+ @_hash
52
+ end
53
+
54
+ # An array for optional fields
55
+ def self.optionals
56
+ []
57
+ end
58
+
59
+ # An array for nullable fields
60
+ def self.nullables
61
+ []
62
+ end
63
+
64
+ def initialize(minimum_digits:, maximum_digits:, visual_formats:,
65
+ bin_ranges:, luhn_verifiable:, additional_properties: nil)
66
+ # Add additional model properties to the instance
67
+ additional_properties = {} if additional_properties.nil?
68
+
69
+ @minimum_digits = minimum_digits
70
+ @maximum_digits = maximum_digits
71
+ @visual_formats = visual_formats
72
+ @bin_ranges = bin_ranges
73
+ @luhn_verifiable = luhn_verifiable
74
+ @additional_properties = additional_properties
75
+ end
76
+
77
+ # Creates an instance of the object from a hash.
78
+ def self.from_hash(hash)
79
+ return nil unless hash
80
+
81
+ # Extract variables from the hash.
82
+ minimum_digits = hash.key?('minimumDigits') ? hash['minimumDigits'] : nil
83
+ maximum_digits = hash.key?('maximumDigits') ? hash['maximumDigits'] : nil
84
+ visual_formats = hash.key?('visualFormats') ? hash['visualFormats'] : nil
85
+ bin_ranges = hash.key?('binRanges') ? hash['binRanges'] : nil
86
+ luhn_verifiable =
87
+ hash.key?('luhnVerifiable') ? hash['luhnVerifiable'] : nil
88
+
89
+ # Create a new hash for additional properties, removing known properties.
90
+ new_hash = hash.reject { |k, _| names.value?(k) }
91
+
92
+ additional_properties = APIHelper.get_additional_properties(
93
+ new_hash, proc { |value| value }
94
+ )
95
+
96
+ # Create object from extracted values.
97
+ CardNumber.new(minimum_digits: minimum_digits,
98
+ maximum_digits: maximum_digits,
99
+ visual_formats: visual_formats,
100
+ bin_ranges: bin_ranges,
101
+ luhn_verifiable: luhn_verifiable,
102
+ additional_properties: additional_properties)
103
+ end
104
+
105
+ # Provides a human-readable string representation of the object.
106
+ def to_s
107
+ class_name = self.class.name.split('::').last
108
+ "<#{class_name} minimum_digits: #{@minimum_digits}, maximum_digits: #{@maximum_digits},"\
109
+ " visual_formats: #{@visual_formats}, bin_ranges: #{@bin_ranges}, luhn_verifiable:"\
110
+ " #{@luhn_verifiable}, additional_properties: #{@additional_properties}>"
111
+ end
112
+
113
+ # Provides a debugging-friendly string with detailed object information.
114
+ def inspect
115
+ class_name = self.class.name.split('::').last
116
+ "<#{class_name} minimum_digits: #{@minimum_digits.inspect}, maximum_digits:"\
117
+ " #{@maximum_digits.inspect}, visual_formats: #{@visual_formats.inspect}, bin_ranges:"\
118
+ " #{@bin_ranges.inspect}, luhn_verifiable: #{@luhn_verifiable.inspect},"\
119
+ " additional_properties: #{@additional_properties}>"
120
+ end
121
+ end
122
+ end
@@ -0,0 +1,136 @@
1
+ # cell_point_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module CellPointApi
7
+ # The card payment instrument.
8
+ class CardPaymentInstrument < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Payment method type.
13
+ # @return [PaymentMethod]
14
+ attr_accessor :method
15
+
16
+ # Card that was used in the payment.
17
+ # @return [CardInstrumentCardNode]
18
+ attr_accessor :card
19
+
20
+ # A mailing address.
21
+ # @return [PostalAddress]
22
+ attr_accessor :billing_address
23
+
24
+ # Telephone number.
25
+ # @return [Phone]
26
+ attr_accessor :phone
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['method'] = 'method'
32
+ @_hash['card'] = 'card'
33
+ @_hash['billing_address'] = 'billingAddress'
34
+ @_hash['phone'] = 'phone'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ []
41
+ end
42
+
43
+ # An array for nullable fields
44
+ def self.nullables
45
+ []
46
+ end
47
+
48
+ def initialize(method:, card:, billing_address:, phone:,
49
+ additional_properties: nil)
50
+ # Add additional model properties to the instance
51
+ additional_properties = {} if additional_properties.nil?
52
+
53
+ @method = method
54
+ @card = card
55
+ @billing_address = billing_address
56
+ @phone = phone
57
+ @additional_properties = additional_properties
58
+ end
59
+
60
+ # Creates an instance of the object from a hash.
61
+ def self.from_hash(hash)
62
+ return nil unless hash
63
+
64
+ # Extract variables from the hash.
65
+ method = hash.key?('method') ? hash['method'] : nil
66
+ card = CardInstrumentCardNode.from_hash(hash['card']) if hash['card']
67
+ billing_address = PostalAddress.from_hash(hash['billingAddress']) if hash['billingAddress']
68
+ phone = Phone.from_hash(hash['phone']) if hash['phone']
69
+
70
+ # Create a new hash for additional properties, removing known properties.
71
+ new_hash = hash.reject { |k, _| names.value?(k) }
72
+
73
+ additional_properties = APIHelper.get_additional_properties(
74
+ new_hash, proc { |value| value }
75
+ )
76
+
77
+ # Create object from extracted values.
78
+ CardPaymentInstrument.new(method: method,
79
+ card: card,
80
+ billing_address: billing_address,
81
+ phone: phone,
82
+ additional_properties: additional_properties)
83
+ end
84
+
85
+ # Validates an instance of the object from a given value.
86
+ # @param [CardPaymentInstrument | Hash] The value against the validation is performed.
87
+ def self.validate(value)
88
+ if value.instance_of? self
89
+ return (
90
+ APIHelper.valid_type?(value.method,
91
+ ->(val) { PaymentMethod.validate(val) }) and
92
+ APIHelper.valid_type?(value.card,
93
+ ->(val) { CardInstrumentCardNode.validate(val) },
94
+ is_model_hash: true) and
95
+ APIHelper.valid_type?(value.billing_address,
96
+ ->(val) { PostalAddress.validate(val) },
97
+ is_model_hash: true) and
98
+ APIHelper.valid_type?(value.phone,
99
+ ->(val) { Phone.validate(val) },
100
+ is_model_hash: true)
101
+ )
102
+ end
103
+
104
+ return false unless value.instance_of? Hash
105
+
106
+ (
107
+ APIHelper.valid_type?(value['method'],
108
+ ->(val) { PaymentMethod.validate(val) }) and
109
+ APIHelper.valid_type?(value['card'],
110
+ ->(val) { CardInstrumentCardNode.validate(val) },
111
+ is_model_hash: true) and
112
+ APIHelper.valid_type?(value['billingAddress'],
113
+ ->(val) { PostalAddress.validate(val) },
114
+ is_model_hash: true) and
115
+ APIHelper.valid_type?(value['phone'],
116
+ ->(val) { Phone.validate(val) },
117
+ is_model_hash: true)
118
+ )
119
+ end
120
+
121
+ # Provides a human-readable string representation of the object.
122
+ def to_s
123
+ class_name = self.class.name.split('::').last
124
+ "<#{class_name} method: #{@method}, card: #{@card}, billing_address: #{@billing_address},"\
125
+ " phone: #{@phone}, additional_properties: #{@additional_properties}>"
126
+ end
127
+
128
+ # Provides a debugging-friendly string with detailed object information.
129
+ def inspect
130
+ class_name = self.class.name.split('::').last
131
+ "<#{class_name} method: #{@method.inspect}, card: #{@card.inspect}, billing_address:"\
132
+ " #{@billing_address.inspect}, phone: #{@phone.inspect}, additional_properties:"\
133
+ " #{@additional_properties}>"
134
+ end
135
+ end
136
+ end
@@ -0,0 +1,63 @@
1
+ # cell_point_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module CellPointApi
7
+ # Card Scheme networks connects acquiring banks to issuing banks so that a
8
+ # customer transaction can be verified. Is a middle man that also provide
9
+ # additional services, such as data processing, international transactions,
10
+ # etc.
11
+ class CardScheme
12
+ CARD_SCHEME = [
13
+ # TODO: Write general description for AMERICAN_EXPRESS
14
+ AMERICAN_EXPRESS = 'AMERICAN_EXPRESS'.freeze,
15
+
16
+ # TODO: Write general description for DINERS
17
+ DINERS = 'DINERS'.freeze,
18
+
19
+ # TODO: Write general description for DISCOVER
20
+ DISCOVER = 'DISCOVER'.freeze,
21
+
22
+ # TODO: Write general description for JCB
23
+ JCB = 'JCB'.freeze,
24
+
25
+ # TODO: Write general description for MASTERCARD
26
+ MASTERCARD = 'MASTERCARD'.freeze,
27
+
28
+ # TODO: Write general description for UATP
29
+ UATP = 'UATP'.freeze,
30
+
31
+ # TODO: Write general description for UNION_PAY
32
+ UNION_PAY = 'UNION_PAY'.freeze,
33
+
34
+ # TODO: Write general description for VISA
35
+ VISA = 'VISA'.freeze
36
+ ].freeze
37
+
38
+ def self.validate(value)
39
+ return false if value.nil?
40
+
41
+ CARD_SCHEME.include?(value)
42
+ end
43
+
44
+ def self.from_value(value, default_value = AMERICAN_EXPRESS)
45
+ return default_value if value.nil?
46
+
47
+ str = value.to_s.strip
48
+
49
+ case str.downcase
50
+ when 'american_express' then AMERICAN_EXPRESS
51
+ when 'diners' then DINERS
52
+ when 'discover' then DISCOVER
53
+ when 'jcb' then JCB
54
+ when 'mastercard' then MASTERCARD
55
+ when 'uatp' then UATP
56
+ when 'union_pay' then UNION_PAY
57
+ when 'visa' then VISA
58
+ else
59
+ default_value
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,87 @@
1
+ # cell_point_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module CellPointApi
7
+ # How to configure a given card scheme.
8
+ class CardSchemeConfiguration < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Card Scheme networks connects acquiring banks to issuing banks so that a
13
+ # customer transaction can be verified.
14
+ # Is a middle man that also provide additional services, such as data
15
+ # processing, international transactions, etc.
16
+ # @return [CardScheme]
17
+ attr_accessor :scheme
18
+
19
+ # How to configure a given card scheme.
20
+ # @return [Configuration]
21
+ attr_accessor :configuration
22
+
23
+ # A mapping from model property names to API property names.
24
+ def self.names
25
+ @_hash = {} if @_hash.nil?
26
+ @_hash['scheme'] = 'scheme'
27
+ @_hash['configuration'] = 'configuration'
28
+ @_hash
29
+ end
30
+
31
+ # An array for optional fields
32
+ def self.optionals
33
+ %w[
34
+ configuration
35
+ ]
36
+ end
37
+
38
+ # An array for nullable fields
39
+ def self.nullables
40
+ []
41
+ end
42
+
43
+ def initialize(scheme:, configuration: SKIP, additional_properties: nil)
44
+ # Add additional model properties to the instance
45
+ additional_properties = {} if additional_properties.nil?
46
+
47
+ @scheme = scheme
48
+ @configuration = configuration unless configuration == SKIP
49
+ @additional_properties = additional_properties
50
+ end
51
+
52
+ # Creates an instance of the object from a hash.
53
+ def self.from_hash(hash)
54
+ return nil unless hash
55
+
56
+ # Extract variables from the hash.
57
+ scheme = hash.key?('scheme') ? hash['scheme'] : nil
58
+ configuration = Configuration.from_hash(hash['configuration']) if hash['configuration']
59
+
60
+ # Create a new hash for additional properties, removing known properties.
61
+ new_hash = hash.reject { |k, _| names.value?(k) }
62
+
63
+ additional_properties = APIHelper.get_additional_properties(
64
+ new_hash, proc { |value| value }
65
+ )
66
+
67
+ # Create object from extracted values.
68
+ CardSchemeConfiguration.new(scheme: scheme,
69
+ configuration: configuration,
70
+ additional_properties: additional_properties)
71
+ end
72
+
73
+ # Provides a human-readable string representation of the object.
74
+ def to_s
75
+ class_name = self.class.name.split('::').last
76
+ "<#{class_name} scheme: #{@scheme}, configuration: #{@configuration},"\
77
+ " additional_properties: #{@additional_properties}>"
78
+ end
79
+
80
+ # Provides a debugging-friendly string with detailed object information.
81
+ def inspect
82
+ class_name = self.class.name.split('::').last
83
+ "<#{class_name} scheme: #{@scheme.inspect}, configuration: #{@configuration.inspect},"\
84
+ " additional_properties: #{@additional_properties}>"
85
+ end
86
+ end
87
+ end