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,248 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # A captured payment.
8
+ class CapturedPayment < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The status of the captured payment.
13
+ # @return [CaptureStatus]
14
+ attr_accessor :status
15
+
16
+ # The details of the captured payment status.
17
+ # @return [CaptureStatusDetails]
18
+ attr_accessor :status_details
19
+
20
+ # The PayPal-generated ID for the captured payment.
21
+ # @return [String]
22
+ attr_accessor :id
23
+
24
+ # The currency and amount for a financial transaction, such as a balance or
25
+ # payment due.
26
+ # @return [Money]
27
+ attr_accessor :amount
28
+
29
+ # The API caller-provided external invoice number for this order. Appears in
30
+ # both the payer's transaction history and the emails that the payer
31
+ # receives.
32
+ # @return [String]
33
+ attr_accessor :invoice_id
34
+
35
+ # The API caller-provided external ID. Used to reconcile API
36
+ # caller-initiated transactions with PayPal transactions. Appears in
37
+ # transaction and settlement reports.
38
+ # @return [String]
39
+ attr_accessor :custom_id
40
+
41
+ # Reference values used by the card network to identify a transaction.
42
+ # @return [NetworkTransactionReference]
43
+ attr_accessor :network_transaction_reference
44
+
45
+ # The level of protection offered as defined by [PayPal Seller Protection
46
+ # for
47
+ # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio
48
+ # n).
49
+ # @return [SellerProtection]
50
+ attr_accessor :seller_protection
51
+
52
+ # Indicates whether you can make additional captures against the authorized
53
+ # payment. Set to `true` if you do not intend to capture additional payments
54
+ # against the authorization. Set to `false` if you intend to capture
55
+ # additional payments against the authorization.
56
+ # @return [TrueClass | FalseClass]
57
+ attr_accessor :final_capture
58
+
59
+ # The detailed breakdown of the capture activity. This is not available for
60
+ # transactions that are in pending state.
61
+ # @return [SellerReceivableBreakdown]
62
+ attr_accessor :seller_receivable_breakdown
63
+
64
+ # The funds that are held on behalf of the merchant.
65
+ # @return [DisbursementMode]
66
+ attr_accessor :disbursement_mode
67
+
68
+ # An array of related [HATEOAS
69
+ # links](/docs/api/reference/api-responses/#hateoas-links).
70
+ # @return [Array[LinkDescription]]
71
+ attr_accessor :links
72
+
73
+ # The processor response information for payment requests, such as direct
74
+ # credit card transactions.
75
+ # @return [ProcessorResponse]
76
+ attr_accessor :processor_response
77
+
78
+ # The date and time, in [Internet date and time
79
+ # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
80
+ # required while fractional seconds are
81
+ # optional.<blockquote><strong>Note:</strong> The regular expression
82
+ # provides guidance but does not reject all invalid dates.</blockquote>
83
+ # @return [String]
84
+ attr_accessor :create_time
85
+
86
+ # The date and time, in [Internet date and time
87
+ # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
88
+ # required while fractional seconds are
89
+ # optional.<blockquote><strong>Note:</strong> The regular expression
90
+ # provides guidance but does not reject all invalid dates.</blockquote>
91
+ # @return [String]
92
+ attr_accessor :update_time
93
+
94
+ # The supplementary data.
95
+ # @return [PaymentSupplementaryData]
96
+ attr_accessor :supplementary_data
97
+
98
+ # The details for the merchant who receives the funds and fulfills the
99
+ # order. The merchant is also known as the payee.
100
+ # @return [Payee]
101
+ attr_accessor :payee
102
+
103
+ # A mapping from model property names to API property names.
104
+ def self.names
105
+ @_hash = {} if @_hash.nil?
106
+ @_hash['status'] = 'status'
107
+ @_hash['status_details'] = 'status_details'
108
+ @_hash['id'] = 'id'
109
+ @_hash['amount'] = 'amount'
110
+ @_hash['invoice_id'] = 'invoice_id'
111
+ @_hash['custom_id'] = 'custom_id'
112
+ @_hash['network_transaction_reference'] =
113
+ 'network_transaction_reference'
114
+ @_hash['seller_protection'] = 'seller_protection'
115
+ @_hash['final_capture'] = 'final_capture'
116
+ @_hash['seller_receivable_breakdown'] = 'seller_receivable_breakdown'
117
+ @_hash['disbursement_mode'] = 'disbursement_mode'
118
+ @_hash['links'] = 'links'
119
+ @_hash['processor_response'] = 'processor_response'
120
+ @_hash['create_time'] = 'create_time'
121
+ @_hash['update_time'] = 'update_time'
122
+ @_hash['supplementary_data'] = 'supplementary_data'
123
+ @_hash['payee'] = 'payee'
124
+ @_hash
125
+ end
126
+
127
+ # An array for optional fields
128
+ def self.optionals
129
+ %w[
130
+ status
131
+ status_details
132
+ id
133
+ amount
134
+ invoice_id
135
+ custom_id
136
+ network_transaction_reference
137
+ seller_protection
138
+ final_capture
139
+ seller_receivable_breakdown
140
+ disbursement_mode
141
+ links
142
+ processor_response
143
+ create_time
144
+ update_time
145
+ supplementary_data
146
+ payee
147
+ ]
148
+ end
149
+
150
+ # An array for nullable fields
151
+ def self.nullables
152
+ []
153
+ end
154
+
155
+ def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP,
156
+ invoice_id: SKIP, custom_id: SKIP,
157
+ network_transaction_reference: SKIP, seller_protection: SKIP,
158
+ final_capture: false, seller_receivable_breakdown: SKIP,
159
+ disbursement_mode: DisbursementMode::INSTANT, links: SKIP,
160
+ processor_response: SKIP, create_time: SKIP,
161
+ update_time: SKIP, supplementary_data: SKIP, payee: SKIP)
162
+ @status = status unless status == SKIP
163
+ @status_details = status_details unless status_details == SKIP
164
+ @id = id unless id == SKIP
165
+ @amount = amount unless amount == SKIP
166
+ @invoice_id = invoice_id unless invoice_id == SKIP
167
+ @custom_id = custom_id unless custom_id == SKIP
168
+ unless network_transaction_reference == SKIP
169
+ @network_transaction_reference =
170
+ network_transaction_reference
171
+ end
172
+ @seller_protection = seller_protection unless seller_protection == SKIP
173
+ @final_capture = final_capture unless final_capture == SKIP
174
+ unless seller_receivable_breakdown == SKIP
175
+ @seller_receivable_breakdown =
176
+ seller_receivable_breakdown
177
+ end
178
+ @disbursement_mode = disbursement_mode unless disbursement_mode == SKIP
179
+ @links = links unless links == SKIP
180
+ @processor_response = processor_response unless processor_response == SKIP
181
+ @create_time = create_time unless create_time == SKIP
182
+ @update_time = update_time unless update_time == SKIP
183
+ @supplementary_data = supplementary_data unless supplementary_data == SKIP
184
+ @payee = payee unless payee == SKIP
185
+ end
186
+
187
+ # Creates an instance of the object from a hash.
188
+ def self.from_hash(hash)
189
+ return nil unless hash
190
+
191
+ # Extract variables from the hash.
192
+ status = hash.key?('status') ? hash['status'] : SKIP
193
+ status_details = CaptureStatusDetails.from_hash(hash['status_details']) if
194
+ hash['status_details']
195
+ id = hash.key?('id') ? hash['id'] : SKIP
196
+ amount = Money.from_hash(hash['amount']) if hash['amount']
197
+ invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP
198
+ custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP
199
+ if hash['network_transaction_reference']
200
+ network_transaction_reference = NetworkTransactionReference.from_hash(hash['network_transaction_reference'])
201
+ end
202
+ seller_protection = SellerProtection.from_hash(hash['seller_protection']) if
203
+ hash['seller_protection']
204
+ final_capture = hash['final_capture'] ||= false
205
+ if hash['seller_receivable_breakdown']
206
+ seller_receivable_breakdown = SellerReceivableBreakdown.from_hash(hash['seller_receivable_breakdown'])
207
+ end
208
+ disbursement_mode =
209
+ hash['disbursement_mode'] ||= DisbursementMode::INSTANT
210
+ # Parameter is an array, so we need to iterate through it
211
+ links = nil
212
+ unless hash['links'].nil?
213
+ links = []
214
+ hash['links'].each do |structure|
215
+ links << (LinkDescription.from_hash(structure) if structure)
216
+ end
217
+ end
218
+
219
+ links = SKIP unless hash.key?('links')
220
+ processor_response = ProcessorResponse.from_hash(hash['processor_response']) if
221
+ hash['processor_response']
222
+ create_time = hash.key?('create_time') ? hash['create_time'] : SKIP
223
+ update_time = hash.key?('update_time') ? hash['update_time'] : SKIP
224
+ supplementary_data = PaymentSupplementaryData.from_hash(hash['supplementary_data']) if
225
+ hash['supplementary_data']
226
+ payee = Payee.from_hash(hash['payee']) if hash['payee']
227
+
228
+ # Create object from extracted values.
229
+ CapturedPayment.new(status: status,
230
+ status_details: status_details,
231
+ id: id,
232
+ amount: amount,
233
+ invoice_id: invoice_id,
234
+ custom_id: custom_id,
235
+ network_transaction_reference: network_transaction_reference,
236
+ seller_protection: seller_protection,
237
+ final_capture: final_capture,
238
+ seller_receivable_breakdown: seller_receivable_breakdown,
239
+ disbursement_mode: disbursement_mode,
240
+ links: links,
241
+ processor_response: processor_response,
242
+ create_time: create_time,
243
+ update_time: update_time,
244
+ supplementary_data: supplementary_data,
245
+ payee: payee)
246
+ end
247
+ end
248
+ 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
+ # Additional attributes associated with the use of this card.
8
+ class CardAttributes < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The details about a customer in PayPal's system of record.
13
+ # @return [CardCustomerInformation]
14
+ attr_accessor :customer
15
+
16
+ # Basic vault instruction specification that can be extended by specific
17
+ # payment sources that supports vaulting.
18
+ # @return [VaultInstructionBase]
19
+ attr_accessor :vault
20
+
21
+ # The API caller can opt in to verify the card through PayPal offered
22
+ # verification services (e.g. Smart Dollar Auth, 3DS).
23
+ # @return [CardVerification]
24
+ attr_accessor :verification
25
+
26
+ # A mapping from model property names to API property names.
27
+ def self.names
28
+ @_hash = {} if @_hash.nil?
29
+ @_hash['customer'] = 'customer'
30
+ @_hash['vault'] = 'vault'
31
+ @_hash['verification'] = 'verification'
32
+ @_hash
33
+ end
34
+
35
+ # An array for optional fields
36
+ def self.optionals
37
+ %w[
38
+ customer
39
+ vault
40
+ verification
41
+ ]
42
+ end
43
+
44
+ # An array for nullable fields
45
+ def self.nullables
46
+ []
47
+ end
48
+
49
+ def initialize(customer: SKIP, vault: SKIP, verification: SKIP)
50
+ @customer = customer unless customer == SKIP
51
+ @vault = vault unless vault == SKIP
52
+ @verification = verification unless verification == 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
+ customer = CardCustomerInformation.from_hash(hash['customer']) if hash['customer']
61
+ vault = VaultInstructionBase.from_hash(hash['vault']) if hash['vault']
62
+ verification = CardVerification.from_hash(hash['verification']) if hash['verification']
63
+
64
+ # Create object from extracted values.
65
+ CardAttributes.new(customer: customer,
66
+ vault: vault,
67
+ verification: verification)
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,50 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # Additional attributes associated with the use of this card.
8
+ class CardAttributesResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The details about a saved Card payment source.
13
+ # @return [CardVaultResponse]
14
+ attr_accessor :vault
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['vault'] = 'vault'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ vault
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(vault: SKIP)
36
+ @vault = vault unless vault == SKIP
37
+ end
38
+
39
+ # Creates an instance of the object from a hash.
40
+ def self.from_hash(hash)
41
+ return nil unless hash
42
+
43
+ # Extract variables from the hash.
44
+ vault = CardVaultResponse.from_hash(hash['vault']) if hash['vault']
45
+
46
+ # Create object from extracted values.
47
+ CardAttributesResponse.new(vault: vault)
48
+ end
49
+ end
50
+ 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
+ # Results of Authentication such as 3D Secure.
8
+ class CardAuthenticationResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Results of 3D Secure Authentication.
13
+ # @return [ThreeDSecureAuthenticationResponse]
14
+ attr_accessor :three_d_secure
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['three_d_secure'] = 'three_d_secure'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ three_d_secure
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(three_d_secure: SKIP)
36
+ @three_d_secure = three_d_secure unless three_d_secure == SKIP
37
+ end
38
+
39
+ # Creates an instance of the object from a hash.
40
+ def self.from_hash(hash)
41
+ return nil unless hash
42
+
43
+ # Extract variables from the hash.
44
+ three_d_secure = ThreeDSecureAuthenticationResponse.from_hash(hash['three_d_secure']) if
45
+ hash['three_d_secure']
46
+
47
+ # Create object from extracted values.
48
+ CardAuthenticationResponse.new(three_d_secure: three_d_secure)
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,93 @@
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 card network or brand. Applies to credit, debit, gift, and payment
8
+ # cards.
9
+ class CardBrand
10
+ CARD_BRAND = [
11
+ # TODO: Write general description for VISA
12
+ VISA = 'VISA'.freeze,
13
+
14
+ # TODO: Write general description for MASTERCARD
15
+ MASTERCARD = 'MASTERCARD'.freeze,
16
+
17
+ # TODO: Write general description for DISCOVER
18
+ DISCOVER = 'DISCOVER'.freeze,
19
+
20
+ # TODO: Write general description for AMEX
21
+ AMEX = 'AMEX'.freeze,
22
+
23
+ # TODO: Write general description for SOLO
24
+ SOLO = 'SOLO'.freeze,
25
+
26
+ # TODO: Write general description for JCB
27
+ JCB = 'JCB'.freeze,
28
+
29
+ # TODO: Write general description for STAR
30
+ STAR = 'STAR'.freeze,
31
+
32
+ # TODO: Write general description for DELTA
33
+ DELTA = 'DELTA'.freeze,
34
+
35
+ # TODO: Write general description for SWITCH
36
+ SWITCH = 'SWITCH'.freeze,
37
+
38
+ # TODO: Write general description for MAESTRO
39
+ MAESTRO = 'MAESTRO'.freeze,
40
+
41
+ # TODO: Write general description for CB_NATIONALE
42
+ CB_NATIONALE = 'CB_NATIONALE'.freeze,
43
+
44
+ # TODO: Write general description for CONFIGOGA
45
+ CONFIGOGA = 'CONFIGOGA'.freeze,
46
+
47
+ # TODO: Write general description for CONFIDIS
48
+ CONFIDIS = 'CONFIDIS'.freeze,
49
+
50
+ # TODO: Write general description for ELECTRON
51
+ ELECTRON = 'ELECTRON'.freeze,
52
+
53
+ # TODO: Write general description for CETELEM
54
+ CETELEM = 'CETELEM'.freeze,
55
+
56
+ # TODO: Write general description for CHINA_UNION_PAY
57
+ CHINA_UNION_PAY = 'CHINA_UNION_PAY'.freeze,
58
+
59
+ # TODO: Write general description for DINERS
60
+ DINERS = 'DINERS'.freeze,
61
+
62
+ # TODO: Write general description for ELO
63
+ ELO = 'ELO'.freeze,
64
+
65
+ # TODO: Write general description for HIPER
66
+ HIPER = 'HIPER'.freeze,
67
+
68
+ # TODO: Write general description for HIPERCARD
69
+ HIPERCARD = 'HIPERCARD'.freeze,
70
+
71
+ # TODO: Write general description for RUPAY
72
+ RUPAY = 'RUPAY'.freeze,
73
+
74
+ # TODO: Write general description for GE
75
+ GE = 'GE'.freeze,
76
+
77
+ # TODO: Write general description for SYNCHRONY
78
+ SYNCHRONY = 'SYNCHRONY'.freeze,
79
+
80
+ # TODO: Write general description for EFTPOS
81
+ EFTPOS = 'EFTPOS'.freeze,
82
+
83
+ # TODO: Write general description for UNKNOWN
84
+ UNKNOWN = 'UNKNOWN'.freeze
85
+ ].freeze
86
+
87
+ def self.validate(value)
88
+ return false if value.nil?
89
+
90
+ true
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,85 @@
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 customer in PayPal's system of record.
8
+ class CardCustomerInformation < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The unique ID for a customer generated by PayPal.
13
+ # @return [String]
14
+ attr_accessor :id
15
+
16
+ # The internationalized email address.<blockquote><strong>Note:</strong> Up
17
+ # to 64 characters are allowed before and 255 characters are allowed after
18
+ # the <code>@</code> sign. However, the generally accepted maximum length
19
+ # for an email address is 254 characters. The pattern verifies that an
20
+ # unquoted <code>@</code> sign exists.</blockquote>
21
+ # @return [String]
22
+ attr_accessor :email_address
23
+
24
+ # The phone information.
25
+ # @return [PhoneWithType]
26
+ attr_accessor :phone
27
+
28
+ # Merchants and partners may already have a data-store where their customer
29
+ # information is persisted. Use merchant_customer_id to associate the
30
+ # PayPal-generated customer.id to your representation of a customer.
31
+ # @return [String]
32
+ attr_accessor :merchant_customer_id
33
+
34
+ # A mapping from model property names to API property names.
35
+ def self.names
36
+ @_hash = {} if @_hash.nil?
37
+ @_hash['id'] = 'id'
38
+ @_hash['email_address'] = 'email_address'
39
+ @_hash['phone'] = 'phone'
40
+ @_hash['merchant_customer_id'] = 'merchant_customer_id'
41
+ @_hash
42
+ end
43
+
44
+ # An array for optional fields
45
+ def self.optionals
46
+ %w[
47
+ id
48
+ email_address
49
+ phone
50
+ merchant_customer_id
51
+ ]
52
+ end
53
+
54
+ # An array for nullable fields
55
+ def self.nullables
56
+ []
57
+ end
58
+
59
+ def initialize(id: SKIP, email_address: SKIP, phone: SKIP,
60
+ merchant_customer_id: SKIP)
61
+ @id = id unless id == SKIP
62
+ @email_address = email_address unless email_address == SKIP
63
+ @phone = phone unless phone == SKIP
64
+ @merchant_customer_id = merchant_customer_id unless merchant_customer_id == SKIP
65
+ end
66
+
67
+ # Creates an instance of the object from a hash.
68
+ def self.from_hash(hash)
69
+ return nil unless hash
70
+
71
+ # Extract variables from the hash.
72
+ id = hash.key?('id') ? hash['id'] : SKIP
73
+ email_address = hash.key?('email_address') ? hash['email_address'] : SKIP
74
+ phone = PhoneWithType.from_hash(hash['phone']) if hash['phone']
75
+ merchant_customer_id =
76
+ hash.key?('merchant_customer_id') ? hash['merchant_customer_id'] : SKIP
77
+
78
+ # Create object from extracted values.
79
+ CardCustomerInformation.new(id: id,
80
+ email_address: email_address,
81
+ phone: phone,
82
+ merchant_customer_id: merchant_customer_id)
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,59 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # Customizes the payer experience during the 3DS Approval for payment.
8
+ class CardExperienceContext < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Describes the URL.
13
+ # @return [String]
14
+ attr_accessor :return_url
15
+
16
+ # Describes the URL.
17
+ # @return [String]
18
+ attr_accessor :cancel_url
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['return_url'] = 'return_url'
24
+ @_hash['cancel_url'] = 'cancel_url'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ return_url
32
+ cancel_url
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(return_url: SKIP, cancel_url: SKIP)
42
+ @return_url = return_url unless return_url == SKIP
43
+ @cancel_url = cancel_url unless cancel_url == SKIP
44
+ end
45
+
46
+ # Creates an instance of the object from a hash.
47
+ def self.from_hash(hash)
48
+ return nil unless hash
49
+
50
+ # Extract variables from the hash.
51
+ return_url = hash.key?('return_url') ? hash['return_url'] : SKIP
52
+ cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP
53
+
54
+ # Create object from extracted values.
55
+ CardExperienceContext.new(return_url: return_url,
56
+ cancel_url: cancel_url)
57
+ end
58
+ end
59
+ end