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,120 @@
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
+ # Full name of an individual.
8
+ class CompletePersonName < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Name bestowed upon an individual to differentiate them from other members
13
+ # of a group that share a family name.
14
+ # In the U.S., the first name of a Person.
15
+ # @return [String]
16
+ attr_accessor :given_name
17
+
18
+ # Name bestowed upon an individual to denote membership in a group or
19
+ # family.
20
+ # In the U.S., the last name of a Person.
21
+ # @return [String]
22
+ attr_accessor :family_name
23
+
24
+ # Secondary name bestowed upon an individual to differentiate them from
25
+ # others that have the same given name.
26
+ # @return [String]
27
+ attr_accessor :middle_name
28
+
29
+ # The portion of a name's full form of address that precedes the name
30
+ # itself.
31
+ # @return [String]
32
+ attr_accessor :name_prefix
33
+
34
+ # The portion of a name's full form of address that follows the name itself.
35
+ # @return [String]
36
+ attr_accessor :name_suffix
37
+
38
+ # A mapping from model property names to API property names.
39
+ def self.names
40
+ @_hash = {} if @_hash.nil?
41
+ @_hash['given_name'] = 'givenName'
42
+ @_hash['family_name'] = 'familyName'
43
+ @_hash['middle_name'] = 'middleName'
44
+ @_hash['name_prefix'] = 'namePrefix'
45
+ @_hash['name_suffix'] = 'nameSuffix'
46
+ @_hash
47
+ end
48
+
49
+ # An array for optional fields
50
+ def self.optionals
51
+ %w[
52
+ middle_name
53
+ name_prefix
54
+ name_suffix
55
+ ]
56
+ end
57
+
58
+ # An array for nullable fields
59
+ def self.nullables
60
+ []
61
+ end
62
+
63
+ def initialize(given_name:, family_name:, middle_name: SKIP,
64
+ name_prefix: SKIP, name_suffix: SKIP,
65
+ additional_properties: nil)
66
+ # Add additional model properties to the instance
67
+ additional_properties = {} if additional_properties.nil?
68
+
69
+ @given_name = given_name
70
+ @family_name = family_name
71
+ @middle_name = middle_name unless middle_name == SKIP
72
+ @name_prefix = name_prefix unless name_prefix == SKIP
73
+ @name_suffix = name_suffix unless name_suffix == SKIP
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
+ given_name = hash.key?('givenName') ? hash['givenName'] : nil
83
+ family_name = hash.key?('familyName') ? hash['familyName'] : nil
84
+ middle_name = hash.key?('middleName') ? hash['middleName'] : SKIP
85
+ name_prefix = hash.key?('namePrefix') ? hash['namePrefix'] : SKIP
86
+ name_suffix = hash.key?('nameSuffix') ? hash['nameSuffix'] : SKIP
87
+
88
+ # Create a new hash for additional properties, removing known properties.
89
+ new_hash = hash.reject { |k, _| names.value?(k) }
90
+
91
+ additional_properties = APIHelper.get_additional_properties(
92
+ new_hash, proc { |value| value }
93
+ )
94
+
95
+ # Create object from extracted values.
96
+ CompletePersonName.new(given_name: given_name,
97
+ family_name: family_name,
98
+ middle_name: middle_name,
99
+ name_prefix: name_prefix,
100
+ name_suffix: name_suffix,
101
+ additional_properties: additional_properties)
102
+ end
103
+
104
+ # Provides a human-readable string representation of the object.
105
+ def to_s
106
+ class_name = self.class.name.split('::').last
107
+ "<#{class_name} given_name: #{@given_name}, family_name: #{@family_name}, middle_name:"\
108
+ " #{@middle_name}, name_prefix: #{@name_prefix}, name_suffix: #{@name_suffix},"\
109
+ " additional_properties: #{@additional_properties}>"
110
+ end
111
+
112
+ # Provides a debugging-friendly string with detailed object information.
113
+ def inspect
114
+ class_name = self.class.name.split('::').last
115
+ "<#{class_name} given_name: #{@given_name.inspect}, family_name: #{@family_name.inspect},"\
116
+ " middle_name: #{@middle_name.inspect}, name_prefix: #{@name_prefix.inspect}, name_suffix:"\
117
+ " #{@name_suffix.inspect}, additional_properties: #{@additional_properties}>"
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,93 @@
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
+ # CompletionRedirect Model.
8
+ class CompletionRedirect < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Url that buyer should be redirected to, after successfully paying for the
13
+ # order.
14
+ # @return [String]
15
+ attr_accessor :success_url
16
+
17
+ # Url that buyer should be redirected to, after cancelling the order.
18
+ # @return [String]
19
+ attr_accessor :cancel_url
20
+
21
+ # Url that buyer should be redirected to, after a failure in paying for the
22
+ # order.
23
+ # @return [String]
24
+ attr_accessor :failure_url
25
+
26
+ # A mapping from model property names to API property names.
27
+ def self.names
28
+ @_hash = {} if @_hash.nil?
29
+ @_hash['success_url'] = 'successUrl'
30
+ @_hash['cancel_url'] = 'cancelUrl'
31
+ @_hash['failure_url'] = 'failureUrl'
32
+ @_hash
33
+ end
34
+
35
+ # An array for optional fields
36
+ def self.optionals
37
+ []
38
+ end
39
+
40
+ # An array for nullable fields
41
+ def self.nullables
42
+ []
43
+ end
44
+
45
+ def initialize(success_url:, cancel_url:, failure_url:,
46
+ additional_properties: nil)
47
+ # Add additional model properties to the instance
48
+ additional_properties = {} if additional_properties.nil?
49
+
50
+ @success_url = success_url
51
+ @cancel_url = cancel_url
52
+ @failure_url = failure_url
53
+ @additional_properties = additional_properties
54
+ end
55
+
56
+ # Creates an instance of the object from a hash.
57
+ def self.from_hash(hash)
58
+ return nil unless hash
59
+
60
+ # Extract variables from the hash.
61
+ success_url = hash.key?('successUrl') ? hash['successUrl'] : nil
62
+ cancel_url = hash.key?('cancelUrl') ? hash['cancelUrl'] : nil
63
+ failure_url = hash.key?('failureUrl') ? hash['failureUrl'] : nil
64
+
65
+ # Create a new hash for additional properties, removing known properties.
66
+ new_hash = hash.reject { |k, _| names.value?(k) }
67
+
68
+ additional_properties = APIHelper.get_additional_properties(
69
+ new_hash, proc { |value| value }
70
+ )
71
+
72
+ # Create object from extracted values.
73
+ CompletionRedirect.new(success_url: success_url,
74
+ cancel_url: cancel_url,
75
+ failure_url: failure_url,
76
+ additional_properties: additional_properties)
77
+ end
78
+
79
+ # Provides a human-readable string representation of the object.
80
+ def to_s
81
+ class_name = self.class.name.split('::').last
82
+ "<#{class_name} success_url: #{@success_url}, cancel_url: #{@cancel_url}, failure_url:"\
83
+ " #{@failure_url}, additional_properties: #{@additional_properties}>"
84
+ end
85
+
86
+ # Provides a debugging-friendly string with detailed object information.
87
+ def inspect
88
+ class_name = self.class.name.split('::').last
89
+ "<#{class_name} success_url: #{@success_url.inspect}, cancel_url: #{@cancel_url.inspect},"\
90
+ " failure_url: #{@failure_url.inspect}, additional_properties: #{@additional_properties}>"
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,86 @@
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 Configuration < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Configuration related to card security codes (e.g. CVVs).
13
+ # @return [SecurityCode]
14
+ attr_accessor :security_code
15
+
16
+ # Configuration related to card security codes (e.g. CVVs).
17
+ # @return [CardNumber]
18
+ attr_accessor :card_number
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['security_code'] = 'securityCode'
24
+ @_hash['card_number'] = 'cardNumber'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ security_code
32
+ card_number
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(security_code: SKIP, card_number: SKIP,
42
+ additional_properties: nil)
43
+ # Add additional model properties to the instance
44
+ additional_properties = {} if additional_properties.nil?
45
+
46
+ @security_code = security_code unless security_code == SKIP
47
+ @card_number = card_number unless card_number == SKIP
48
+ @additional_properties = additional_properties
49
+ end
50
+
51
+ # Creates an instance of the object from a hash.
52
+ def self.from_hash(hash)
53
+ return nil unless hash
54
+
55
+ # Extract variables from the hash.
56
+ security_code = SecurityCode.from_hash(hash['securityCode']) if hash['securityCode']
57
+ card_number = CardNumber.from_hash(hash['cardNumber']) if hash['cardNumber']
58
+
59
+ # Create a new hash for additional properties, removing known properties.
60
+ new_hash = hash.reject { |k, _| names.value?(k) }
61
+
62
+ additional_properties = APIHelper.get_additional_properties(
63
+ new_hash, proc { |value| value }
64
+ )
65
+
66
+ # Create object from extracted values.
67
+ Configuration.new(security_code: security_code,
68
+ card_number: card_number,
69
+ additional_properties: additional_properties)
70
+ end
71
+
72
+ # Provides a human-readable string representation of the object.
73
+ def to_s
74
+ class_name = self.class.name.split('::').last
75
+ "<#{class_name} security_code: #{@security_code}, card_number: #{@card_number},"\
76
+ " additional_properties: #{@additional_properties}>"
77
+ end
78
+
79
+ # Provides a debugging-friendly string with detailed object information.
80
+ def inspect
81
+ class_name = self.class.name.split('::').last
82
+ "<#{class_name} security_code: #{@security_code.inspect}, card_number:"\
83
+ " #{@card_number.inspect}, additional_properties: #{@additional_properties}>"
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,82 @@
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
+ # Contains contact data for the cardholder.
8
+ class ContactData < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # A mailing address.
13
+ # @return [PostalAddress]
14
+ attr_accessor :billing_address
15
+
16
+ # Telephone number.
17
+ # @return [Phone]
18
+ attr_accessor :phone
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['billing_address'] = 'billingAddress'
24
+ @_hash['phone'] = 'phone'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ []
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(billing_address:, phone:, additional_properties: nil)
39
+ # Add additional model properties to the instance
40
+ additional_properties = {} if additional_properties.nil?
41
+
42
+ @billing_address = billing_address
43
+ @phone = phone
44
+ @additional_properties = additional_properties
45
+ end
46
+
47
+ # Creates an instance of the object from a hash.
48
+ def self.from_hash(hash)
49
+ return nil unless hash
50
+
51
+ # Extract variables from the hash.
52
+ billing_address = PostalAddress.from_hash(hash['billingAddress']) if hash['billingAddress']
53
+ phone = Phone.from_hash(hash['phone']) if hash['phone']
54
+
55
+ # Create a new hash for additional properties, removing known properties.
56
+ new_hash = hash.reject { |k, _| names.value?(k) }
57
+
58
+ additional_properties = APIHelper.get_additional_properties(
59
+ new_hash, proc { |value| value }
60
+ )
61
+
62
+ # Create object from extracted values.
63
+ ContactData.new(billing_address: billing_address,
64
+ phone: phone,
65
+ additional_properties: additional_properties)
66
+ end
67
+
68
+ # Provides a human-readable string representation of the object.
69
+ def to_s
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} billing_address: #{@billing_address}, phone: #{@phone},"\
72
+ " additional_properties: #{@additional_properties}>"
73
+ end
74
+
75
+ # Provides a debugging-friendly string with detailed object information.
76
+ def inspect
77
+ class_name = self.class.name.split('::').last
78
+ "<#{class_name} billing_address: #{@billing_address.inspect}, phone: #{@phone.inspect},"\
79
+ " additional_properties: #{@additional_properties}>"
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,74 @@
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
+ # Get type of CPU architecture from user-agent string.
8
+ class Cpu < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :architecture
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['architecture'] = 'architecture'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ []
26
+ end
27
+
28
+ # An array for nullable fields
29
+ def self.nullables
30
+ []
31
+ end
32
+
33
+ def initialize(architecture:, additional_properties: nil)
34
+ # Add additional model properties to the instance
35
+ additional_properties = {} if additional_properties.nil?
36
+
37
+ @architecture = architecture
38
+ @additional_properties = additional_properties
39
+ end
40
+
41
+ # Creates an instance of the object from a hash.
42
+ def self.from_hash(hash)
43
+ return nil unless hash
44
+
45
+ # Extract variables from the hash.
46
+ architecture = hash.key?('architecture') ? hash['architecture'] : nil
47
+
48
+ # Create a new hash for additional properties, removing known properties.
49
+ new_hash = hash.reject { |k, _| names.value?(k) }
50
+
51
+ additional_properties = APIHelper.get_additional_properties(
52
+ new_hash, proc { |value| value }
53
+ )
54
+
55
+ # Create object from extracted values.
56
+ Cpu.new(architecture: architecture,
57
+ additional_properties: additional_properties)
58
+ end
59
+
60
+ # Provides a human-readable string representation of the object.
61
+ def to_s
62
+ class_name = self.class.name.split('::').last
63
+ "<#{class_name} architecture: #{@architecture}, additional_properties:"\
64
+ " #{@additional_properties}>"
65
+ end
66
+
67
+ # Provides a debugging-friendly string with detailed object information.
68
+ def inspect
69
+ class_name = self.class.name.split('::').last
70
+ "<#{class_name} architecture: #{@architecture.inspect}, additional_properties:"\
71
+ " #{@additional_properties}>"
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,60 @@
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 device operating system.
8
+ class DeviceOs
9
+ DEVICE_OS = [
10
+ # TODO: Write general description for WINDOWS
11
+ WINDOWS = 'WINDOWS'.freeze,
12
+
13
+ # TODO: Write general description for LINUX
14
+ LINUX = 'LINUX'.freeze,
15
+
16
+ # TODO: Write general description for MACOS
17
+ MACOS = 'MACOS'.freeze,
18
+
19
+ # TODO: Write general description for IOS
20
+ IOS = 'IOS'.freeze,
21
+
22
+ # TODO: Write general description for IPADOS
23
+ IPADOS = 'IPADOS'.freeze,
24
+
25
+ # TODO: Write general description for VISIONOS
26
+ VISIONOS = 'VISIONOS'.freeze,
27
+
28
+ # TODO: Write general description for ANDROID
29
+ ANDROID = 'ANDROID'.freeze,
30
+
31
+ # TODO: Write general description for OTHER
32
+ OTHER = 'OTHER'.freeze
33
+ ].freeze
34
+
35
+ def self.validate(value)
36
+ return false if value.nil?
37
+
38
+ DEVICE_OS.include?(value)
39
+ end
40
+
41
+ def self.from_value(value, default_value = WINDOWS)
42
+ return default_value if value.nil?
43
+
44
+ str = value.to_s.strip
45
+
46
+ case str.downcase
47
+ when 'windows' then WINDOWS
48
+ when 'linux' then LINUX
49
+ when 'macos' then MACOS
50
+ when 'ios' then IOS
51
+ when 'ipados' then IPADOS
52
+ when 'visionos' then VISIONOS
53
+ when 'android' then ANDROID
54
+ when 'other' then OTHER
55
+ else
56
+ default_value
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,150 @@
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
+ # Represents a discount that is part of a bundle.
8
+ class Discount < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Discriminator used to identify the type of line item.
13
+ # @return [String]
14
+ attr_reader :type
15
+
16
+ # What should be shown as the title of the line item on a receipt or billing
17
+ # summary.
18
+ # @return [String]
19
+ attr_accessor :title
20
+
21
+ # AuthorizationGroup that the line item should be part of for splitting
22
+ # authorizations for Aggregate Payments Payments.
23
+ # If this is set, there must be a matching AuthorizationGroup created in the
24
+ # PriceSummary.
25
+ # > NOTE: Items within a Bundle should not have an `authorizationGroupId`,
26
+ # they will use the same `authorizationGroupId` as the top-level bundle.
27
+ # @return [String]
28
+ attr_accessor :authorization_group_id
29
+
30
+ # The code that has been applied as a promotion.
31
+ # @return [String]
32
+ attr_accessor :discount_code
33
+
34
+ # An amount that is a nonpositive number, i.e. {0, -1, -2, -3, -4, -5,…}
35
+ # @return [NonPositiveAmount]
36
+ attr_accessor :discount_amount
37
+
38
+ # A mapping from model property names to API property names.
39
+ def self.names
40
+ @_hash = {} if @_hash.nil?
41
+ @_hash['type'] = 'type'
42
+ @_hash['title'] = 'title'
43
+ @_hash['authorization_group_id'] = 'authorizationGroupId'
44
+ @_hash['discount_code'] = 'discountCode'
45
+ @_hash['discount_amount'] = 'discountAmount'
46
+ @_hash
47
+ end
48
+
49
+ # An array for optional fields
50
+ def self.optionals
51
+ %w[
52
+ authorization_group_id
53
+ ]
54
+ end
55
+
56
+ # An array for nullable fields
57
+ def self.nullables
58
+ []
59
+ end
60
+
61
+ def initialize(title:, discount_code:, discount_amount:,
62
+ authorization_group_id: SKIP, additional_properties: nil)
63
+ # Add additional model properties to the instance
64
+ additional_properties = {} if additional_properties.nil?
65
+
66
+ @type = 'DISCOUNT'
67
+ @title = title
68
+ @authorization_group_id = authorization_group_id unless authorization_group_id == SKIP
69
+ @discount_code = discount_code
70
+ @discount_amount = discount_amount
71
+ @additional_properties = additional_properties
72
+ end
73
+
74
+ # Creates an instance of the object from a hash.
75
+ def self.from_hash(hash)
76
+ return nil unless hash
77
+
78
+ # Extract variables from the hash.
79
+ title = hash.key?('title') ? hash['title'] : nil
80
+ discount_code = hash.key?('discountCode') ? hash['discountCode'] : nil
81
+ discount_amount = NonPositiveAmount.from_hash(hash['discountAmount']) if
82
+ hash['discountAmount']
83
+ authorization_group_id =
84
+ hash.key?('authorizationGroupId') ? hash['authorizationGroupId'] : SKIP
85
+
86
+ # Create a new hash for additional properties, removing known properties.
87
+ new_hash = hash.reject { |k, _| names.value?(k) }
88
+
89
+ additional_properties = APIHelper.get_additional_properties(
90
+ new_hash, proc { |value| value }
91
+ )
92
+
93
+ # Create object from extracted values.
94
+ Discount.new(title: title,
95
+ discount_code: discount_code,
96
+ discount_amount: discount_amount,
97
+ authorization_group_id: authorization_group_id,
98
+ additional_properties: additional_properties)
99
+ end
100
+
101
+ # Validates an instance of the object from a given value.
102
+ # @param [Discount | Hash] The value against the validation is performed.
103
+ def self.validate(value)
104
+ if value.instance_of? self
105
+ return (
106
+ APIHelper.valid_type?(value.type,
107
+ ->(val) { val.instance_of? String }) and
108
+ APIHelper.valid_type?(value.title,
109
+ ->(val) { val.instance_of? String }) and
110
+ APIHelper.valid_type?(value.discount_code,
111
+ ->(val) { val.instance_of? String }) and
112
+ APIHelper.valid_type?(value.discount_amount,
113
+ ->(val) { NonPositiveAmount.validate(val) },
114
+ is_model_hash: true)
115
+ )
116
+ end
117
+
118
+ return false unless value.instance_of? Hash
119
+
120
+ (
121
+ APIHelper.valid_type?(value['type'],
122
+ ->(val) { val.instance_of? String }) and
123
+ APIHelper.valid_type?(value['title'],
124
+ ->(val) { val.instance_of? String }) and
125
+ APIHelper.valid_type?(value['discountCode'],
126
+ ->(val) { val.instance_of? String }) and
127
+ APIHelper.valid_type?(value['discountAmount'],
128
+ ->(val) { NonPositiveAmount.validate(val) },
129
+ is_model_hash: true)
130
+ )
131
+ end
132
+
133
+ # Provides a human-readable string representation of the object.
134
+ def to_s
135
+ class_name = self.class.name.split('::').last
136
+ "<#{class_name} type: #{@type}, title: #{@title}, authorization_group_id:"\
137
+ " #{@authorization_group_id}, discount_code: #{@discount_code}, discount_amount:"\
138
+ " #{@discount_amount}, additional_properties: #{@additional_properties}>"
139
+ end
140
+
141
+ # Provides a debugging-friendly string with detailed object information.
142
+ def inspect
143
+ class_name = self.class.name.split('::').last
144
+ "<#{class_name} type: #{@type.inspect}, title: #{@title.inspect}, authorization_group_id:"\
145
+ " #{@authorization_group_id.inspect}, discount_code: #{@discount_code.inspect},"\
146
+ " discount_amount: #{@discount_amount.inspect}, additional_properties:"\
147
+ " #{@additional_properties}>"
148
+ end
149
+ end
150
+ end