paypal-server-sdk 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (275) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +35 -0
  3. data/README.md +112 -0
  4. data/lib/paypal_server_sdk/api_helper.rb +10 -0
  5. data/lib/paypal_server_sdk/client.rb +85 -0
  6. data/lib/paypal_server_sdk/configuration.rb +109 -0
  7. data/lib/paypal_server_sdk/controllers/base_controller.rb +71 -0
  8. data/lib/paypal_server_sdk/controllers/o_auth_authorization_controller.rb +42 -0
  9. data/lib/paypal_server_sdk/controllers/orders_controller.rb +517 -0
  10. data/lib/paypal_server_sdk/controllers/payments_controller.rb +404 -0
  11. data/lib/paypal_server_sdk/controllers/vault_controller.rb +224 -0
  12. data/lib/paypal_server_sdk/exceptions/api_exception.rb +10 -0
  13. data/lib/paypal_server_sdk/exceptions/error_exception.rb +71 -0
  14. data/lib/paypal_server_sdk/exceptions/o_auth_provider_exception.rb +48 -0
  15. data/lib/paypal_server_sdk/http/api_response.rb +21 -0
  16. data/lib/paypal_server_sdk/http/auth/o_auth2.rb +136 -0
  17. data/lib/paypal_server_sdk/http/http_call_back.rb +10 -0
  18. data/lib/paypal_server_sdk/http/http_method_enum.rb +10 -0
  19. data/lib/paypal_server_sdk/http/http_request.rb +10 -0
  20. data/lib/paypal_server_sdk/http/http_response.rb +10 -0
  21. data/lib/paypal_server_sdk/logging/configuration/api_logging_configuration.rb +114 -0
  22. data/lib/paypal_server_sdk/logging/sdk_logger.rb +17 -0
  23. data/lib/paypal_server_sdk/models/activity_timestamps.rb +68 -0
  24. data/lib/paypal_server_sdk/models/address.rb +116 -0
  25. data/lib/paypal_server_sdk/models/address_details.rb +160 -0
  26. data/lib/paypal_server_sdk/models/amount_breakdown.rb +115 -0
  27. data/lib/paypal_server_sdk/models/amount_with_breakdown.rb +80 -0
  28. data/lib/paypal_server_sdk/models/apple_pay_attributes.rb +60 -0
  29. data/lib/paypal_server_sdk/models/apple_pay_attributes_response.rb +50 -0
  30. data/lib/paypal_server_sdk/models/apple_pay_card.rb +94 -0
  31. data/lib/paypal_server_sdk/models/apple_pay_card_response.rb +167 -0
  32. data/lib/paypal_server_sdk/models/apple_pay_decrypted_token_data.rb +95 -0
  33. data/lib/paypal_server_sdk/models/apple_pay_payment_data.rb +83 -0
  34. data/lib/paypal_server_sdk/models/apple_pay_payment_data_type.rb +24 -0
  35. data/lib/paypal_server_sdk/models/apple_pay_payment_object.rb +114 -0
  36. data/lib/paypal_server_sdk/models/apple_pay_payment_token.rb +51 -0
  37. data/lib/paypal_server_sdk/models/apple_pay_request.rb +137 -0
  38. data/lib/paypal_server_sdk/models/apple_pay_tokenized_card.rb +113 -0
  39. data/lib/paypal_server_sdk/models/assurance_details.rb +68 -0
  40. data/lib/paypal_server_sdk/models/authentication_response.rb +61 -0
  41. data/lib/paypal_server_sdk/models/authorization.rb +192 -0
  42. data/lib/paypal_server_sdk/models/authorization_incomplete_reason.rb +23 -0
  43. data/lib/paypal_server_sdk/models/authorization_status.rb +35 -0
  44. data/lib/paypal_server_sdk/models/authorization_status_details.rb +50 -0
  45. data/lib/paypal_server_sdk/models/authorization_status_with_details.rb +60 -0
  46. data/lib/paypal_server_sdk/models/authorization_with_additional_data.rb +205 -0
  47. data/lib/paypal_server_sdk/models/avs_code.rb +90 -0
  48. data/lib/paypal_server_sdk/models/bancontact_payment_object.rb +95 -0
  49. data/lib/paypal_server_sdk/models/bancontact_payment_request.rb +73 -0
  50. data/lib/paypal_server_sdk/models/base_model.rb +62 -0
  51. data/lib/paypal_server_sdk/models/bin_details.rb +88 -0
  52. data/lib/paypal_server_sdk/models/blik_experience_context.rb +122 -0
  53. data/lib/paypal_server_sdk/models/blik_level0_payment_object.rb +48 -0
  54. data/lib/paypal_server_sdk/models/blik_one_click_payment_object.rb +52 -0
  55. data/lib/paypal_server_sdk/models/blik_one_click_payment_request.rb +82 -0
  56. data/lib/paypal_server_sdk/models/blik_payment_object.rb +86 -0
  57. data/lib/paypal_server_sdk/models/blik_payment_request.rb +105 -0
  58. data/lib/paypal_server_sdk/models/capture.rb +228 -0
  59. data/lib/paypal_server_sdk/models/capture_incomplete_reason.rb +55 -0
  60. data/lib/paypal_server_sdk/models/capture_payment_instruction.rb +89 -0
  61. data/lib/paypal_server_sdk/models/capture_request.rb +108 -0
  62. data/lib/paypal_server_sdk/models/capture_status.rb +35 -0
  63. data/lib/paypal_server_sdk/models/capture_status_details.rb +50 -0
  64. data/lib/paypal_server_sdk/models/capture_status_with_details.rb +60 -0
  65. data/lib/paypal_server_sdk/models/captured_payment.rb +248 -0
  66. data/lib/paypal_server_sdk/models/card_attributes.rb +70 -0
  67. data/lib/paypal_server_sdk/models/card_attributes_response.rb +50 -0
  68. data/lib/paypal_server_sdk/models/card_authentication_response.rb +51 -0
  69. data/lib/paypal_server_sdk/models/card_brand.rb +93 -0
  70. data/lib/paypal_server_sdk/models/card_customer_information.rb +85 -0
  71. data/lib/paypal_server_sdk/models/card_experience_context.rb +59 -0
  72. data/lib/paypal_server_sdk/models/card_from_request.rb +60 -0
  73. data/lib/paypal_server_sdk/models/card_payment_token.rb +166 -0
  74. data/lib/paypal_server_sdk/models/card_request.rb +176 -0
  75. data/lib/paypal_server_sdk/models/card_response.rb +139 -0
  76. data/lib/paypal_server_sdk/models/card_response_entity.rb +156 -0
  77. data/lib/paypal_server_sdk/models/card_stored_credential.rb +95 -0
  78. data/lib/paypal_server_sdk/models/card_supplementary_data.rb +71 -0
  79. data/lib/paypal_server_sdk/models/card_type.rb +32 -0
  80. data/lib/paypal_server_sdk/models/card_vault_response.rb +86 -0
  81. data/lib/paypal_server_sdk/models/card_verification.rb +51 -0
  82. data/lib/paypal_server_sdk/models/card_verification_details.rb +111 -0
  83. data/lib/paypal_server_sdk/models/card_verification_method.rb +29 -0
  84. data/lib/paypal_server_sdk/models/card_verification_processor_response.rb +62 -0
  85. data/lib/paypal_server_sdk/models/checkout_payment_intent.rb +24 -0
  86. data/lib/paypal_server_sdk/models/cobranded_card.rb +70 -0
  87. data/lib/paypal_server_sdk/models/confirm_order_request.rb +74 -0
  88. data/lib/paypal_server_sdk/models/customer_information.rb +72 -0
  89. data/lib/paypal_server_sdk/models/customer_request.rb +62 -0
  90. data/lib/paypal_server_sdk/models/customer_vault_payment_tokens_response.rb +105 -0
  91. data/lib/paypal_server_sdk/models/cvv_code.rb +60 -0
  92. data/lib/paypal_server_sdk/models/disbursement_mode.rb +23 -0
  93. data/lib/paypal_server_sdk/models/dispute_category.rb +23 -0
  94. data/lib/paypal_server_sdk/models/eci_flag.rb +39 -0
  95. data/lib/paypal_server_sdk/models/enrollment_status.rb +29 -0
  96. data/lib/paypal_server_sdk/models/eps_payment_object.rb +74 -0
  97. data/lib/paypal_server_sdk/models/eps_payment_request.rb +73 -0
  98. data/lib/paypal_server_sdk/models/error_details.rb +110 -0
  99. data/lib/paypal_server_sdk/models/exchange_rate.rb +75 -0
  100. data/lib/paypal_server_sdk/models/experience_context.rb +98 -0
  101. data/lib/paypal_server_sdk/models/fullfillment_type.rb +31 -0
  102. data/lib/paypal_server_sdk/models/giropay_payment_object.rb +74 -0
  103. data/lib/paypal_server_sdk/models/giropay_payment_request.rb +73 -0
  104. data/lib/paypal_server_sdk/models/google_pay_authentication_method.rb +23 -0
  105. data/lib/paypal_server_sdk/models/google_pay_card_attributes.rb +51 -0
  106. data/lib/paypal_server_sdk/models/google_pay_card_response.rb +104 -0
  107. data/lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb +105 -0
  108. data/lib/paypal_server_sdk/models/google_pay_payment_method.rb +20 -0
  109. data/lib/paypal_server_sdk/models/google_pay_request.rb +118 -0
  110. data/lib/paypal_server_sdk/models/google_pay_request_card.rb +84 -0
  111. data/lib/paypal_server_sdk/models/google_pay_wallet_response.rb +85 -0
  112. data/lib/paypal_server_sdk/models/ideal_payment_object.rb +85 -0
  113. data/lib/paypal_server_sdk/models/ideal_payment_request.rb +83 -0
  114. data/lib/paypal_server_sdk/models/item.rb +134 -0
  115. data/lib/paypal_server_sdk/models/item_category.rb +26 -0
  116. data/lib/paypal_server_sdk/models/level2_card_processing_data.rb +66 -0
  117. data/lib/paypal_server_sdk/models/level3_card_processing_data.rb +120 -0
  118. data/lib/paypal_server_sdk/models/liability_shift_indicator.rb +26 -0
  119. data/lib/paypal_server_sdk/models/line_item.rb +177 -0
  120. data/lib/paypal_server_sdk/models/link_description.rb +75 -0
  121. data/lib/paypal_server_sdk/models/link_http_method.rb +41 -0
  122. data/lib/paypal_server_sdk/models/money.rb +62 -0
  123. data/lib/paypal_server_sdk/models/my_bank_payment_object.rb +85 -0
  124. data/lib/paypal_server_sdk/models/my_bank_payment_request.rb +73 -0
  125. data/lib/paypal_server_sdk/models/name.rb +61 -0
  126. data/lib/paypal_server_sdk/models/net_amount_breakdown_item.rb +73 -0
  127. data/lib/paypal_server_sdk/models/network_token.rb +95 -0
  128. data/lib/paypal_server_sdk/models/network_transaction_reference.rb +90 -0
  129. data/lib/paypal_server_sdk/models/network_transaction_reference_entity.rb +88 -0
  130. data/lib/paypal_server_sdk/models/o_auth_provider_error.rb +45 -0
  131. data/lib/paypal_server_sdk/models/o_auth_token.rb +106 -0
  132. data/lib/paypal_server_sdk/models/order.rb +178 -0
  133. data/lib/paypal_server_sdk/models/order_application_context.rb +193 -0
  134. data/lib/paypal_server_sdk/models/order_application_context_landing_page.rb +32 -0
  135. data/lib/paypal_server_sdk/models/order_application_context_shipping_preference.rb +34 -0
  136. data/lib/paypal_server_sdk/models/order_application_context_user_action.rb +29 -0
  137. data/lib/paypal_server_sdk/models/order_authorize_request.rb +51 -0
  138. data/lib/paypal_server_sdk/models/order_authorize_request_payment_source.rb +104 -0
  139. data/lib/paypal_server_sdk/models/order_authorize_response.rb +171 -0
  140. data/lib/paypal_server_sdk/models/order_authorize_response_payment_source.rb +88 -0
  141. data/lib/paypal_server_sdk/models/order_capture_request.rb +51 -0
  142. data/lib/paypal_server_sdk/models/order_capture_request_payment_source.rb +104 -0
  143. data/lib/paypal_server_sdk/models/order_confirm_application_context.rb +109 -0
  144. data/lib/paypal_server_sdk/models/order_request.rb +103 -0
  145. data/lib/paypal_server_sdk/models/order_status.rb +35 -0
  146. data/lib/paypal_server_sdk/models/order_tracker_item.rb +99 -0
  147. data/lib/paypal_server_sdk/models/order_tracker_request.rb +116 -0
  148. data/lib/paypal_server_sdk/models/order_tracker_response.rb +122 -0
  149. data/lib/paypal_server_sdk/models/order_tracker_status.rb +23 -0
  150. data/lib/paypal_server_sdk/models/p24_payment_object.rb +108 -0
  151. data/lib/paypal_server_sdk/models/p24_payment_request.rb +85 -0
  152. data/lib/paypal_server_sdk/models/pa_res_status.rb +42 -0
  153. data/lib/paypal_server_sdk/models/patch.rb +83 -0
  154. data/lib/paypal_server_sdk/models/patch_op.rb +35 -0
  155. data/lib/paypal_server_sdk/models/pay_pal_experience_landing_page.rb +26 -0
  156. data/lib/paypal_server_sdk/models/pay_pal_experience_user_action.rb +24 -0
  157. data/lib/paypal_server_sdk/models/pay_pal_payment_token.rb +180 -0
  158. data/lib/paypal_server_sdk/models/pay_pal_payment_token_customer_type.rb +25 -0
  159. data/lib/paypal_server_sdk/models/pay_pal_payment_token_usage_pattern.rb +35 -0
  160. data/lib/paypal_server_sdk/models/pay_pal_payment_token_usage_type.rb +23 -0
  161. data/lib/paypal_server_sdk/models/pay_pal_wallet.rb +158 -0
  162. data/lib/paypal_server_sdk/models/pay_pal_wallet_account_verification_status.rb +24 -0
  163. data/lib/paypal_server_sdk/models/pay_pal_wallet_attributes.rb +59 -0
  164. data/lib/paypal_server_sdk/models/pay_pal_wallet_attributes_response.rb +70 -0
  165. data/lib/paypal_server_sdk/models/pay_pal_wallet_customer.rb +85 -0
  166. data/lib/paypal_server_sdk/models/pay_pal_wallet_customer_request.rb +85 -0
  167. data/lib/paypal_server_sdk/models/pay_pal_wallet_experience_context.rb +140 -0
  168. data/lib/paypal_server_sdk/models/pay_pal_wallet_response.rb +166 -0
  169. data/lib/paypal_server_sdk/models/pay_pal_wallet_vault_instruction.rb +115 -0
  170. data/lib/paypal_server_sdk/models/pay_pal_wallet_vault_response.rb +86 -0
  171. data/lib/paypal_server_sdk/models/pay_pal_wallet_vault_status.rb +26 -0
  172. data/lib/paypal_server_sdk/models/payee.rb +65 -0
  173. data/lib/paypal_server_sdk/models/payee_base.rb +64 -0
  174. data/lib/paypal_server_sdk/models/payee_payment_method_preference.rb +23 -0
  175. data/lib/paypal_server_sdk/models/payer.rb +120 -0
  176. data/lib/paypal_server_sdk/models/payer_base.rb +64 -0
  177. data/lib/paypal_server_sdk/models/payment_advice_code.rb +30 -0
  178. data/lib/paypal_server_sdk/models/payment_authorization.rb +212 -0
  179. data/lib/paypal_server_sdk/models/payment_collection.rb +99 -0
  180. data/lib/paypal_server_sdk/models/payment_initiator.rb +23 -0
  181. data/lib/paypal_server_sdk/models/payment_instruction.rb +105 -0
  182. data/lib/paypal_server_sdk/models/payment_method_preference.rb +72 -0
  183. data/lib/paypal_server_sdk/models/payment_source.rb +187 -0
  184. data/lib/paypal_server_sdk/models/payment_source_response.rb +171 -0
  185. data/lib/paypal_server_sdk/models/payment_supplementary_data.rb +50 -0
  186. data/lib/paypal_server_sdk/models/payment_token_request.rb +60 -0
  187. data/lib/paypal_server_sdk/models/payment_token_request_card.rb +125 -0
  188. data/lib/paypal_server_sdk/models/payment_token_request_payment_source.rb +59 -0
  189. data/lib/paypal_server_sdk/models/payment_token_response.rb +87 -0
  190. data/lib/paypal_server_sdk/models/payment_token_response_payment_source.rb +87 -0
  191. data/lib/paypal_server_sdk/models/phone.rb +77 -0
  192. data/lib/paypal_server_sdk/models/phone_number.rb +54 -0
  193. data/lib/paypal_server_sdk/models/phone_number_with_country_code.rb +66 -0
  194. data/lib/paypal_server_sdk/models/phone_type.rb +32 -0
  195. data/lib/paypal_server_sdk/models/phone_with_type.rb +59 -0
  196. data/lib/paypal_server_sdk/models/platform_fee.rb +63 -0
  197. data/lib/paypal_server_sdk/models/processing_instruction.rb +23 -0
  198. data/lib/paypal_server_sdk/models/processor_response.rb +83 -0
  199. data/lib/paypal_server_sdk/models/processor_response_code.rb +479 -0
  200. data/lib/paypal_server_sdk/models/purchase_unit.rb +227 -0
  201. data/lib/paypal_server_sdk/models/purchase_unit_request.rb +193 -0
  202. data/lib/paypal_server_sdk/models/reauthorize_request.rb +62 -0
  203. data/lib/paypal_server_sdk/models/refund.rb +195 -0
  204. data/lib/paypal_server_sdk/models/refund_incomplete_reason.rb +20 -0
  205. data/lib/paypal_server_sdk/models/refund_payment_instruction.rb +68 -0
  206. data/lib/paypal_server_sdk/models/refund_platform_fee.rb +52 -0
  207. data/lib/paypal_server_sdk/models/refund_request.rb +100 -0
  208. data/lib/paypal_server_sdk/models/refund_status.rb +29 -0
  209. data/lib/paypal_server_sdk/models/refund_status_details.rb +50 -0
  210. data/lib/paypal_server_sdk/models/refund_status_with_details.rb +60 -0
  211. data/lib/paypal_server_sdk/models/related_identifiers.rb +69 -0
  212. data/lib/paypal_server_sdk/models/seller_payable_breakdown.rb +156 -0
  213. data/lib/paypal_server_sdk/models/seller_protection.rb +65 -0
  214. data/lib/paypal_server_sdk/models/seller_protection_status.rb +29 -0
  215. data/lib/paypal_server_sdk/models/seller_receivable_breakdown.rb +129 -0
  216. data/lib/paypal_server_sdk/models/setup_token_card_experience_context.rb +103 -0
  217. data/lib/paypal_server_sdk/models/setup_token_request.rb +60 -0
  218. data/lib/paypal_server_sdk/models/setup_token_request_card.rb +141 -0
  219. data/lib/paypal_server_sdk/models/setup_token_request_payment_source.rb +77 -0
  220. data/lib/paypal_server_sdk/models/setup_token_response.rb +106 -0
  221. data/lib/paypal_server_sdk/models/setup_token_response_card.rb +156 -0
  222. data/lib/paypal_server_sdk/models/setup_token_response_payment_source.rb +68 -0
  223. data/lib/paypal_server_sdk/models/shipment_carrier.rb +3852 -0
  224. data/lib/paypal_server_sdk/models/shipping_details.rb +106 -0
  225. data/lib/paypal_server_sdk/models/shipping_name.rb +50 -0
  226. data/lib/paypal_server_sdk/models/shipping_option.rb +94 -0
  227. data/lib/paypal_server_sdk/models/shipping_preference.rb +26 -0
  228. data/lib/paypal_server_sdk/models/shipping_type.rb +29 -0
  229. data/lib/paypal_server_sdk/models/shipping_with_tracking_details.rb +124 -0
  230. data/lib/paypal_server_sdk/models/sofort_payment_object.rb +85 -0
  231. data/lib/paypal_server_sdk/models/sofort_payment_request.rb +73 -0
  232. data/lib/paypal_server_sdk/models/standard_entry_class_code.rb +36 -0
  233. data/lib/paypal_server_sdk/models/store_in_vault_instruction.rb +20 -0
  234. data/lib/paypal_server_sdk/models/stored_payment_source.rb +95 -0
  235. data/lib/paypal_server_sdk/models/stored_payment_source_payment_type.rb +26 -0
  236. data/lib/paypal_server_sdk/models/stored_payment_source_usage_type.rb +27 -0
  237. data/lib/paypal_server_sdk/models/supplementary_data.rb +58 -0
  238. data/lib/paypal_server_sdk/models/supplementary_purchase_data.rb +63 -0
  239. data/lib/paypal_server_sdk/models/tax_id_type.rb +23 -0
  240. data/lib/paypal_server_sdk/models/tax_info.rb +57 -0
  241. data/lib/paypal_server_sdk/models/three_d_secure_authentication_response.rb +62 -0
  242. data/lib/paypal_server_sdk/models/token.rb +56 -0
  243. data/lib/paypal_server_sdk/models/token_request_type.rb +23 -0
  244. data/lib/paypal_server_sdk/models/token_type.rb +20 -0
  245. data/lib/paypal_server_sdk/models/trustly_payment_object.rb +85 -0
  246. data/lib/paypal_server_sdk/models/trustly_payment_request.rb +73 -0
  247. data/lib/paypal_server_sdk/models/universal_product_code.rb +56 -0
  248. data/lib/paypal_server_sdk/models/upc_type.rb +38 -0
  249. data/lib/paypal_server_sdk/models/vault_customer.rb +50 -0
  250. data/lib/paypal_server_sdk/models/vault_experience_context.rb +112 -0
  251. data/lib/paypal_server_sdk/models/vault_instruction.rb +50 -0
  252. data/lib/paypal_server_sdk/models/vault_instruction_base.rb +52 -0
  253. data/lib/paypal_server_sdk/models/vault_pay_pal_wallet_request.rb +115 -0
  254. data/lib/paypal_server_sdk/models/vault_response.rb +86 -0
  255. data/lib/paypal_server_sdk/models/vault_status.rb +26 -0
  256. data/lib/paypal_server_sdk/models/vault_token_request.rb +56 -0
  257. data/lib/paypal_server_sdk/models/vault_venmo_experience_context.rb +73 -0
  258. data/lib/paypal_server_sdk/models/vault_venmo_request.rb +115 -0
  259. data/lib/paypal_server_sdk/models/vaulted_digital_wallet.rb +106 -0
  260. data/lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb +75 -0
  261. data/lib/paypal_server_sdk/models/venmo_payment_token.rb +169 -0
  262. data/lib/paypal_server_sdk/models/venmo_payment_token_customer_type.rb +25 -0
  263. data/lib/paypal_server_sdk/models/venmo_payment_token_usage_pattern.rb +35 -0
  264. data/lib/paypal_server_sdk/models/venmo_payment_token_usage_type.rb +23 -0
  265. data/lib/paypal_server_sdk/models/venmo_wallet_additional_attributes.rb +60 -0
  266. data/lib/paypal_server_sdk/models/venmo_wallet_attributes_response.rb +50 -0
  267. data/lib/paypal_server_sdk/models/venmo_wallet_customer_information.rb +63 -0
  268. data/lib/paypal_server_sdk/models/venmo_wallet_experience_context.rb +65 -0
  269. data/lib/paypal_server_sdk/models/venmo_wallet_request.rb +89 -0
  270. data/lib/paypal_server_sdk/models/venmo_wallet_response.rb +120 -0
  271. data/lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb +114 -0
  272. data/lib/paypal_server_sdk/utilities/date_time_helper.rb +11 -0
  273. data/lib/paypal_server_sdk/utilities/file_wrapper.rb +16 -0
  274. data/lib/paypal_server_sdk.rb +306 -0
  275. metadata +357 -0
@@ -0,0 +1,95 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # Provides additional details to process a payment using a `card` that has
8
+ # been stored or is intended to be stored (also referred to as
9
+ # stored_credential or card-on-file).<br/>Parameter
10
+ # compatibility:<br/><ul><li>`payment_type=ONE_TIME` is compatible only with
11
+ # `payment_initiator=CUSTOMER`.</li><li>`usage=FIRST` is compatible only with
12
+ # `payment_initiator=CUSTOMER`.</li><li>`previous_transaction_reference` or
13
+ # `previous_network_transaction_reference` is compatible only with
14
+ # `payment_initiator=MERCHANT`.</li><li>Only one of the parameters -
15
+ # `previous_transaction_reference` and
16
+ # `previous_network_transaction_reference` - can be present in the
17
+ # request.</li></ul>
18
+ class CardStoredCredential < BaseModel
19
+ SKIP = Object.new
20
+ private_constant :SKIP
21
+
22
+ # The person or party who initiated or triggered the payment.
23
+ # @return [PaymentInitiator]
24
+ attr_accessor :payment_initiator
25
+
26
+ # Indicates the type of the stored payment_source payment.
27
+ # @return [StoredPaymentSourcePaymentType]
28
+ attr_accessor :payment_type
29
+
30
+ # Indicates if this is a `first` or `subsequent` payment using a stored
31
+ # payment source (also referred to as stored credential or card on file).
32
+ # @return [StoredPaymentSourceUsageType]
33
+ attr_accessor :usage
34
+
35
+ # Reference values used by the card network to identify a transaction.
36
+ # @return [NetworkTransactionReference]
37
+ attr_accessor :previous_network_transaction_reference
38
+
39
+ # A mapping from model property names to API property names.
40
+ def self.names
41
+ @_hash = {} if @_hash.nil?
42
+ @_hash['payment_initiator'] = 'payment_initiator'
43
+ @_hash['payment_type'] = 'payment_type'
44
+ @_hash['usage'] = 'usage'
45
+ @_hash['previous_network_transaction_reference'] =
46
+ 'previous_network_transaction_reference'
47
+ @_hash
48
+ end
49
+
50
+ # An array for optional fields
51
+ def self.optionals
52
+ %w[
53
+ usage
54
+ previous_network_transaction_reference
55
+ ]
56
+ end
57
+
58
+ # An array for nullable fields
59
+ def self.nullables
60
+ []
61
+ end
62
+
63
+ def initialize(payment_initiator:, payment_type:,
64
+ usage: StoredPaymentSourceUsageType::DERIVED,
65
+ previous_network_transaction_reference: SKIP)
66
+ @payment_initiator = payment_initiator
67
+ @payment_type = payment_type
68
+ @usage = usage unless usage == SKIP
69
+ unless previous_network_transaction_reference == SKIP
70
+ @previous_network_transaction_reference =
71
+ previous_network_transaction_reference
72
+ end
73
+ end
74
+
75
+ # Creates an instance of the object from a hash.
76
+ def self.from_hash(hash)
77
+ return nil unless hash
78
+
79
+ # Extract variables from the hash.
80
+ payment_initiator =
81
+ hash.key?('payment_initiator') ? hash['payment_initiator'] : nil
82
+ payment_type = hash.key?('payment_type') ? hash['payment_type'] : nil
83
+ usage = hash['usage'] ||= StoredPaymentSourceUsageType::DERIVED
84
+ if hash['previous_network_transaction_reference']
85
+ previous_network_transaction_reference = NetworkTransactionReference.from_hash(hash['previous_network_transaction_reference'])
86
+ end
87
+
88
+ # Create object from extracted values.
89
+ CardStoredCredential.new(payment_initiator: payment_initiator,
90
+ payment_type: payment_type,
91
+ usage: usage,
92
+ previous_network_transaction_reference: previous_network_transaction_reference)
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,71 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # Merchants and partners can add Level 2 and 3 data to payments to reduce risk
8
+ # and payment processing costs. For more information about processing
9
+ # payments, see <a
10
+ # href="https://developer.paypal.com/docs/checkout/advanced/processing/">check
11
+ # out</a> or <a
12
+ # href="https://developer.paypal.com/docs/multiparty/checkout/advanced/process
13
+ # ing/">multiparty checkout</a>.
14
+ class CardSupplementaryData < BaseModel
15
+ SKIP = Object.new
16
+ private_constant :SKIP
17
+
18
+ # The level 2 card processing data collections. If your merchant account has
19
+ # been configured for Level 2 processing this field will be passed to the
20
+ # processor on your behalf. Please contact your PayPal Technical Account
21
+ # Manager to define level 2 data for your business.
22
+ # @return [Level2CardProcessingData]
23
+ attr_accessor :level_2
24
+
25
+ # The level 3 card processing data collections, If your merchant account has
26
+ # been configured for Level 3 processing this field will be passed to the
27
+ # processor on your behalf. Please contact your PayPal Technical Account
28
+ # Manager to define level 3 data for your business.
29
+ # @return [Level3CardProcessingData]
30
+ attr_accessor :level_3
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['level_2'] = 'level_2'
36
+ @_hash['level_3'] = 'level_3'
37
+ @_hash
38
+ end
39
+
40
+ # An array for optional fields
41
+ def self.optionals
42
+ %w[
43
+ level_2
44
+ level_3
45
+ ]
46
+ end
47
+
48
+ # An array for nullable fields
49
+ def self.nullables
50
+ []
51
+ end
52
+
53
+ def initialize(level_2: SKIP, level_3: SKIP)
54
+ @level_2 = level_2 unless level_2 == SKIP
55
+ @level_3 = level_3 unless level_3 == SKIP
56
+ end
57
+
58
+ # Creates an instance of the object from a hash.
59
+ def self.from_hash(hash)
60
+ return nil unless hash
61
+
62
+ # Extract variables from the hash.
63
+ level_2 = Level2CardProcessingData.from_hash(hash['level_2']) if hash['level_2']
64
+ level_3 = Level3CardProcessingData.from_hash(hash['level_3']) if hash['level_3']
65
+
66
+ # Create object from extracted values.
67
+ CardSupplementaryData.new(level_2: level_2,
68
+ level_3: level_3)
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,32 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # Type of card. i.e Credit, Debit and so on.
8
+ class CardType
9
+ CARD_TYPE = [
10
+ # TODO: Write general description for CREDIT
11
+ CREDIT = 'CREDIT'.freeze,
12
+
13
+ # TODO: Write general description for DEBIT
14
+ DEBIT = 'DEBIT'.freeze,
15
+
16
+ # TODO: Write general description for PREPAID
17
+ PREPAID = 'PREPAID'.freeze,
18
+
19
+ # TODO: Write general description for STORE
20
+ STORE = 'STORE'.freeze,
21
+
22
+ # TODO: Write general description for UNKNOWN
23
+ UNKNOWN = 'UNKNOWN'.freeze
24
+ ].freeze
25
+
26
+ def self.validate(value)
27
+ return false if value.nil?
28
+
29
+ true
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,86 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # The details about a saved Card payment source.
8
+ class CardVaultResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The PayPal-generated ID for the saved payment source.
13
+ # @return [String]
14
+ attr_accessor :id
15
+
16
+ # The vault status.
17
+ # @return [VaultStatus]
18
+ attr_accessor :status
19
+
20
+ # An array of request-related HATEOAS links.
21
+ # @return [Array[LinkDescription]]
22
+ attr_accessor :links
23
+
24
+ # The details about a customer in PayPal's system of record.
25
+ # @return [CardCustomerInformation]
26
+ attr_accessor :customer
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['id'] = 'id'
32
+ @_hash['status'] = 'status'
33
+ @_hash['links'] = 'links'
34
+ @_hash['customer'] = 'customer'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ %w[
41
+ id
42
+ status
43
+ links
44
+ customer
45
+ ]
46
+ end
47
+
48
+ # An array for nullable fields
49
+ def self.nullables
50
+ []
51
+ end
52
+
53
+ def initialize(id: SKIP, status: SKIP, links: SKIP, customer: SKIP)
54
+ @id = id unless id == SKIP
55
+ @status = status unless status == SKIP
56
+ @links = links unless links == SKIP
57
+ @customer = customer unless customer == SKIP
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
+ id = hash.key?('id') ? hash['id'] : SKIP
66
+ status = hash.key?('status') ? hash['status'] : SKIP
67
+ # Parameter is an array, so we need to iterate through it
68
+ links = nil
69
+ unless hash['links'].nil?
70
+ links = []
71
+ hash['links'].each do |structure|
72
+ links << (LinkDescription.from_hash(structure) if structure)
73
+ end
74
+ end
75
+
76
+ links = SKIP unless hash.key?('links')
77
+ customer = CardCustomerInformation.from_hash(hash['customer']) if hash['customer']
78
+
79
+ # Create object from extracted values.
80
+ CardVaultResponse.new(id: id,
81
+ status: status,
82
+ links: links,
83
+ customer: customer)
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,51 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # The API caller can opt in to verify the card through PayPal offered
8
+ # verification services (e.g. Smart Dollar Auth, 3DS).
9
+ class CardVerification < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # The method used for card verification.
14
+ # @return [CardVerificationMethod]
15
+ attr_accessor :method
16
+
17
+ # A mapping from model property names to API property names.
18
+ def self.names
19
+ @_hash = {} if @_hash.nil?
20
+ @_hash['method'] = 'method'
21
+ @_hash
22
+ end
23
+
24
+ # An array for optional fields
25
+ def self.optionals
26
+ %w[
27
+ method
28
+ ]
29
+ end
30
+
31
+ # An array for nullable fields
32
+ def self.nullables
33
+ []
34
+ end
35
+
36
+ def initialize(method: CardVerificationMethod::SCA_WHEN_REQUIRED)
37
+ @method = method unless method == SKIP
38
+ end
39
+
40
+ # Creates an instance of the object from a hash.
41
+ def self.from_hash(hash)
42
+ return nil unless hash
43
+
44
+ # Extract variables from the hash.
45
+ method = hash['method'] ||= CardVerificationMethod::SCA_WHEN_REQUIRED
46
+
47
+ # Create object from extracted values.
48
+ CardVerification.new(method: method)
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,111 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # Card Verification details including the authorization details and 3D SECURE
8
+ # details.
9
+ class CardVerificationDetails < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Transaction Identifier as given by the network to indicate a previously
14
+ # executed CIT authorization. Only present when authorization is successful
15
+ # for a verification.
16
+ # @return [String]
17
+ attr_accessor :network_transaction_id
18
+
19
+ # The date that the transaction was authorized by the scheme. This field may
20
+ # not be returned for all networks. MasterCard refers to this field as
21
+ # "BankNet reference date".
22
+ # @return [String]
23
+ attr_accessor :date
24
+
25
+ # The card network or brand. Applies to credit, debit, gift, and payment
26
+ # cards.
27
+ # @return [CardBrand]
28
+ attr_accessor :network
29
+
30
+ # The date and time, in [Internet date and time
31
+ # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
32
+ # required while fractional seconds are
33
+ # optional.<blockquote><strong>Note:</strong> The regular expression
34
+ # provides guidance but does not reject all invalid dates.</blockquote>
35
+ # @return [String]
36
+ attr_accessor :time
37
+
38
+ # The currency and amount for a financial transaction, such as a balance or
39
+ # payment due.
40
+ # @return [Money]
41
+ attr_accessor :amount
42
+
43
+ # The processor response information for payment requests, such as direct
44
+ # credit card transactions.
45
+ # @return [CardVerificationProcessorResponse]
46
+ attr_accessor :processor_response
47
+
48
+ # A mapping from model property names to API property names.
49
+ def self.names
50
+ @_hash = {} if @_hash.nil?
51
+ @_hash['network_transaction_id'] = 'network_transaction_id'
52
+ @_hash['date'] = 'date'
53
+ @_hash['network'] = 'network'
54
+ @_hash['time'] = 'time'
55
+ @_hash['amount'] = 'amount'
56
+ @_hash['processor_response'] = 'processor_response'
57
+ @_hash
58
+ end
59
+
60
+ # An array for optional fields
61
+ def self.optionals
62
+ %w[
63
+ network_transaction_id
64
+ date
65
+ network
66
+ time
67
+ amount
68
+ processor_response
69
+ ]
70
+ end
71
+
72
+ # An array for nullable fields
73
+ def self.nullables
74
+ []
75
+ end
76
+
77
+ def initialize(network_transaction_id: SKIP, date: SKIP, network: SKIP,
78
+ time: SKIP, amount: SKIP, processor_response: SKIP)
79
+ @network_transaction_id = network_transaction_id unless network_transaction_id == SKIP
80
+ @date = date unless date == SKIP
81
+ @network = network unless network == SKIP
82
+ @time = time unless time == SKIP
83
+ @amount = amount unless amount == SKIP
84
+ @processor_response = processor_response unless processor_response == SKIP
85
+ end
86
+
87
+ # Creates an instance of the object from a hash.
88
+ def self.from_hash(hash)
89
+ return nil unless hash
90
+
91
+ # Extract variables from the hash.
92
+ network_transaction_id =
93
+ hash.key?('network_transaction_id') ? hash['network_transaction_id'] : SKIP
94
+ date = hash.key?('date') ? hash['date'] : SKIP
95
+ network = hash.key?('network') ? hash['network'] : SKIP
96
+ time = hash.key?('time') ? hash['time'] : SKIP
97
+ amount = Money.from_hash(hash['amount']) if hash['amount']
98
+ if hash['processor_response']
99
+ processor_response = CardVerificationProcessorResponse.from_hash(hash['processor_response'])
100
+ end
101
+
102
+ # Create object from extracted values.
103
+ CardVerificationDetails.new(network_transaction_id: network_transaction_id,
104
+ date: date,
105
+ network: network,
106
+ time: time,
107
+ amount: amount,
108
+ processor_response: processor_response)
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,29 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # The method used for card verification.
8
+ class CardVerificationMethod
9
+ CARD_VERIFICATION_METHOD = [
10
+ # TODO: Write general description for SCA_ALWAYS
11
+ SCA_ALWAYS = 'SCA_ALWAYS'.freeze,
12
+
13
+ # TODO: Write general description for SCA_WHEN_REQUIRED
14
+ SCA_WHEN_REQUIRED = 'SCA_WHEN_REQUIRED'.freeze,
15
+
16
+ # TODO: Write general description for ENUM_3D_SECURE
17
+ ENUM_3D_SECURE = '3D_SECURE'.freeze,
18
+
19
+ # TODO: Write general description for AVS_CVV
20
+ AVS_CVV = 'AVS_CVV'.freeze
21
+ ].freeze
22
+
23
+ def self.validate(value)
24
+ return false if value.nil?
25
+
26
+ true
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,62 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # The processor response information for payment requests, such as direct
8
+ # credit card transactions.
9
+ class CardVerificationProcessorResponse < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # The address verification code for Visa, Discover, Mastercard, or American
14
+ # Express transactions.
15
+ # @return [AVSCode]
16
+ attr_accessor :avs_code
17
+
18
+ # The card verification value code for for Visa, Discover, Mastercard, or
19
+ # American Express.
20
+ # @return [CVVCode]
21
+ attr_accessor :cvv_code
22
+
23
+ # A mapping from model property names to API property names.
24
+ def self.names
25
+ @_hash = {} if @_hash.nil?
26
+ @_hash['avs_code'] = 'avs_code'
27
+ @_hash['cvv_code'] = 'cvv_code'
28
+ @_hash
29
+ end
30
+
31
+ # An array for optional fields
32
+ def self.optionals
33
+ %w[
34
+ avs_code
35
+ cvv_code
36
+ ]
37
+ end
38
+
39
+ # An array for nullable fields
40
+ def self.nullables
41
+ []
42
+ end
43
+
44
+ def initialize(avs_code: SKIP, cvv_code: SKIP)
45
+ @avs_code = avs_code unless avs_code == SKIP
46
+ @cvv_code = cvv_code unless cvv_code == SKIP
47
+ end
48
+
49
+ # Creates an instance of the object from a hash.
50
+ def self.from_hash(hash)
51
+ return nil unless hash
52
+
53
+ # Extract variables from the hash.
54
+ avs_code = hash.key?('avs_code') ? hash['avs_code'] : SKIP
55
+ cvv_code = hash.key?('cvv_code') ? hash['cvv_code'] : SKIP
56
+
57
+ # Create object from extracted values.
58
+ CardVerificationProcessorResponse.new(avs_code: avs_code,
59
+ cvv_code: cvv_code)
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,24 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # The intent to either capture payment immediately or authorize a payment for
8
+ # an order after order creation.
9
+ class CheckoutPaymentIntent
10
+ CHECKOUT_PAYMENT_INTENT = [
11
+ # TODO: Write general description for CAPTURE
12
+ CAPTURE = 'CAPTURE'.freeze,
13
+
14
+ # TODO: Write general description for AUTHORIZE
15
+ AUTHORIZE = 'AUTHORIZE'.freeze
16
+ ].freeze
17
+
18
+ def self.validate(value)
19
+ return false if value.nil?
20
+
21
+ true
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,70 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # Details about the merchant cobranded card used for order purchase.
8
+ class CobrandedCard < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Array of labels for the cobranded card.
13
+ # @return [Array[String]]
14
+ attr_accessor :labels
15
+
16
+ # The details for the merchant who receives the funds and fulfills the
17
+ # order. The merchant is also known as the payee.
18
+ # @return [PayeeBase]
19
+ attr_accessor :payee
20
+
21
+ # The currency and amount for a financial transaction, such as a balance or
22
+ # payment due.
23
+ # @return [Money]
24
+ attr_accessor :amount
25
+
26
+ # A mapping from model property names to API property names.
27
+ def self.names
28
+ @_hash = {} if @_hash.nil?
29
+ @_hash['labels'] = 'labels'
30
+ @_hash['payee'] = 'payee'
31
+ @_hash['amount'] = 'amount'
32
+ @_hash
33
+ end
34
+
35
+ # An array for optional fields
36
+ def self.optionals
37
+ %w[
38
+ labels
39
+ payee
40
+ amount
41
+ ]
42
+ end
43
+
44
+ # An array for nullable fields
45
+ def self.nullables
46
+ []
47
+ end
48
+
49
+ def initialize(labels: SKIP, payee: SKIP, amount: SKIP)
50
+ @labels = labels unless labels == SKIP
51
+ @payee = payee unless payee == SKIP
52
+ @amount = amount unless amount == SKIP
53
+ end
54
+
55
+ # Creates an instance of the object from a hash.
56
+ def self.from_hash(hash)
57
+ return nil unless hash
58
+
59
+ # Extract variables from the hash.
60
+ labels = hash.key?('labels') ? hash['labels'] : SKIP
61
+ payee = PayeeBase.from_hash(hash['payee']) if hash['payee']
62
+ amount = Money.from_hash(hash['amount']) if hash['amount']
63
+
64
+ # Create object from extracted values.
65
+ CobrandedCard.new(labels: labels,
66
+ payee: payee,
67
+ amount: amount)
68
+ end
69
+ end
70
+ end