paypal-server-sdk 0.5.2 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -18
  3. data/lib/paypal_server_sdk/controllers/base_controller.rb +1 -1
  4. data/lib/paypal_server_sdk/controllers/orders_controller.rb +64 -25
  5. data/lib/paypal_server_sdk/controllers/payments_controller.rb +53 -26
  6. data/lib/paypal_server_sdk/controllers/vault_controller.rb +4 -4
  7. data/lib/paypal_server_sdk/models/avs_code.rb +1 -1
  8. data/lib/paypal_server_sdk/models/blik_experience_context.rb +2 -2
  9. data/lib/paypal_server_sdk/models/blik_level0_payment_object.rb +2 -2
  10. data/lib/paypal_server_sdk/models/blik_one_click_payment_object.rb +2 -2
  11. data/lib/paypal_server_sdk/models/blik_one_click_payment_request.rb +2 -2
  12. data/lib/paypal_server_sdk/models/blik_payment_object.rb +4 -4
  13. data/lib/paypal_server_sdk/models/blik_payment_request.rb +8 -8
  14. data/lib/paypal_server_sdk/models/card_verification_details.rb +15 -2
  15. data/lib/paypal_server_sdk/models/card_verification_processor_response.rb +2 -2
  16. data/lib/paypal_server_sdk/models/confirm_order_request.rb +5 -8
  17. data/lib/paypal_server_sdk/models/cvv_code.rb +1 -1
  18. data/lib/paypal_server_sdk/models/eci_flag.rb +1 -1
  19. data/lib/paypal_server_sdk/models/eps_payment_object.rb +2 -2
  20. data/lib/paypal_server_sdk/models/eps_payment_request.rb +2 -2
  21. data/lib/paypal_server_sdk/models/{fullfillment_type.rb → fulfillment_type.rb} +2 -2
  22. data/lib/paypal_server_sdk/models/google_pay_card.rb +114 -0
  23. data/lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb +11 -2
  24. data/lib/paypal_server_sdk/models/ideal_payment_object.rb +2 -2
  25. data/lib/paypal_server_sdk/models/ideal_payment_request.rb +2 -2
  26. data/lib/paypal_server_sdk/models/link_description.rb +1 -1
  27. data/lib/paypal_server_sdk/models/link_http_method.rb +1 -1
  28. data/lib/paypal_server_sdk/models/{my_bank_payment_object.rb → mybank_payment_object.rb} +2 -2
  29. data/lib/paypal_server_sdk/models/{my_bank_payment_request.rb → mybank_payment_request.rb} +2 -2
  30. data/lib/paypal_server_sdk/models/network_token.rb +1 -1
  31. data/lib/paypal_server_sdk/models/order.rb +12 -12
  32. data/lib/paypal_server_sdk/models/order_authorize_request_payment_source.rb +2 -2
  33. data/lib/paypal_server_sdk/models/order_authorize_response.rb +10 -10
  34. data/lib/paypal_server_sdk/models/order_authorize_response_payment_source.rb +2 -2
  35. data/lib/paypal_server_sdk/models/order_capture_request_payment_source.rb +2 -2
  36. data/lib/paypal_server_sdk/models/pa_res_status.rb +1 -1
  37. data/lib/paypal_server_sdk/models/payment_source.rb +10 -10
  38. data/lib/paypal_server_sdk/models/payment_source_response.rb +10 -10
  39. data/lib/paypal_server_sdk/models/payment_token_response_payment_source.rb +2 -2
  40. data/lib/paypal_server_sdk/models/{pay_pal_experience_landing_page.rb → paypal_experience_landing_page.rb} +2 -2
  41. data/lib/paypal_server_sdk/models/{pay_pal_experience_user_action.rb → paypal_experience_user_action.rb} +2 -2
  42. data/lib/paypal_server_sdk/models/{pay_pal_payment_token.rb → paypal_payment_token.rb} +3 -3
  43. data/lib/paypal_server_sdk/models/{pay_pal_payment_token_customer_type.rb → paypal_payment_token_customer_type.rb} +2 -2
  44. data/lib/paypal_server_sdk/models/{pay_pal_payment_token_usage_pattern.rb → paypal_payment_token_usage_pattern.rb} +2 -2
  45. data/lib/paypal_server_sdk/models/{pay_pal_payment_token_usage_type.rb → paypal_payment_token_usage_type.rb} +2 -2
  46. data/lib/paypal_server_sdk/models/{pay_pal_wallet.rb → paypal_wallet.rb} +6 -6
  47. data/lib/paypal_server_sdk/models/{pay_pal_wallet_account_verification_status.rb → paypal_wallet_account_verification_status.rb} +2 -2
  48. data/lib/paypal_server_sdk/models/{pay_pal_wallet_attributes.rb → paypal_wallet_attributes.rb} +6 -6
  49. data/lib/paypal_server_sdk/models/{pay_pal_wallet_attributes_response.rb → paypal_wallet_attributes_response.rb} +4 -4
  50. data/lib/paypal_server_sdk/models/{pay_pal_wallet_customer.rb → paypal_wallet_customer.rb} +2 -2
  51. data/lib/paypal_server_sdk/models/{pay_pal_wallet_customer_request.rb → paypal_wallet_customer_request.rb} +3 -3
  52. data/lib/paypal_server_sdk/models/{pay_pal_wallet_experience_context.rb → paypal_wallet_experience_context.rb} +8 -8
  53. data/lib/paypal_server_sdk/models/{pay_pal_wallet_response.rb → paypal_wallet_response.rb} +5 -5
  54. data/lib/paypal_server_sdk/models/{pay_pal_wallet_vault_instruction.rb → paypal_wallet_vault_instruction.rb} +8 -8
  55. data/lib/paypal_server_sdk/models/{pay_pal_wallet_vault_response.rb → paypal_wallet_vault_response.rb} +5 -5
  56. data/lib/paypal_server_sdk/models/{pay_pal_wallet_vault_status.rb → paypal_wallet_vault_status.rb} +2 -2
  57. data/lib/paypal_server_sdk/models/portable_postal_address_medium_grained.rb +116 -0
  58. data/lib/paypal_server_sdk/models/processor_response.rb +2 -2
  59. data/lib/paypal_server_sdk/models/setup_token_request_payment_source.rb +2 -2
  60. data/lib/paypal_server_sdk/models/setup_token_response_payment_source.rb +2 -2
  61. data/lib/paypal_server_sdk/models/shipment_carrier.rb +325 -1
  62. data/lib/paypal_server_sdk/models/shipping_details.rb +1 -1
  63. data/lib/paypal_server_sdk/models/shipping_with_tracking_details.rb +1 -1
  64. data/lib/paypal_server_sdk/models/three_d_secure_authentication_response.rb +1 -1
  65. data/lib/paypal_server_sdk/models/universal_product_code.rb +1 -1
  66. data/lib/paypal_server_sdk/models/upc_type.rb +1 -1
  67. data/lib/paypal_server_sdk/models/{vault_pay_pal_wallet_request.rb → vault_paypal_wallet_request.rb} +2 -2
  68. data/lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb +1 -1
  69. data/lib/paypal_server_sdk.rb +24 -22
  70. metadata +25 -24
  71. data/lib/paypal_server_sdk/models/processing_instruction.rb +0 -23
@@ -38,11 +38,13 @@ module PaypalServerSdk
38
38
  # @return [CheckoutPaymentIntent]
39
39
  attr_accessor :intent
40
40
 
41
- # The instruction to process an order.
42
- # @return [ProcessingInstruction]
41
+ # The intent to either capture payment immediately or authorize a payment
42
+ # for an order after order creation.
43
+ # @return [Object]
43
44
  attr_accessor :processing_instruction
44
45
 
45
- # The instruction to process an order.
46
+ # The intent to either capture payment immediately or authorize a payment
47
+ # for an order after order creation.
46
48
  # @return [Payer]
47
49
  attr_accessor :payer
48
50
 
@@ -101,12 +103,10 @@ module PaypalServerSdk
101
103
  []
102
104
  end
103
105
 
104
- def initialize(
105
- create_time: SKIP, update_time: SKIP, id: SKIP, payment_source: SKIP,
106
- intent: SKIP,
107
- processing_instruction: ProcessingInstruction::NO_INSTRUCTION,
108
- payer: SKIP, purchase_units: SKIP, status: SKIP, links: SKIP
109
- )
106
+ def initialize(create_time: SKIP, update_time: SKIP, id: SKIP,
107
+ payment_source: SKIP, intent: SKIP,
108
+ processing_instruction: SKIP, payer: SKIP,
109
+ purchase_units: SKIP, status: SKIP, links: SKIP)
110
110
  @create_time = create_time unless create_time == SKIP
111
111
  @update_time = update_time unless update_time == SKIP
112
112
  @id = id unless id == SKIP
@@ -131,7 +131,7 @@ module PaypalServerSdk
131
131
  hash['payment_source']
132
132
  intent = hash.key?('intent') ? hash['intent'] : SKIP
133
133
  processing_instruction =
134
- hash['processing_instruction'] ||= ProcessingInstruction::NO_INSTRUCTION
134
+ hash.key?('processing_instruction') ? hash['processing_instruction'] : SKIP
135
135
  payer = Payer.from_hash(hash['payer']) if hash['payer']
136
136
  # Parameter is an array, so we need to iterate through it
137
137
  purchase_units = nil
@@ -15,7 +15,7 @@ module PaypalServerSdk
15
15
  attr_accessor :card
16
16
 
17
17
  # The PayPal Wallet response.
18
- # @return [PayPalWalletResponse]
18
+ # @return [PaypalWalletResponse]
19
19
  attr_accessor :paypal
20
20
 
21
21
  # Information needed to pay using ApplePay.
@@ -72,7 +72,7 @@ module PaypalServerSdk
72
72
 
73
73
  # Extract variables from the hash.
74
74
  card = CardResponse.from_hash(hash['card']) if hash['card']
75
- paypal = PayPalWalletResponse.from_hash(hash['paypal']) if hash['paypal']
75
+ paypal = PaypalWalletResponse.from_hash(hash['paypal']) if hash['paypal']
76
76
  apple_pay = ApplePayPaymentObject.from_hash(hash['apple_pay']) if hash['apple_pay']
77
77
  google_pay = GooglePayWalletResponse.from_hash(hash['google_pay']) if hash['google_pay']
78
78
  venmo = VenmoWalletResponse.from_hash(hash['venmo']) if hash['venmo']
@@ -26,7 +26,7 @@ module PaypalServerSdk
26
26
  attr_accessor :token
27
27
 
28
28
  # A resource that identifies a PayPal Wallet is used for payment.
29
- # @return [PayPalWallet]
29
+ # @return [PaypalWallet]
30
30
  attr_accessor :paypal
31
31
 
32
32
  # Information needed to pay using ApplePay.
@@ -87,7 +87,7 @@ module PaypalServerSdk
87
87
  # Extract variables from the hash.
88
88
  card = CardRequest.from_hash(hash['card']) if hash['card']
89
89
  token = Token.from_hash(hash['token']) if hash['token']
90
- paypal = PayPalWallet.from_hash(hash['paypal']) if hash['paypal']
90
+ paypal = PaypalWallet.from_hash(hash['paypal']) if hash['paypal']
91
91
  apple_pay = ApplePayRequest.from_hash(hash['apple_pay']) if hash['apple_pay']
92
92
  google_pay = GooglePayRequest.from_hash(hash['google_pay']) if hash['google_pay']
93
93
  venmo = VenmoWalletRequest.from_hash(hash['venmo']) if hash['venmo']
@@ -6,7 +6,7 @@
6
6
  module PaypalServerSdk
7
7
  # Transactions status result identifier. The outcome of the issuer's
8
8
  # authentication.
9
- class PAResStatus
9
+ class PaResStatus
10
10
  PA_RES_STATUS = [
11
11
  # TODO: Write general description for Y
12
12
  Y = 'Y'.freeze,
@@ -26,7 +26,7 @@ module PaypalServerSdk
26
26
  attr_accessor :token
27
27
 
28
28
  # A resource that identifies a PayPal Wallet is used for payment.
29
- # @return [PayPalWallet]
29
+ # @return [PaypalWallet]
30
30
  attr_accessor :paypal
31
31
 
32
32
  # Information needed to pay using Bancontact.
@@ -34,11 +34,11 @@ module PaypalServerSdk
34
34
  attr_accessor :bancontact
35
35
 
36
36
  # Information needed to pay using BLIK.
37
- # @return [BLIKPaymentRequest]
37
+ # @return [BlikPaymentRequest]
38
38
  attr_accessor :blik
39
39
 
40
40
  # Information needed to pay using eps.
41
- # @return [EPSPaymentRequest]
41
+ # @return [EpsPaymentRequest]
42
42
  attr_accessor :eps
43
43
 
44
44
  # Information needed to pay using giropay.
@@ -46,11 +46,11 @@ module PaypalServerSdk
46
46
  attr_accessor :giropay
47
47
 
48
48
  # Information needed to pay using iDEAL.
49
- # @return [IDEALPaymentRequest]
49
+ # @return [IdealPaymentRequest]
50
50
  attr_accessor :ideal
51
51
 
52
52
  # Information needed to pay using MyBank.
53
- # @return [MyBankPaymentRequest]
53
+ # @return [MybankPaymentRequest]
54
54
  attr_accessor :mybank
55
55
 
56
56
  # Information needed to pay using P24 (Przelewy24).
@@ -152,13 +152,13 @@ module PaypalServerSdk
152
152
  # Extract variables from the hash.
153
153
  card = CardRequest.from_hash(hash['card']) if hash['card']
154
154
  token = Token.from_hash(hash['token']) if hash['token']
155
- paypal = PayPalWallet.from_hash(hash['paypal']) if hash['paypal']
155
+ paypal = PaypalWallet.from_hash(hash['paypal']) if hash['paypal']
156
156
  bancontact = BancontactPaymentRequest.from_hash(hash['bancontact']) if hash['bancontact']
157
- blik = BLIKPaymentRequest.from_hash(hash['blik']) if hash['blik']
158
- eps = EPSPaymentRequest.from_hash(hash['eps']) if hash['eps']
157
+ blik = BlikPaymentRequest.from_hash(hash['blik']) if hash['blik']
158
+ eps = EpsPaymentRequest.from_hash(hash['eps']) if hash['eps']
159
159
  giropay = GiropayPaymentRequest.from_hash(hash['giropay']) if hash['giropay']
160
- ideal = IDEALPaymentRequest.from_hash(hash['ideal']) if hash['ideal']
161
- mybank = MyBankPaymentRequest.from_hash(hash['mybank']) if hash['mybank']
160
+ ideal = IdealPaymentRequest.from_hash(hash['ideal']) if hash['ideal']
161
+ mybank = MybankPaymentRequest.from_hash(hash['mybank']) if hash['mybank']
162
162
  p24 = P24PaymentRequest.from_hash(hash['p24']) if hash['p24']
163
163
  sofort = SofortPaymentRequest.from_hash(hash['sofort']) if hash['sofort']
164
164
  trustly = TrustlyPaymentRequest.from_hash(hash['trustly']) if hash['trustly']
@@ -15,7 +15,7 @@ module PaypalServerSdk
15
15
  attr_accessor :card
16
16
 
17
17
  # The PayPal Wallet response.
18
- # @return [PayPalWalletResponse]
18
+ # @return [PaypalWalletResponse]
19
19
  attr_accessor :paypal
20
20
 
21
21
  # Information used to pay Bancontact.
@@ -23,11 +23,11 @@ module PaypalServerSdk
23
23
  attr_accessor :bancontact
24
24
 
25
25
  # Information used to pay using BLIK.
26
- # @return [BLIKPaymentObject]
26
+ # @return [BlikPaymentObject]
27
27
  attr_accessor :blik
28
28
 
29
29
  # Information used to pay using eps.
30
- # @return [EPSPaymentObject]
30
+ # @return [EpsPaymentObject]
31
31
  attr_accessor :eps
32
32
 
33
33
  # Information needed to pay using giropay.
@@ -35,11 +35,11 @@ module PaypalServerSdk
35
35
  attr_accessor :giropay
36
36
 
37
37
  # Information used to pay using iDEAL.
38
- # @return [IDEALPaymentObject]
38
+ # @return [IdealPaymentObject]
39
39
  attr_accessor :ideal
40
40
 
41
41
  # Information used to pay using MyBank.
42
- # @return [MyBankPaymentObject]
42
+ # @return [MybankPaymentObject]
43
43
  attr_accessor :mybank
44
44
 
45
45
  # Information used to pay using P24(Przelewy24).
@@ -137,13 +137,13 @@ module PaypalServerSdk
137
137
 
138
138
  # Extract variables from the hash.
139
139
  card = CardResponse.from_hash(hash['card']) if hash['card']
140
- paypal = PayPalWalletResponse.from_hash(hash['paypal']) if hash['paypal']
140
+ paypal = PaypalWalletResponse.from_hash(hash['paypal']) if hash['paypal']
141
141
  bancontact = BancontactPaymentObject.from_hash(hash['bancontact']) if hash['bancontact']
142
- blik = BLIKPaymentObject.from_hash(hash['blik']) if hash['blik']
143
- eps = EPSPaymentObject.from_hash(hash['eps']) if hash['eps']
142
+ blik = BlikPaymentObject.from_hash(hash['blik']) if hash['blik']
143
+ eps = EpsPaymentObject.from_hash(hash['eps']) if hash['eps']
144
144
  giropay = GiropayPaymentObject.from_hash(hash['giropay']) if hash['giropay']
145
- ideal = IDEALPaymentObject.from_hash(hash['ideal']) if hash['ideal']
146
- mybank = MyBankPaymentObject.from_hash(hash['mybank']) if hash['mybank']
145
+ ideal = IdealPaymentObject.from_hash(hash['ideal']) if hash['ideal']
146
+ mybank = MybankPaymentObject.from_hash(hash['mybank']) if hash['mybank']
147
147
  p24 = P24PaymentObject.from_hash(hash['p24']) if hash['p24']
148
148
  sofort = SofortPaymentObject.from_hash(hash['sofort']) if hash['sofort']
149
149
  trustly = TrustlyPaymentObject.from_hash(hash['trustly']) if hash['trustly']
@@ -14,7 +14,7 @@ module PaypalServerSdk
14
14
  attr_accessor :card
15
15
 
16
16
  # Full representation of a Card Payment Token including network token.
17
- # @return [PayPalPaymentToken]
17
+ # @return [PaypalPaymentToken]
18
18
  attr_accessor :paypal
19
19
 
20
20
  # Full representation of a Card Payment Token including network token.
@@ -71,7 +71,7 @@ module PaypalServerSdk
71
71
 
72
72
  # Extract variables from the hash.
73
73
  card = CardPaymentToken.from_hash(hash['card']) if hash['card']
74
- paypal = PayPalPaymentToken.from_hash(hash['paypal']) if hash['paypal']
74
+ paypal = PaypalPaymentToken.from_hash(hash['paypal']) if hash['paypal']
75
75
  venmo = VenmoPaymentToken.from_hash(hash['venmo']) if hash['venmo']
76
76
  apple_pay = ApplePayPaymentToken.from_hash(hash['apple_pay']) if hash['apple_pay']
77
77
  bank = hash.key?('bank') ? hash['bank'] : SKIP
@@ -5,8 +5,8 @@
5
5
 
6
6
  module PaypalServerSdk
7
7
  # The type of landing page to show on the PayPal site for customer checkout.
8
- class PayPalExperienceLandingPage
9
- PAY_PAL_EXPERIENCE_LANDING_PAGE = [
8
+ class PaypalExperienceLandingPage
9
+ PAYPAL_EXPERIENCE_LANDING_PAGE = [
10
10
  # TODO: Write general description for LOGIN
11
11
  LOGIN = 'LOGIN'.freeze,
12
12
 
@@ -6,8 +6,8 @@
6
6
  module PaypalServerSdk
7
7
  # Configures a <strong>Continue</strong> or <strong>Pay Now</strong> checkout
8
8
  # flow.
9
- class PayPalExperienceUserAction
10
- PAY_PAL_EXPERIENCE_USER_ACTION = [
9
+ class PaypalExperienceUserAction
10
+ PAYPAL_EXPERIENCE_USER_ACTION = [
11
11
  # TODO: Write general description for CONTINUE
12
12
  CONTINUE = 'CONTINUE'.freeze,
13
13
 
@@ -4,8 +4,8 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module PaypalServerSdk
7
- # PayPalPaymentToken Model.
8
- class PayPalPaymentToken < BaseModel
7
+ # PaypalPaymentToken Model.
8
+ class PaypalPaymentToken < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -163,7 +163,7 @@ module PaypalServerSdk
163
163
  phone_number = Phone.from_hash(hash['phone_number']) if hash['phone_number']
164
164
 
165
165
  # Create object from extracted values.
166
- PayPalPaymentToken.new(description: description,
166
+ PaypalPaymentToken.new(description: description,
167
167
  shipping: shipping,
168
168
  permit_multiple_payment_tokens: permit_multiple_payment_tokens,
169
169
  usage_type: usage_type,
@@ -7,8 +7,8 @@ module PaypalServerSdk
7
7
  # The customer type associated with the PayPal payment token. This is to
8
8
  # indicate whether the customer acting on the merchant / platform is either a
9
9
  # business or a consumer.
10
- class PayPalPaymentTokenCustomerType
11
- PAY_PAL_PAYMENT_TOKEN_CUSTOMER_TYPE = [
10
+ class PaypalPaymentTokenCustomerType
11
+ PAYPAL_PAYMENT_TOKEN_CUSTOMER_TYPE = [
12
12
  # TODO: Write general description for CONSUMER
13
13
  CONSUMER = 'CONSUMER'.freeze,
14
14
 
@@ -5,8 +5,8 @@
5
5
 
6
6
  module PaypalServerSdk
7
7
  # Expected business/pricing model for the billing agreement.
8
- class PayPalPaymentTokenUsagePattern
9
- PAY_PAL_PAYMENT_TOKEN_USAGE_PATTERN = [
8
+ class PaypalPaymentTokenUsagePattern
9
+ PAYPAL_PAYMENT_TOKEN_USAGE_PATTERN = [
10
10
  # TODO: Write general description for IMMEDIATE
11
11
  IMMEDIATE = 'IMMEDIATE'.freeze,
12
12
 
@@ -5,8 +5,8 @@
5
5
 
6
6
  module PaypalServerSdk
7
7
  # The usage type associated with the PayPal payment token.
8
- class PayPalPaymentTokenUsageType
9
- PAY_PAL_PAYMENT_TOKEN_USAGE_TYPE = [
8
+ class PaypalPaymentTokenUsageType
9
+ PAYPAL_PAYMENT_TOKEN_USAGE_TYPE = [
10
10
  # TODO: Write general description for MERCHANT
11
11
  MERCHANT = 'MERCHANT'.freeze,
12
12
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  module PaypalServerSdk
7
7
  # A resource that identifies a PayPal Wallet is used for payment.
8
- class PayPalWallet < BaseModel
8
+ class PaypalWallet < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -55,7 +55,7 @@ module PaypalServerSdk
55
55
  attr_accessor :address
56
56
 
57
57
  # Additional attributes associated with the use of this PayPal Wallet.
58
- # @return [PayPalWalletAttributes]
58
+ # @return [PaypalWalletAttributes]
59
59
  attr_accessor :attributes
60
60
 
61
61
  # Customizes the payer experience during the approval process for payment
@@ -63,7 +63,7 @@ module PaypalServerSdk
63
63
  # might configure <code>brand_name</code> and
64
64
  # <code>shipping_preference</code> during partner account setup, which
65
65
  # overrides the request values.</blockquote>
66
- # @return [PayPalWalletExperienceContext]
66
+ # @return [PaypalWalletExperienceContext]
67
67
  attr_accessor :experience_context
68
68
 
69
69
  # The PayPal billing agreement ID. References an approved recurring payment
@@ -136,14 +136,14 @@ module PaypalServerSdk
136
136
  birth_date = hash.key?('birth_date') ? hash['birth_date'] : SKIP
137
137
  tax_info = TaxInfo.from_hash(hash['tax_info']) if hash['tax_info']
138
138
  address = Address.from_hash(hash['address']) if hash['address']
139
- attributes = PayPalWalletAttributes.from_hash(hash['attributes']) if hash['attributes']
140
- experience_context = PayPalWalletExperienceContext.from_hash(hash['experience_context']) if
139
+ attributes = PaypalWalletAttributes.from_hash(hash['attributes']) if hash['attributes']
140
+ experience_context = PaypalWalletExperienceContext.from_hash(hash['experience_context']) if
141
141
  hash['experience_context']
142
142
  billing_agreement_id =
143
143
  hash.key?('billing_agreement_id') ? hash['billing_agreement_id'] : SKIP
144
144
 
145
145
  # Create object from extracted values.
146
- PayPalWallet.new(vault_id: vault_id,
146
+ PaypalWallet.new(vault_id: vault_id,
147
147
  email_address: email_address,
148
148
  name: name,
149
149
  phone: phone,
@@ -6,8 +6,8 @@
6
6
  module PaypalServerSdk
7
7
  # The account status indicates whether the buyer has verified the financial
8
8
  # details associated with their PayPal account.
9
- class PayPalWalletAccountVerificationStatus
10
- PAY_PAL_WALLET_ACCOUNT_VERIFICATION_STATUS = [
9
+ class PaypalWalletAccountVerificationStatus
10
+ PAYPAL_WALLET_ACCOUNT_VERIFICATION_STATUS = [
11
11
  # TODO: Write general description for VERIFIED
12
12
  VERIFIED = 'VERIFIED'.freeze,
13
13
 
@@ -5,16 +5,16 @@
5
5
 
6
6
  module PaypalServerSdk
7
7
  # Additional attributes associated with the use of this PayPal Wallet.
8
- class PayPalWalletAttributes < BaseModel
8
+ class PaypalWalletAttributes < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
12
  # TODO: Write general description for this method
13
- # @return [PayPalWalletCustomerRequest]
13
+ # @return [PaypalWalletCustomerRequest]
14
14
  attr_accessor :customer
15
15
 
16
16
  # TODO: Write general description for this method
17
- # @return [PayPalWalletVaultInstruction]
17
+ # @return [PaypalWalletVaultInstruction]
18
18
  attr_accessor :vault
19
19
 
20
20
  # A mapping from model property names to API property names.
@@ -48,11 +48,11 @@ module PaypalServerSdk
48
48
  return nil unless hash
49
49
 
50
50
  # Extract variables from the hash.
51
- customer = PayPalWalletCustomerRequest.from_hash(hash['customer']) if hash['customer']
52
- vault = PayPalWalletVaultInstruction.from_hash(hash['vault']) if hash['vault']
51
+ customer = PaypalWalletCustomerRequest.from_hash(hash['customer']) if hash['customer']
52
+ vault = PaypalWalletVaultInstruction.from_hash(hash['vault']) if hash['vault']
53
53
 
54
54
  # Create object from extracted values.
55
- PayPalWalletAttributes.new(customer: customer,
55
+ PaypalWalletAttributes.new(customer: customer,
56
56
  vault: vault)
57
57
  end
58
58
  end
@@ -5,12 +5,12 @@
5
5
 
6
6
  module PaypalServerSdk
7
7
  # Additional attributes associated with the use of a PayPal Wallet.
8
- class PayPalWalletAttributesResponse < BaseModel
8
+ class PaypalWalletAttributesResponse < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
12
  # The details about a saved PayPal Wallet payment source.
13
- # @return [PayPalWalletVaultResponse]
13
+ # @return [PaypalWalletVaultResponse]
14
14
  attr_accessor :vault
15
15
 
16
16
  # An array of merchant cobranded cards used by buyer to complete an order.
@@ -50,7 +50,7 @@ module PaypalServerSdk
50
50
  return nil unless hash
51
51
 
52
52
  # Extract variables from the hash.
53
- vault = PayPalWalletVaultResponse.from_hash(hash['vault']) if hash['vault']
53
+ vault = PaypalWalletVaultResponse.from_hash(hash['vault']) if hash['vault']
54
54
  # Parameter is an array, so we need to iterate through it
55
55
  cobranded_cards = nil
56
56
  unless hash['cobranded_cards'].nil?
@@ -63,7 +63,7 @@ module PaypalServerSdk
63
63
  cobranded_cards = SKIP unless hash.key?('cobranded_cards')
64
64
 
65
65
  # Create object from extracted values.
66
- PayPalWalletAttributesResponse.new(vault: vault,
66
+ PaypalWalletAttributesResponse.new(vault: vault,
67
67
  cobranded_cards: cobranded_cards)
68
68
  end
69
69
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  module PaypalServerSdk
7
7
  # The details about a customer in PayPal's system of record.
8
- class PayPalWalletCustomer < BaseModel
8
+ class PaypalWalletCustomer < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -76,7 +76,7 @@ module PaypalServerSdk
76
76
  hash.key?('merchant_customer_id') ? hash['merchant_customer_id'] : SKIP
77
77
 
78
78
  # Create object from extracted values.
79
- PayPalWalletCustomer.new(id: id,
79
+ PaypalWalletCustomer.new(id: id,
80
80
  email_address: email_address,
81
81
  phone: phone,
82
82
  merchant_customer_id: merchant_customer_id)
@@ -4,8 +4,8 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module PaypalServerSdk
7
- # PayPalWalletCustomerRequest Model.
8
- class PayPalWalletCustomerRequest < BaseModel
7
+ # PaypalWalletCustomerRequest Model.
8
+ class PaypalWalletCustomerRequest < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -76,7 +76,7 @@ module PaypalServerSdk
76
76
  hash.key?('merchant_customer_id') ? hash['merchant_customer_id'] : SKIP
77
77
 
78
78
  # Create object from extracted values.
79
- PayPalWalletCustomerRequest.new(id: id,
79
+ PaypalWalletCustomerRequest.new(id: id,
80
80
  email_address: email_address,
81
81
  phone: phone,
82
82
  merchant_customer_id: merchant_customer_id)
@@ -9,7 +9,7 @@ module PaypalServerSdk
9
9
  # configure <code>brand_name</code> and <code>shipping_preference</code>
10
10
  # during partner account setup, which overrides the request
11
11
  # values.</blockquote>
12
- class PayPalWalletExperienceContext < BaseModel
12
+ class PaypalWalletExperienceContext < BaseModel
13
13
  SKIP = Object.new
14
14
  private_constant :SKIP
15
15
 
@@ -43,12 +43,12 @@ module PaypalServerSdk
43
43
  attr_accessor :cancel_url
44
44
 
45
45
  # The type of landing page to show on the PayPal site for customer checkout.
46
- # @return [PayPalExperienceLandingPage]
46
+ # @return [PaypalExperienceLandingPage]
47
47
  attr_accessor :landing_page
48
48
 
49
49
  # Configures a <strong>Continue</strong> or <strong>Pay Now</strong>
50
50
  # checkout flow.
51
- # @return [PayPalExperienceUserAction]
51
+ # @return [PaypalExperienceUserAction]
52
52
  attr_accessor :user_action
53
53
 
54
54
  # The merchant-preferred payment methods.
@@ -92,8 +92,8 @@ module PaypalServerSdk
92
92
  brand_name: SKIP, locale: SKIP,
93
93
  shipping_preference: ShippingPreference::GET_FROM_FILE, return_url: SKIP,
94
94
  cancel_url: SKIP,
95
- landing_page: PayPalExperienceLandingPage::NO_PREFERENCE,
96
- user_action: PayPalExperienceUserAction::CONTINUE,
95
+ landing_page: PaypalExperienceLandingPage::NO_PREFERENCE,
96
+ user_action: PaypalExperienceUserAction::CONTINUE,
97
97
  payment_method_preference: PayeePaymentMethodPreference::UNRESTRICTED
98
98
  )
99
99
  @brand_name = brand_name unless brand_name == SKIP
@@ -121,13 +121,13 @@ module PaypalServerSdk
121
121
  return_url = hash.key?('return_url') ? hash['return_url'] : SKIP
122
122
  cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP
123
123
  landing_page =
124
- hash['landing_page'] ||= PayPalExperienceLandingPage::NO_PREFERENCE
125
- user_action = hash['user_action'] ||= PayPalExperienceUserAction::CONTINUE
124
+ hash['landing_page'] ||= PaypalExperienceLandingPage::NO_PREFERENCE
125
+ user_action = hash['user_action'] ||= PaypalExperienceUserAction::CONTINUE
126
126
  payment_method_preference =
127
127
  hash['payment_method_preference'] ||= PayeePaymentMethodPreference::UNRESTRICTED
128
128
 
129
129
  # Create object from extracted values.
130
- PayPalWalletExperienceContext.new(brand_name: brand_name,
130
+ PaypalWalletExperienceContext.new(brand_name: brand_name,
131
131
  locale: locale,
132
132
  shipping_preference: shipping_preference,
133
133
  return_url: return_url,
@@ -5,7 +5,7 @@
5
5
 
6
6
  module PaypalServerSdk
7
7
  # The PayPal Wallet response.
8
- class PayPalWalletResponse < BaseModel
8
+ class PaypalWalletResponse < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -26,7 +26,7 @@ module PaypalServerSdk
26
26
 
27
27
  # The account status indicates whether the buyer has verified the financial
28
28
  # details associated with their PayPal account.
29
- # @return [PayPalWalletAccountVerificationStatus]
29
+ # @return [PaypalWalletAccountVerificationStatus]
30
30
  attr_accessor :account_status
31
31
 
32
32
  # The name of the party.
@@ -71,7 +71,7 @@ module PaypalServerSdk
71
71
  attr_accessor :address
72
72
 
73
73
  # Additional attributes associated with the use of a PayPal Wallet.
74
- # @return [PayPalWalletAttributesResponse]
74
+ # @return [PaypalWalletAttributesResponse]
75
75
  attr_accessor :attributes
76
76
 
77
77
  # A mapping from model property names to API property names.
@@ -146,11 +146,11 @@ module PaypalServerSdk
146
146
  business_name = hash.key?('business_name') ? hash['business_name'] : SKIP
147
147
  tax_info = TaxInfo.from_hash(hash['tax_info']) if hash['tax_info']
148
148
  address = Address.from_hash(hash['address']) if hash['address']
149
- attributes = PayPalWalletAttributesResponse.from_hash(hash['attributes']) if
149
+ attributes = PaypalWalletAttributesResponse.from_hash(hash['attributes']) if
150
150
  hash['attributes']
151
151
 
152
152
  # Create object from extracted values.
153
- PayPalWalletResponse.new(email_address: email_address,
153
+ PaypalWalletResponse.new(email_address: email_address,
154
154
  account_id: account_id,
155
155
  account_status: account_status,
156
156
  name: name,
@@ -4,8 +4,8 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module PaypalServerSdk
7
- # PayPalWalletVaultInstruction Model.
8
- class PayPalWalletVaultInstruction < BaseModel
7
+ # PaypalWalletVaultInstruction Model.
8
+ class PaypalWalletVaultInstruction < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -20,17 +20,17 @@ module PaypalServerSdk
20
20
  attr_accessor :description
21
21
 
22
22
  # Expected business/pricing model for the billing agreement.
23
- # @return [PayPalPaymentTokenUsagePattern]
23
+ # @return [PaypalPaymentTokenUsagePattern]
24
24
  attr_accessor :usage_pattern
25
25
 
26
26
  # The usage type associated with the PayPal payment token.
27
- # @return [PayPalPaymentTokenUsageType]
27
+ # @return [PaypalPaymentTokenUsageType]
28
28
  attr_accessor :usage_type
29
29
 
30
30
  # The customer type associated with the PayPal payment token. This is to
31
31
  # indicate whether the customer acting on the merchant / platform is either
32
32
  # a business or a consumer.
33
- # @return [PayPalPaymentTokenCustomerType]
33
+ # @return [PaypalPaymentTokenCustomerType]
34
34
  attr_accessor :customer_type
35
35
 
36
36
  # Create multiple payment tokens for the same payer, merchant/platform
@@ -75,7 +75,7 @@ module PaypalServerSdk
75
75
 
76
76
  def initialize(usage_type:, store_in_vault: SKIP, description: SKIP,
77
77
  usage_pattern: SKIP,
78
- customer_type: PayPalPaymentTokenCustomerType::CONSUMER,
78
+ customer_type: PaypalPaymentTokenCustomerType::CONSUMER,
79
79
  permit_multiple_payment_tokens: false)
80
80
  @store_in_vault = store_in_vault unless store_in_vault == SKIP
81
81
  @description = description unless description == SKIP
@@ -99,12 +99,12 @@ module PaypalServerSdk
99
99
  description = hash.key?('description') ? hash['description'] : SKIP
100
100
  usage_pattern = hash.key?('usage_pattern') ? hash['usage_pattern'] : SKIP
101
101
  customer_type =
102
- hash['customer_type'] ||= PayPalPaymentTokenCustomerType::CONSUMER
102
+ hash['customer_type'] ||= PaypalPaymentTokenCustomerType::CONSUMER
103
103
  permit_multiple_payment_tokens =
104
104
  hash['permit_multiple_payment_tokens'] ||= false
105
105
 
106
106
  # Create object from extracted values.
107
- PayPalWalletVaultInstruction.new(usage_type: usage_type,
107
+ PaypalWalletVaultInstruction.new(usage_type: usage_type,
108
108
  store_in_vault: store_in_vault,
109
109
  description: description,
110
110
  usage_pattern: usage_pattern,