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,160 @@
1
+ # paypal_server_sdk
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module PaypalServerSdk
7
+ # Address request details.
8
+ class AddressDetails < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The first line of the address, such as number and street, for example,
13
+ # `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks.
14
+ # This field needs to pass the full address.
15
+ # @return [String]
16
+ attr_accessor :address_line_1
17
+
18
+ # The second line of the address, for example, a suite or apartment number.
19
+ # @return [String]
20
+ attr_accessor :address_line_2
21
+
22
+ # A city, town, or village. Smaller than `admin_area_level_1`.
23
+ # @return [String]
24
+ attr_accessor :admin_area_2
25
+
26
+ # The highest-level sub-division in a country, which is usually a province,
27
+ # state, or ISO-3166-2 subdivision. This data is formatted for postal
28
+ # delivery, for example, `CA` and not `California`. Value, by country,
29
+ # is:<ul><li>UK. A county.</li><li>US. A state.</li><li>Canada. A
30
+ # province.</li><li>Japan. A prefecture.</li><li>Switzerland. A
31
+ # *kanton*.</li></ul>
32
+ # @return [String]
33
+ attr_accessor :admin_area_1
34
+
35
+ # The postal code, which is the ZIP code or equivalent. Typically required
36
+ # for countries with a postal code or an equivalent. See [postal
37
+ # code](https://en.wikipedia.org/wiki/Postal_code).
38
+ # @return [String]
39
+ attr_accessor :postal_code
40
+
41
+ # The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that
42
+ # identifies the country or region.<blockquote><strong>Note:</strong> The
43
+ # country code for Great Britain is <code>GB</code> and not <code>UK</code>
44
+ # as used in the top-level domain names for that country. Use the `C2`
45
+ # country code for China worldwide for comparable uncontrolled price (CUP)
46
+ # method, bank card, and cross-border transactions.</blockquote>
47
+ # @return [String]
48
+ attr_accessor :country_code
49
+
50
+ # The name of the party.
51
+ # @return [Name]
52
+ attr_accessor :name
53
+
54
+ # The resource ID of the address.
55
+ # @return [String]
56
+ attr_accessor :id
57
+
58
+ # The name of the company or business associated to the address.
59
+ # @return [String]
60
+ attr_accessor :company
61
+
62
+ # The phone number that can go on the mailing label with the address to
63
+ # track the shipping. Phone number is in E.164 format.
64
+ # @return [String]
65
+ attr_accessor :phone
66
+
67
+ # The phone number, in its canonical international [E.164 numbering plan
68
+ # format](https://www.itu.int/rec/T-REC-E.164/en).
69
+ # @return [Phone]
70
+ attr_accessor :phone_number
71
+
72
+ # A mapping from model property names to API property names.
73
+ def self.names
74
+ @_hash = {} if @_hash.nil?
75
+ @_hash['address_line_1'] = 'address_line_1'
76
+ @_hash['address_line_2'] = 'address_line_2'
77
+ @_hash['admin_area_2'] = 'admin_area_2'
78
+ @_hash['admin_area_1'] = 'admin_area_1'
79
+ @_hash['postal_code'] = 'postal_code'
80
+ @_hash['country_code'] = 'country_code'
81
+ @_hash['name'] = 'name'
82
+ @_hash['id'] = 'id'
83
+ @_hash['company'] = 'company'
84
+ @_hash['phone'] = 'phone'
85
+ @_hash['phone_number'] = 'phone_number'
86
+ @_hash
87
+ end
88
+
89
+ # An array for optional fields
90
+ def self.optionals
91
+ %w[
92
+ address_line_1
93
+ address_line_2
94
+ admin_area_2
95
+ admin_area_1
96
+ postal_code
97
+ name
98
+ id
99
+ company
100
+ phone
101
+ phone_number
102
+ ]
103
+ end
104
+
105
+ # An array for nullable fields
106
+ def self.nullables
107
+ []
108
+ end
109
+
110
+ def initialize(country_code:, address_line_1: SKIP, address_line_2: SKIP,
111
+ admin_area_2: SKIP, admin_area_1: SKIP, postal_code: SKIP,
112
+ name: SKIP, id: SKIP, company: SKIP, phone: SKIP,
113
+ phone_number: SKIP)
114
+ @address_line_1 = address_line_1 unless address_line_1 == SKIP
115
+ @address_line_2 = address_line_2 unless address_line_2 == SKIP
116
+ @admin_area_2 = admin_area_2 unless admin_area_2 == SKIP
117
+ @admin_area_1 = admin_area_1 unless admin_area_1 == SKIP
118
+ @postal_code = postal_code unless postal_code == SKIP
119
+ @country_code = country_code
120
+ @name = name unless name == SKIP
121
+ @id = id unless id == SKIP
122
+ @company = company unless company == SKIP
123
+ @phone = phone unless phone == SKIP
124
+ @phone_number = phone_number unless phone_number == SKIP
125
+ end
126
+
127
+ # Creates an instance of the object from a hash.
128
+ def self.from_hash(hash)
129
+ return nil unless hash
130
+
131
+ # Extract variables from the hash.
132
+ country_code = hash.key?('country_code') ? hash['country_code'] : nil
133
+ address_line_1 =
134
+ hash.key?('address_line_1') ? hash['address_line_1'] : SKIP
135
+ address_line_2 =
136
+ hash.key?('address_line_2') ? hash['address_line_2'] : SKIP
137
+ admin_area_2 = hash.key?('admin_area_2') ? hash['admin_area_2'] : SKIP
138
+ admin_area_1 = hash.key?('admin_area_1') ? hash['admin_area_1'] : SKIP
139
+ postal_code = hash.key?('postal_code') ? hash['postal_code'] : SKIP
140
+ name = Name.from_hash(hash['name']) if hash['name']
141
+ id = hash.key?('id') ? hash['id'] : SKIP
142
+ company = hash.key?('company') ? hash['company'] : SKIP
143
+ phone = hash.key?('phone') ? hash['phone'] : SKIP
144
+ phone_number = Phone.from_hash(hash['phone_number']) if hash['phone_number']
145
+
146
+ # Create object from extracted values.
147
+ AddressDetails.new(country_code: country_code,
148
+ address_line_1: address_line_1,
149
+ address_line_2: address_line_2,
150
+ admin_area_2: admin_area_2,
151
+ admin_area_1: admin_area_1,
152
+ postal_code: postal_code,
153
+ name: name,
154
+ id: id,
155
+ company: company,
156
+ phone: phone,
157
+ phone_number: phone_number)
158
+ end
159
+ end
160
+ end
@@ -0,0 +1,115 @@
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 breakdown of the amount. Breakdown provides details such as total item
8
+ # amount, total tax amount, shipping, handling, insurance, and discounts, if
9
+ # any.
10
+ class AmountBreakdown < BaseModel
11
+ SKIP = Object.new
12
+ private_constant :SKIP
13
+
14
+ # The currency and amount for a financial transaction, such as a balance or
15
+ # payment due.
16
+ # @return [Money]
17
+ attr_accessor :item_total
18
+
19
+ # The currency and amount for a financial transaction, such as a balance or
20
+ # payment due.
21
+ # @return [Money]
22
+ attr_accessor :shipping
23
+
24
+ # The currency and amount for a financial transaction, such as a balance or
25
+ # payment due.
26
+ # @return [Money]
27
+ attr_accessor :handling
28
+
29
+ # The currency and amount for a financial transaction, such as a balance or
30
+ # payment due.
31
+ # @return [Money]
32
+ attr_accessor :tax_total
33
+
34
+ # The currency and amount for a financial transaction, such as a balance or
35
+ # payment due.
36
+ # @return [Money]
37
+ attr_accessor :insurance
38
+
39
+ # The currency and amount for a financial transaction, such as a balance or
40
+ # payment due.
41
+ # @return [Money]
42
+ attr_accessor :shipping_discount
43
+
44
+ # The currency and amount for a financial transaction, such as a balance or
45
+ # payment due.
46
+ # @return [Money]
47
+ attr_accessor :discount
48
+
49
+ # A mapping from model property names to API property names.
50
+ def self.names
51
+ @_hash = {} if @_hash.nil?
52
+ @_hash['item_total'] = 'item_total'
53
+ @_hash['shipping'] = 'shipping'
54
+ @_hash['handling'] = 'handling'
55
+ @_hash['tax_total'] = 'tax_total'
56
+ @_hash['insurance'] = 'insurance'
57
+ @_hash['shipping_discount'] = 'shipping_discount'
58
+ @_hash['discount'] = 'discount'
59
+ @_hash
60
+ end
61
+
62
+ # An array for optional fields
63
+ def self.optionals
64
+ %w[
65
+ item_total
66
+ shipping
67
+ handling
68
+ tax_total
69
+ insurance
70
+ shipping_discount
71
+ discount
72
+ ]
73
+ end
74
+
75
+ # An array for nullable fields
76
+ def self.nullables
77
+ []
78
+ end
79
+
80
+ def initialize(item_total: SKIP, shipping: SKIP, handling: SKIP,
81
+ tax_total: SKIP, insurance: SKIP, shipping_discount: SKIP,
82
+ discount: SKIP)
83
+ @item_total = item_total unless item_total == SKIP
84
+ @shipping = shipping unless shipping == SKIP
85
+ @handling = handling unless handling == SKIP
86
+ @tax_total = tax_total unless tax_total == SKIP
87
+ @insurance = insurance unless insurance == SKIP
88
+ @shipping_discount = shipping_discount unless shipping_discount == SKIP
89
+ @discount = discount unless discount == SKIP
90
+ end
91
+
92
+ # Creates an instance of the object from a hash.
93
+ def self.from_hash(hash)
94
+ return nil unless hash
95
+
96
+ # Extract variables from the hash.
97
+ item_total = Money.from_hash(hash['item_total']) if hash['item_total']
98
+ shipping = Money.from_hash(hash['shipping']) if hash['shipping']
99
+ handling = Money.from_hash(hash['handling']) if hash['handling']
100
+ tax_total = Money.from_hash(hash['tax_total']) if hash['tax_total']
101
+ insurance = Money.from_hash(hash['insurance']) if hash['insurance']
102
+ shipping_discount = Money.from_hash(hash['shipping_discount']) if hash['shipping_discount']
103
+ discount = Money.from_hash(hash['discount']) if hash['discount']
104
+
105
+ # Create object from extracted values.
106
+ AmountBreakdown.new(item_total: item_total,
107
+ shipping: shipping,
108
+ handling: handling,
109
+ tax_total: tax_total,
110
+ insurance: insurance,
111
+ shipping_discount: shipping_discount,
112
+ discount: discount)
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,80 @@
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 total order amount with an optional breakdown that provides details,
8
+ # such as the total item amount, total tax amount, shipping, handling,
9
+ # insurance, and discounts, if any.<br/>If you specify `amount.breakdown`, the
10
+ # amount equals `item_total` plus `tax_total` plus `shipping` plus `handling`
11
+ # plus `insurance` minus `shipping_discount` minus discount.<br/>The amount
12
+ # must be a positive number. For listed of supported currencies and decimal
13
+ # precision, see the PayPal REST APIs <a
14
+ # href="/docs/integration/direct/rest/currency-codes/">Currency Codes</a>.
15
+ class AmountWithBreakdown < BaseModel
16
+ SKIP = Object.new
17
+ private_constant :SKIP
18
+
19
+ # The [three-character ISO-4217 currency
20
+ # code](/api/rest/reference/currency-codes/) that identifies the currency.
21
+ # @return [String]
22
+ attr_accessor :currency_code
23
+
24
+ # The value, which might be:<ul><li>An integer for currencies like `JPY`
25
+ # that are not typically fractional.</li><li>A decimal fraction for
26
+ # currencies like `TND` that are subdivided into thousandths.</li></ul>For
27
+ # the required number of decimal places for a currency code, see [Currency
28
+ # Codes](/api/rest/reference/currency-codes/).
29
+ # @return [String]
30
+ attr_accessor :value
31
+
32
+ # The breakdown of the amount. Breakdown provides details such as total item
33
+ # amount, total tax amount, shipping, handling, insurance, and discounts, if
34
+ # any.
35
+ # @return [AmountBreakdown]
36
+ attr_accessor :breakdown
37
+
38
+ # A mapping from model property names to API property names.
39
+ def self.names
40
+ @_hash = {} if @_hash.nil?
41
+ @_hash['currency_code'] = 'currency_code'
42
+ @_hash['value'] = 'value'
43
+ @_hash['breakdown'] = 'breakdown'
44
+ @_hash
45
+ end
46
+
47
+ # An array for optional fields
48
+ def self.optionals
49
+ %w[
50
+ breakdown
51
+ ]
52
+ end
53
+
54
+ # An array for nullable fields
55
+ def self.nullables
56
+ []
57
+ end
58
+
59
+ def initialize(currency_code:, value:, breakdown: SKIP)
60
+ @currency_code = currency_code
61
+ @value = value
62
+ @breakdown = breakdown unless breakdown == SKIP
63
+ end
64
+
65
+ # Creates an instance of the object from a hash.
66
+ def self.from_hash(hash)
67
+ return nil unless hash
68
+
69
+ # Extract variables from the hash.
70
+ currency_code = hash.key?('currency_code') ? hash['currency_code'] : nil
71
+ value = hash.key?('value') ? hash['value'] : nil
72
+ breakdown = AmountBreakdown.from_hash(hash['breakdown']) if hash['breakdown']
73
+
74
+ # Create object from extracted values.
75
+ AmountWithBreakdown.new(currency_code: currency_code,
76
+ value: value,
77
+ breakdown: breakdown)
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,60 @@
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 apple pay.
8
+ class ApplePayAttributes < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The details about a customer in PayPal's system of record.
13
+ # @return [CustomerInformation]
14
+ attr_accessor :customer
15
+
16
+ # Base vaulting specification. The object can be extended for specific use
17
+ # cases within each payment_source that supports vaulting.
18
+ # @return [VaultInstruction]
19
+ attr_accessor :vault
20
+
21
+ # A mapping from model property names to API property names.
22
+ def self.names
23
+ @_hash = {} if @_hash.nil?
24
+ @_hash['customer'] = 'customer'
25
+ @_hash['vault'] = 'vault'
26
+ @_hash
27
+ end
28
+
29
+ # An array for optional fields
30
+ def self.optionals
31
+ %w[
32
+ customer
33
+ vault
34
+ ]
35
+ end
36
+
37
+ # An array for nullable fields
38
+ def self.nullables
39
+ []
40
+ end
41
+
42
+ def initialize(customer: SKIP, vault: SKIP)
43
+ @customer = customer unless customer == SKIP
44
+ @vault = vault unless vault == SKIP
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
+ customer = CustomerInformation.from_hash(hash['customer']) if hash['customer']
53
+ vault = VaultInstruction.from_hash(hash['vault']) if hash['vault']
54
+
55
+ # Create object from extracted values.
56
+ ApplePayAttributes.new(customer: customer,
57
+ vault: vault)
58
+ end
59
+ end
60
+ 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 Apple Pay.
8
+ class ApplePayAttributesResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The details about a saved payment source.
13
+ # @return [VaultResponse]
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 = VaultResponse.from_hash(hash['vault']) if hash['vault']
45
+
46
+ # Create object from extracted values.
47
+ ApplePayAttributesResponse.new(vault: vault)
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,94 @@
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 payment card to be used to fund a payment. Can be a credit or debit
8
+ # card.
9
+ class ApplePayCard < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # The card holder's name as it appears on the card.
14
+ # @return [String]
15
+ attr_accessor :name
16
+
17
+ # The last digits of the payment card.
18
+ # @return [String]
19
+ attr_accessor :last_digits
20
+
21
+ # Type of card. i.e Credit, Debit and so on.
22
+ # @return [CardType]
23
+ attr_accessor :type
24
+
25
+ # The card network or brand. Applies to credit, debit, gift, and payment
26
+ # cards.
27
+ # @return [CardBrand]
28
+ attr_accessor :brand
29
+
30
+ # The portable international postal address. Maps to
31
+ # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/
32
+ # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls:
33
+ # the autocomplete
34
+ # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co
35
+ # ntrols-the-autocomplete-attribute).
36
+ # @return [Address]
37
+ attr_accessor :billing_address
38
+
39
+ # A mapping from model property names to API property names.
40
+ def self.names
41
+ @_hash = {} if @_hash.nil?
42
+ @_hash['name'] = 'name'
43
+ @_hash['last_digits'] = 'last_digits'
44
+ @_hash['type'] = 'type'
45
+ @_hash['brand'] = 'brand'
46
+ @_hash['billing_address'] = 'billing_address'
47
+ @_hash
48
+ end
49
+
50
+ # An array for optional fields
51
+ def self.optionals
52
+ %w[
53
+ name
54
+ last_digits
55
+ type
56
+ brand
57
+ billing_address
58
+ ]
59
+ end
60
+
61
+ # An array for nullable fields
62
+ def self.nullables
63
+ []
64
+ end
65
+
66
+ def initialize(name: SKIP, last_digits: SKIP, type: SKIP, brand: SKIP,
67
+ billing_address: SKIP)
68
+ @name = name unless name == SKIP
69
+ @last_digits = last_digits unless last_digits == SKIP
70
+ @type = type unless type == SKIP
71
+ @brand = brand unless brand == SKIP
72
+ @billing_address = billing_address unless billing_address == SKIP
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
+ name = hash.key?('name') ? hash['name'] : SKIP
81
+ last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP
82
+ type = hash.key?('type') ? hash['type'] : SKIP
83
+ brand = hash.key?('brand') ? hash['brand'] : SKIP
84
+ billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address']
85
+
86
+ # Create object from extracted values.
87
+ ApplePayCard.new(name: name,
88
+ last_digits: last_digits,
89
+ type: type,
90
+ brand: brand,
91
+ billing_address: billing_address)
92
+ end
93
+ end
94
+ end