paypal-server-sdk 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +73 -23
- data/bin/console +15 -0
- data/lib/paypal_server_sdk/client.rb +11 -0
- data/lib/paypal_server_sdk/configuration.rb +66 -0
- data/lib/paypal_server_sdk/controllers/base_controller.rb +1 -1
- data/lib/paypal_server_sdk/http/auth/o_auth2.rb +15 -0
- data/lib/paypal_server_sdk/http/proxy_settings.rb +9 -0
- data/lib/paypal_server_sdk/logging/configuration/api_logging_configuration.rb +181 -109
- data/lib/paypal_server_sdk/models/apple_pay_payment_data_type.rb +13 -0
- data/lib/paypal_server_sdk/models/application_context_user_action.rb +13 -0
- data/lib/paypal_server_sdk/models/authorization_incomplete_reason.rb +13 -0
- data/lib/paypal_server_sdk/models/authorization_status.rb +17 -0
- data/lib/paypal_server_sdk/models/avs_code.rb +35 -0
- data/lib/paypal_server_sdk/models/callback_events.rb +13 -0
- data/lib/paypal_server_sdk/models/capture_incomplete_reason.rb +23 -0
- data/lib/paypal_server_sdk/models/capture_status.rb +17 -0
- data/lib/paypal_server_sdk/models/capture_type.rb +6 -0
- data/lib/paypal_server_sdk/models/card_brand.rb +41 -0
- data/lib/paypal_server_sdk/models/card_type.rb +16 -0
- data/lib/paypal_server_sdk/models/card_verification_status.rb +13 -0
- data/lib/paypal_server_sdk/models/checkout_payment_intent.rb +13 -0
- data/lib/paypal_server_sdk/models/cvv_code.rb +25 -0
- data/lib/paypal_server_sdk/models/disbursement_mode.rb +13 -0
- data/lib/paypal_server_sdk/models/dispute_category.rb +13 -0
- data/lib/paypal_server_sdk/models/eci_flag.rb +17 -0
- data/lib/paypal_server_sdk/models/enrollment_status.rb +15 -0
- data/lib/paypal_server_sdk/models/experience_context_shipping_preference.rb +14 -0
- data/lib/paypal_server_sdk/models/experience_status.rb +15 -0
- data/lib/paypal_server_sdk/models/fulfillment_type.rb +15 -0
- data/lib/paypal_server_sdk/models/google_pay_authentication_method.rb +13 -0
- data/lib/paypal_server_sdk/models/google_pay_payment_method.rb +6 -0
- data/lib/paypal_server_sdk/models/interval_unit.rb +15 -0
- data/lib/paypal_server_sdk/models/item_category.rb +14 -0
- data/lib/paypal_server_sdk/models/liability_shift_indicator.rb +14 -0
- data/lib/paypal_server_sdk/models/link_http_method.rb +19 -0
- data/lib/paypal_server_sdk/models/mobile_return_flow.rb +13 -0
- data/lib/paypal_server_sdk/models/o_auth_provider_error.rb +17 -0
- data/lib/paypal_server_sdk/models/order_application_context_landing_page.rb +14 -0
- data/lib/paypal_server_sdk/models/order_application_context_shipping_preference.rb +14 -0
- data/lib/paypal_server_sdk/models/order_application_context_user_action.rb +13 -0
- data/lib/paypal_server_sdk/models/order_status.rb +17 -0
- data/lib/paypal_server_sdk/models/order_tracker_status.rb +13 -0
- data/lib/paypal_server_sdk/models/orders_card_verification_method.rb +15 -0
- data/lib/paypal_server_sdk/models/os_type.rb +14 -0
- data/lib/paypal_server_sdk/models/pa_res_status.rb +19 -0
- data/lib/paypal_server_sdk/models/patch_op.rb +17 -0
- data/lib/paypal_server_sdk/models/payee_payment_method_preference.rb +13 -0
- data/lib/paypal_server_sdk/models/payment_advice_code.rb +26 -0
- data/lib/paypal_server_sdk/models/payment_initiator.rb +13 -0
- data/lib/paypal_server_sdk/models/payment_token_status.rb +16 -0
- data/lib/paypal_server_sdk/models/paypal_experience_landing_page.rb +15 -0
- data/lib/paypal_server_sdk/models/paypal_experience_user_action.rb +13 -0
- data/lib/paypal_server_sdk/models/paypal_payment_token_customer_type.rb +13 -0
- data/lib/paypal_server_sdk/models/paypal_payment_token_usage_type.rb +13 -0
- data/lib/paypal_server_sdk/models/paypal_reference_id_type.rb +15 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_account_verification_status.rb +13 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_contact_preference.rb +14 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_context_shipping_preference.rb +14 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_vault_status.rb +14 -0
- data/lib/paypal_server_sdk/models/phone_type.rb +16 -0
- data/lib/paypal_server_sdk/models/plan_request_status.rb +14 -0
- data/lib/paypal_server_sdk/models/pricing_model.rb +14 -0
- data/lib/paypal_server_sdk/models/processor_response_code.rb +165 -0
- data/lib/paypal_server_sdk/models/reason_code.rb +19 -0
- data/lib/paypal_server_sdk/models/refund_incomplete_reason.rb +6 -0
- data/lib/paypal_server_sdk/models/refund_status.rb +15 -0
- data/lib/paypal_server_sdk/models/return_flow.rb +13 -0
- data/lib/paypal_server_sdk/models/seller_protection_status.rb +14 -0
- data/lib/paypal_server_sdk/models/setup_fee_failure_action.rb +13 -0
- data/lib/paypal_server_sdk/models/shipment_carrier.rb +1428 -1
- data/lib/paypal_server_sdk/models/shipping_type.rb +15 -0
- data/lib/paypal_server_sdk/models/standard_entry_class_code.rb +15 -0
- data/lib/paypal_server_sdk/models/store_in_vault_instruction.rb +6 -0
- data/lib/paypal_server_sdk/models/stored_payment_source_payment_type.rb +14 -0
- data/lib/paypal_server_sdk/models/stored_payment_source_usage_type.rb +14 -0
- data/lib/paypal_server_sdk/models/subscription_plan_status.rb +14 -0
- data/lib/paypal_server_sdk/models/subscription_pricing_model.rb +13 -0
- data/lib/paypal_server_sdk/models/subscriptions_card_brand.rb +36 -0
- data/lib/paypal_server_sdk/models/tax_id_type.rb +13 -0
- data/lib/paypal_server_sdk/models/tenure_type.rb +13 -0
- data/lib/paypal_server_sdk/models/token_type.rb +6 -0
- data/lib/paypal_server_sdk/models/upc_type.rb +18 -0
- data/lib/paypal_server_sdk/models/usage_pattern.rb +23 -0
- data/lib/paypal_server_sdk/models/vault_card_verification_method.rb +13 -0
- data/lib/paypal_server_sdk/models/vault_instruction_action.rb +13 -0
- data/lib/paypal_server_sdk/models/vault_status.rb +14 -0
- data/lib/paypal_server_sdk/models/vault_token_request_type.rb +6 -0
- data/lib/paypal_server_sdk/models/vault_user_action.rb +13 -0
- data/lib/paypal_server_sdk/models/venmo_payment_token_customer_type.rb +13 -0
- data/lib/paypal_server_sdk/models/venmo_payment_token_usage_pattern.rb +17 -0
- data/lib/paypal_server_sdk/models/venmo_payment_token_usage_type.rb +13 -0
- data/lib/paypal_server_sdk/models/venmo_vault_response_status.rb +14 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_experience_context_shipping_preference.rb +14 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_experience_context_user_action.rb +13 -0
- metadata +3 -2
|
@@ -30,5 +30,18 @@ module PaypalServerSdk
|
|
|
30
30
|
|
|
31
31
|
true
|
|
32
32
|
end
|
|
33
|
+
|
|
34
|
+
def self.from_value(value, default_value = CONTINUE)
|
|
35
|
+
return default_value if value.nil?
|
|
36
|
+
|
|
37
|
+
str = value.to_s.strip
|
|
38
|
+
|
|
39
|
+
case str.downcase
|
|
40
|
+
when 'continue' then CONTINUE
|
|
41
|
+
when 'pay_now' then PAY_NOW
|
|
42
|
+
else
|
|
43
|
+
default_value
|
|
44
|
+
end
|
|
45
|
+
end
|
|
33
46
|
end
|
|
34
47
|
end
|
|
@@ -44,5 +44,22 @@ module PaypalServerSdk
|
|
|
44
44
|
|
|
45
45
|
true
|
|
46
46
|
end
|
|
47
|
+
|
|
48
|
+
def self.from_value(value, default_value = CREATED)
|
|
49
|
+
return default_value if value.nil?
|
|
50
|
+
|
|
51
|
+
str = value.to_s.strip
|
|
52
|
+
|
|
53
|
+
case str.downcase
|
|
54
|
+
when 'created' then CREATED
|
|
55
|
+
when 'saved' then SAVED
|
|
56
|
+
when 'approved' then APPROVED
|
|
57
|
+
when 'voided' then VOIDED
|
|
58
|
+
when 'completed' then COMPLETED
|
|
59
|
+
when 'payer_action_required' then PAYER_ACTION_REQUIRED
|
|
60
|
+
else
|
|
61
|
+
default_value
|
|
62
|
+
end
|
|
63
|
+
end
|
|
47
64
|
end
|
|
48
65
|
end
|
|
@@ -22,5 +22,18 @@ module PaypalServerSdk
|
|
|
22
22
|
|
|
23
23
|
true
|
|
24
24
|
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = CANCELLED)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'cancelled' then CANCELLED
|
|
33
|
+
when 'shipped' then SHIPPED
|
|
34
|
+
else
|
|
35
|
+
default_value
|
|
36
|
+
end
|
|
37
|
+
end
|
|
25
38
|
end
|
|
26
39
|
end
|
|
@@ -47,5 +47,20 @@ module PaypalServerSdk
|
|
|
47
47
|
|
|
48
48
|
true
|
|
49
49
|
end
|
|
50
|
+
|
|
51
|
+
def self.from_value(value, default_value = SCA_ALWAYS)
|
|
52
|
+
return default_value if value.nil?
|
|
53
|
+
|
|
54
|
+
str = value.to_s.strip
|
|
55
|
+
|
|
56
|
+
case str.downcase
|
|
57
|
+
when 'sca_always' then SCA_ALWAYS
|
|
58
|
+
when 'sca_when_required' then SCA_WHEN_REQUIRED
|
|
59
|
+
when 'enum_3d_secure' then ENUM_3D_SECURE
|
|
60
|
+
when 'avs_cvv' then AVS_CVV
|
|
61
|
+
else
|
|
62
|
+
default_value
|
|
63
|
+
end
|
|
64
|
+
end
|
|
50
65
|
end
|
|
51
66
|
end
|
|
@@ -22,5 +22,19 @@ module PaypalServerSdk
|
|
|
22
22
|
|
|
23
23
|
true
|
|
24
24
|
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = ANDROID)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'android' then ANDROID
|
|
33
|
+
when 'ios' then IOS
|
|
34
|
+
when 'other' then OTHER
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
25
39
|
end
|
|
26
40
|
end
|
|
@@ -38,5 +38,24 @@ module PaypalServerSdk
|
|
|
38
38
|
|
|
39
39
|
true
|
|
40
40
|
end
|
|
41
|
+
|
|
42
|
+
def self.from_value(value, default_value = SUCCESSFULAUTHENTICATION)
|
|
43
|
+
return default_value if value.nil?
|
|
44
|
+
|
|
45
|
+
str = value.to_s.strip
|
|
46
|
+
|
|
47
|
+
case str.downcase
|
|
48
|
+
when 'successfulauthentication' then SUCCESSFULAUTHENTICATION
|
|
49
|
+
when 'failedauthentication' then FAILEDAUTHENTICATION
|
|
50
|
+
when 'unabletocompleteauthentication' then UNABLETOCOMPLETEAUTHENTICATION
|
|
51
|
+
when 'successfulattemptstransaction' then SUCCESSFULATTEMPTSTRANSACTION
|
|
52
|
+
when 'challengerequired' then CHALLENGEREQUIRED
|
|
53
|
+
when 'authenticationrejected' then AUTHENTICATIONREJECTED
|
|
54
|
+
when 'decoupledauthentication' then DECOUPLEDAUTHENTICATION
|
|
55
|
+
when 'informationalonly' then INFORMATIONALONLY
|
|
56
|
+
else
|
|
57
|
+
default_value
|
|
58
|
+
end
|
|
59
|
+
end
|
|
41
60
|
end
|
|
42
61
|
end
|
|
@@ -68,5 +68,22 @@ module PaypalServerSdk
|
|
|
68
68
|
|
|
69
69
|
true
|
|
70
70
|
end
|
|
71
|
+
|
|
72
|
+
def self.from_value(value, default_value = ADD)
|
|
73
|
+
return default_value if value.nil?
|
|
74
|
+
|
|
75
|
+
str = value.to_s.strip
|
|
76
|
+
|
|
77
|
+
case str.downcase
|
|
78
|
+
when 'add' then ADD
|
|
79
|
+
when 'remove' then REMOVE
|
|
80
|
+
when 'replace' then REPLACE
|
|
81
|
+
when 'move' then MOVE
|
|
82
|
+
when 'copy' then COPY
|
|
83
|
+
when 'test' then TEST
|
|
84
|
+
else
|
|
85
|
+
default_value
|
|
86
|
+
end
|
|
87
|
+
end
|
|
71
88
|
end
|
|
72
89
|
end
|
|
@@ -21,5 +21,18 @@ module PaypalServerSdk
|
|
|
21
21
|
|
|
22
22
|
true
|
|
23
23
|
end
|
|
24
|
+
|
|
25
|
+
def self.from_value(value, default_value = UNRESTRICTED)
|
|
26
|
+
return default_value if value.nil?
|
|
27
|
+
|
|
28
|
+
str = value.to_s.strip
|
|
29
|
+
|
|
30
|
+
case str.downcase
|
|
31
|
+
when 'unrestricted' then UNRESTRICTED
|
|
32
|
+
when 'immediate_payment_required' then IMMEDIATE_PAYMENT_REQUIRED
|
|
33
|
+
else
|
|
34
|
+
default_value
|
|
35
|
+
end
|
|
36
|
+
end
|
|
24
37
|
end
|
|
25
38
|
end
|
|
@@ -71,5 +71,31 @@ module PaypalServerSdk
|
|
|
71
71
|
|
|
72
72
|
true
|
|
73
73
|
end
|
|
74
|
+
|
|
75
|
+
def self.from_value(value, default_value = PAYMENTADVICE_01)
|
|
76
|
+
return default_value if value.nil?
|
|
77
|
+
|
|
78
|
+
str = value.to_s.strip
|
|
79
|
+
|
|
80
|
+
case str.downcase
|
|
81
|
+
when 'paymentadvice_01' then PAYMENTADVICE_01
|
|
82
|
+
when 'paymentadvice_02' then PAYMENTADVICE_02
|
|
83
|
+
when 'paymentadvice_03' then PAYMENTADVICE_03
|
|
84
|
+
when 'paymentadvice_04' then PAYMENTADVICE_04
|
|
85
|
+
when 'paymentadvice_21' then PAYMENTADVICE_21
|
|
86
|
+
when 'paymentadvice_22' then PAYMENTADVICE_22
|
|
87
|
+
when 'paymentadvice_24' then PAYMENTADVICE_24
|
|
88
|
+
when 'paymentadvice_25' then PAYMENTADVICE_25
|
|
89
|
+
when 'paymentadvice_26' then PAYMENTADVICE_26
|
|
90
|
+
when 'paymentadvice_27' then PAYMENTADVICE_27
|
|
91
|
+
when 'paymentadvice_28' then PAYMENTADVICE_28
|
|
92
|
+
when 'paymentadvice_29' then PAYMENTADVICE_29
|
|
93
|
+
when 'paymentadvice_30' then PAYMENTADVICE_30
|
|
94
|
+
when 'paymentadvice_40' then PAYMENTADVICE_40
|
|
95
|
+
when 'paymentadvice_43' then PAYMENTADVICE_43
|
|
96
|
+
else
|
|
97
|
+
default_value
|
|
98
|
+
end
|
|
99
|
+
end
|
|
74
100
|
end
|
|
75
101
|
end
|
|
@@ -22,5 +22,18 @@ module PaypalServerSdk
|
|
|
22
22
|
|
|
23
23
|
true
|
|
24
24
|
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = CUSTOMER)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'customer' then CUSTOMER
|
|
33
|
+
when 'merchant' then MERCHANT
|
|
34
|
+
else
|
|
35
|
+
default_value
|
|
36
|
+
end
|
|
37
|
+
end
|
|
25
38
|
end
|
|
26
39
|
end
|
|
@@ -32,5 +32,21 @@ module PaypalServerSdk
|
|
|
32
32
|
|
|
33
33
|
true
|
|
34
34
|
end
|
|
35
|
+
|
|
36
|
+
def self.from_value(value, default_value = CREATED)
|
|
37
|
+
return default_value if value.nil?
|
|
38
|
+
|
|
39
|
+
str = value.to_s.strip
|
|
40
|
+
|
|
41
|
+
case str.downcase
|
|
42
|
+
when 'created' then CREATED
|
|
43
|
+
when 'payer_action_required' then PAYER_ACTION_REQUIRED
|
|
44
|
+
when 'approved' then APPROVED
|
|
45
|
+
when 'vaulted' then VAULTED
|
|
46
|
+
when 'tokenized' then TOKENIZED
|
|
47
|
+
else
|
|
48
|
+
default_value
|
|
49
|
+
end
|
|
50
|
+
end
|
|
35
51
|
end
|
|
36
52
|
end
|
|
@@ -37,5 +37,20 @@ module PaypalServerSdk
|
|
|
37
37
|
|
|
38
38
|
true
|
|
39
39
|
end
|
|
40
|
+
|
|
41
|
+
def self.from_value(value, default_value = LOGIN)
|
|
42
|
+
return default_value if value.nil?
|
|
43
|
+
|
|
44
|
+
str = value.to_s.strip
|
|
45
|
+
|
|
46
|
+
case str.downcase
|
|
47
|
+
when 'login' then LOGIN
|
|
48
|
+
when 'guest_checkout' then GUEST_CHECKOUT
|
|
49
|
+
when 'no_preference' then NO_PREFERENCE
|
|
50
|
+
when 'billing' then BILLING
|
|
51
|
+
else
|
|
52
|
+
default_value
|
|
53
|
+
end
|
|
54
|
+
end
|
|
40
55
|
end
|
|
41
56
|
end
|
|
@@ -25,5 +25,18 @@ module PaypalServerSdk
|
|
|
25
25
|
|
|
26
26
|
true
|
|
27
27
|
end
|
|
28
|
+
|
|
29
|
+
def self.from_value(value, default_value = CONTINUE)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
str = value.to_s.strip
|
|
33
|
+
|
|
34
|
+
case str.downcase
|
|
35
|
+
when 'continue' then CONTINUE
|
|
36
|
+
when 'pay_now' then PAY_NOW
|
|
37
|
+
else
|
|
38
|
+
default_value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
28
41
|
end
|
|
29
42
|
end
|
|
@@ -25,5 +25,18 @@ module PaypalServerSdk
|
|
|
25
25
|
|
|
26
26
|
true
|
|
27
27
|
end
|
|
28
|
+
|
|
29
|
+
def self.from_value(value, default_value = CONSUMER)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
str = value.to_s.strip
|
|
33
|
+
|
|
34
|
+
case str.downcase
|
|
35
|
+
when 'consumer' then CONSUMER
|
|
36
|
+
when 'business' then BUSINESS
|
|
37
|
+
else
|
|
38
|
+
default_value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
28
41
|
end
|
|
29
42
|
end
|
|
@@ -23,5 +23,18 @@ module PaypalServerSdk
|
|
|
23
23
|
|
|
24
24
|
true
|
|
25
25
|
end
|
|
26
|
+
|
|
27
|
+
def self.from_value(value, default_value = MERCHANT)
|
|
28
|
+
return default_value if value.nil?
|
|
29
|
+
|
|
30
|
+
str = value.to_s.strip
|
|
31
|
+
|
|
32
|
+
case str.downcase
|
|
33
|
+
when 'merchant' then MERCHANT
|
|
34
|
+
when 'platform' then PLATFORM
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
26
39
|
end
|
|
27
40
|
end
|
|
@@ -25,5 +25,20 @@ module PaypalServerSdk
|
|
|
25
25
|
|
|
26
26
|
true
|
|
27
27
|
end
|
|
28
|
+
|
|
29
|
+
def self.from_value(value, default_value = ODR)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
str = value.to_s.strip
|
|
33
|
+
|
|
34
|
+
case str.downcase
|
|
35
|
+
when 'odr' then ODR
|
|
36
|
+
when 'txn' then TXN
|
|
37
|
+
when 'sub' then SUB
|
|
38
|
+
when 'pap' then PAP
|
|
39
|
+
else
|
|
40
|
+
default_value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
28
43
|
end
|
|
29
44
|
end
|
|
@@ -24,5 +24,18 @@ module PaypalServerSdk
|
|
|
24
24
|
|
|
25
25
|
true
|
|
26
26
|
end
|
|
27
|
+
|
|
28
|
+
def self.from_value(value, default_value = VERIFIED)
|
|
29
|
+
return default_value if value.nil?
|
|
30
|
+
|
|
31
|
+
str = value.to_s.strip
|
|
32
|
+
|
|
33
|
+
case str.downcase
|
|
34
|
+
when 'verified' then VERIFIED
|
|
35
|
+
when 'unverified' then UNVERIFIED
|
|
36
|
+
else
|
|
37
|
+
default_value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
27
40
|
end
|
|
28
41
|
end
|
|
@@ -30,5 +30,19 @@ module PaypalServerSdk
|
|
|
30
30
|
|
|
31
31
|
true
|
|
32
32
|
end
|
|
33
|
+
|
|
34
|
+
def self.from_value(value, default_value = NO_CONTACT_INFO)
|
|
35
|
+
return default_value if value.nil?
|
|
36
|
+
|
|
37
|
+
str = value.to_s.strip
|
|
38
|
+
|
|
39
|
+
case str.downcase
|
|
40
|
+
when 'no_contact_info' then NO_CONTACT_INFO
|
|
41
|
+
when 'update_contact_info' then UPDATE_CONTACT_INFO
|
|
42
|
+
when 'retain_contact_info' then RETAIN_CONTACT_INFO
|
|
43
|
+
else
|
|
44
|
+
default_value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
33
47
|
end
|
|
34
48
|
end
|
|
@@ -27,5 +27,19 @@ module PaypalServerSdk
|
|
|
27
27
|
|
|
28
28
|
true
|
|
29
29
|
end
|
|
30
|
+
|
|
31
|
+
def self.from_value(value, default_value = GET_FROM_FILE)
|
|
32
|
+
return default_value if value.nil?
|
|
33
|
+
|
|
34
|
+
str = value.to_s.strip
|
|
35
|
+
|
|
36
|
+
case str.downcase
|
|
37
|
+
when 'get_from_file' then GET_FROM_FILE
|
|
38
|
+
when 'no_shipping' then NO_SHIPPING
|
|
39
|
+
when 'set_provided_address' then SET_PROVIDED_ADDRESS
|
|
40
|
+
else
|
|
41
|
+
default_value
|
|
42
|
+
end
|
|
43
|
+
end
|
|
30
44
|
end
|
|
31
45
|
end
|
|
@@ -27,5 +27,19 @@ module PaypalServerSdk
|
|
|
27
27
|
|
|
28
28
|
true
|
|
29
29
|
end
|
|
30
|
+
|
|
31
|
+
def self.from_value(value, default_value = VAULTED)
|
|
32
|
+
return default_value if value.nil?
|
|
33
|
+
|
|
34
|
+
str = value.to_s.strip
|
|
35
|
+
|
|
36
|
+
case str.downcase
|
|
37
|
+
when 'vaulted' then VAULTED
|
|
38
|
+
when 'created' then CREATED
|
|
39
|
+
when 'approved' then APPROVED
|
|
40
|
+
else
|
|
41
|
+
default_value
|
|
42
|
+
end
|
|
43
|
+
end
|
|
30
44
|
end
|
|
31
45
|
end
|
|
@@ -28,5 +28,21 @@ module PaypalServerSdk
|
|
|
28
28
|
|
|
29
29
|
true
|
|
30
30
|
end
|
|
31
|
+
|
|
32
|
+
def self.from_value(value, default_value = FAX)
|
|
33
|
+
return default_value if value.nil?
|
|
34
|
+
|
|
35
|
+
str = value.to_s.strip
|
|
36
|
+
|
|
37
|
+
case str.downcase
|
|
38
|
+
when 'fax' then FAX
|
|
39
|
+
when 'home' then HOME
|
|
40
|
+
when 'mobile' then MOBILE
|
|
41
|
+
when 'other' then OTHER
|
|
42
|
+
when 'pager' then PAGER
|
|
43
|
+
else
|
|
44
|
+
default_value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
31
47
|
end
|
|
32
48
|
end
|
|
@@ -24,5 +24,19 @@ module PaypalServerSdk
|
|
|
24
24
|
|
|
25
25
|
true
|
|
26
26
|
end
|
|
27
|
+
|
|
28
|
+
def self.from_value(value, default_value = CREATED)
|
|
29
|
+
return default_value if value.nil?
|
|
30
|
+
|
|
31
|
+
str = value.to_s.strip
|
|
32
|
+
|
|
33
|
+
case str.downcase
|
|
34
|
+
when 'created' then CREATED
|
|
35
|
+
when 'inactive' then INACTIVE
|
|
36
|
+
when 'active' then ACTIVE
|
|
37
|
+
else
|
|
38
|
+
default_value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
27
41
|
end
|
|
28
42
|
end
|
|
@@ -24,5 +24,19 @@ module PaypalServerSdk
|
|
|
24
24
|
|
|
25
25
|
true
|
|
26
26
|
end
|
|
27
|
+
|
|
28
|
+
def self.from_value(value, default_value = FIXED)
|
|
29
|
+
return default_value if value.nil?
|
|
30
|
+
|
|
31
|
+
str = value.to_s.strip
|
|
32
|
+
|
|
33
|
+
case str.downcase
|
|
34
|
+
when 'fixed' then FIXED
|
|
35
|
+
when 'variable' then VARIABLE
|
|
36
|
+
when 'auto_reload' then AUTO_RELOAD
|
|
37
|
+
else
|
|
38
|
+
default_value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
27
41
|
end
|
|
28
42
|
end
|
|
@@ -479,5 +479,170 @@ module PaypalServerSdk
|
|
|
479
479
|
|
|
480
480
|
true
|
|
481
481
|
end
|
|
482
|
+
|
|
483
|
+
def self.from_value(value, default_value = RESPONSE_0000)
|
|
484
|
+
return default_value if value.nil?
|
|
485
|
+
|
|
486
|
+
str = value.to_s.strip
|
|
487
|
+
|
|
488
|
+
case str.downcase
|
|
489
|
+
when 'response_0000' then RESPONSE_0000
|
|
490
|
+
when 'response_00n7' then RESPONSE_00N7
|
|
491
|
+
when 'response_0100' then RESPONSE_0100
|
|
492
|
+
when 'response_0390' then RESPONSE_0390
|
|
493
|
+
when 'response_0500' then RESPONSE_0500
|
|
494
|
+
when 'response_0580' then RESPONSE_0580
|
|
495
|
+
when 'response_0800' then RESPONSE_0800
|
|
496
|
+
when 'response_0880' then RESPONSE_0880
|
|
497
|
+
when 'response_0890' then RESPONSE_0890
|
|
498
|
+
when 'response_0960' then RESPONSE_0960
|
|
499
|
+
when 'response_0r00' then RESPONSE_0R00
|
|
500
|
+
when 'response_1000' then RESPONSE_1000
|
|
501
|
+
when 'response_10br' then RESPONSE_10BR
|
|
502
|
+
when 'response_1300' then RESPONSE_1300
|
|
503
|
+
when 'response_1310' then RESPONSE_1310
|
|
504
|
+
when 'response_1312' then RESPONSE_1312
|
|
505
|
+
when 'response_1317' then RESPONSE_1317
|
|
506
|
+
when 'response_1320' then RESPONSE_1320
|
|
507
|
+
when 'response_1330' then RESPONSE_1330
|
|
508
|
+
when 'response_1335' then RESPONSE_1335
|
|
509
|
+
when 'response_1340' then RESPONSE_1340
|
|
510
|
+
when 'response_1350' then RESPONSE_1350
|
|
511
|
+
when 'response_1352' then RESPONSE_1352
|
|
512
|
+
when 'response_1360' then RESPONSE_1360
|
|
513
|
+
when 'response_1370' then RESPONSE_1370
|
|
514
|
+
when 'response_1380' then RESPONSE_1380
|
|
515
|
+
when 'response_1382' then RESPONSE_1382
|
|
516
|
+
when 'response_1384' then RESPONSE_1384
|
|
517
|
+
when 'response_1390' then RESPONSE_1390
|
|
518
|
+
when 'response_1393' then RESPONSE_1393
|
|
519
|
+
when 'response_5100' then RESPONSE_5100
|
|
520
|
+
when 'response_5110' then RESPONSE_5110
|
|
521
|
+
when 'response_5120' then RESPONSE_5120
|
|
522
|
+
when 'response_5130' then RESPONSE_5130
|
|
523
|
+
when 'response_5135' then RESPONSE_5135
|
|
524
|
+
when 'response_5140' then RESPONSE_5140
|
|
525
|
+
when 'response_5150' then RESPONSE_5150
|
|
526
|
+
when 'response_5160' then RESPONSE_5160
|
|
527
|
+
when 'response_5170' then RESPONSE_5170
|
|
528
|
+
when 'response_5180' then RESPONSE_5180
|
|
529
|
+
when 'response_5190' then RESPONSE_5190
|
|
530
|
+
when 'response_5200' then RESPONSE_5200
|
|
531
|
+
when 'response_5210' then RESPONSE_5210
|
|
532
|
+
when 'response_5400' then RESPONSE_5400
|
|
533
|
+
when 'response_5500' then RESPONSE_5500
|
|
534
|
+
when 'response_5650' then RESPONSE_5650
|
|
535
|
+
when 'response_5700' then RESPONSE_5700
|
|
536
|
+
when 'response_5710' then RESPONSE_5710
|
|
537
|
+
when 'response_5800' then RESPONSE_5800
|
|
538
|
+
when 'response_5900' then RESPONSE_5900
|
|
539
|
+
when 'response_5910' then RESPONSE_5910
|
|
540
|
+
when 'response_5920' then RESPONSE_5920
|
|
541
|
+
when 'response_5930' then RESPONSE_5930
|
|
542
|
+
when 'response_5950' then RESPONSE_5950
|
|
543
|
+
when 'response_6300' then RESPONSE_6300
|
|
544
|
+
when 'response_7600' then RESPONSE_7600
|
|
545
|
+
when 'response_7700' then RESPONSE_7700
|
|
546
|
+
when 'response_7710' then RESPONSE_7710
|
|
547
|
+
when 'response_7800' then RESPONSE_7800
|
|
548
|
+
when 'response_7900' then RESPONSE_7900
|
|
549
|
+
when 'response_8000' then RESPONSE_8000
|
|
550
|
+
when 'response_8010' then RESPONSE_8010
|
|
551
|
+
when 'response_8020' then RESPONSE_8020
|
|
552
|
+
when 'response_8030' then RESPONSE_8030
|
|
553
|
+
when 'response_8100' then RESPONSE_8100
|
|
554
|
+
when 'response_8110' then RESPONSE_8110
|
|
555
|
+
when 'response_8220' then RESPONSE_8220
|
|
556
|
+
when 'response_9100' then RESPONSE_9100
|
|
557
|
+
when 'response_9500' then RESPONSE_9500
|
|
558
|
+
when 'response_9510' then RESPONSE_9510
|
|
559
|
+
when 'response_9520' then RESPONSE_9520
|
|
560
|
+
when 'response_9530' then RESPONSE_9530
|
|
561
|
+
when 'response_9540' then RESPONSE_9540
|
|
562
|
+
when 'response_9600' then RESPONSE_9600
|
|
563
|
+
when 'response_pcnr' then RESPONSE_PCNR
|
|
564
|
+
when 'response_pcvv' then RESPONSE_PCVV
|
|
565
|
+
when 'response_pp06' then RESPONSE_PP06
|
|
566
|
+
when 'response_pprn' then RESPONSE_PPRN
|
|
567
|
+
when 'response_ppad' then RESPONSE_PPAD
|
|
568
|
+
when 'response_ppab' then RESPONSE_PPAB
|
|
569
|
+
when 'response_ppae' then RESPONSE_PPAE
|
|
570
|
+
when 'response_ppag' then RESPONSE_PPAG
|
|
571
|
+
when 'response_ppai' then RESPONSE_PPAI
|
|
572
|
+
when 'response_ppar' then RESPONSE_PPAR
|
|
573
|
+
when 'response_ppau' then RESPONSE_PPAU
|
|
574
|
+
when 'response_ppav' then RESPONSE_PPAV
|
|
575
|
+
when 'response_ppax' then RESPONSE_PPAX
|
|
576
|
+
when 'response_ppbg' then RESPONSE_PPBG
|
|
577
|
+
when 'response_ppc2' then RESPONSE_PPC2
|
|
578
|
+
when 'response_ppce' then RESPONSE_PPCE
|
|
579
|
+
when 'response_ppco' then RESPONSE_PPCO
|
|
580
|
+
when 'response_ppcr' then RESPONSE_PPCR
|
|
581
|
+
when 'response_ppct' then RESPONSE_PPCT
|
|
582
|
+
when 'response_ppcu' then RESPONSE_PPCU
|
|
583
|
+
when 'response_ppd3' then RESPONSE_PPD3
|
|
584
|
+
when 'response_ppdc' then RESPONSE_PPDC
|
|
585
|
+
when 'response_ppdi' then RESPONSE_PPDI
|
|
586
|
+
when 'response_ppdv' then RESPONSE_PPDV
|
|
587
|
+
when 'response_ppdt' then RESPONSE_PPDT
|
|
588
|
+
when 'response_ppef' then RESPONSE_PPEF
|
|
589
|
+
when 'response_ppel' then RESPONSE_PPEL
|
|
590
|
+
when 'response_pper' then RESPONSE_PPER
|
|
591
|
+
when 'response_ppex' then RESPONSE_PPEX
|
|
592
|
+
when 'response_ppfe' then RESPONSE_PPFE
|
|
593
|
+
when 'response_ppfi' then RESPONSE_PPFI
|
|
594
|
+
when 'response_ppfr' then RESPONSE_PPFR
|
|
595
|
+
when 'response_ppfv' then RESPONSE_PPFV
|
|
596
|
+
when 'response_ppgr' then RESPONSE_PPGR
|
|
597
|
+
when 'response_pph1' then RESPONSE_PPH1
|
|
598
|
+
when 'response_ppif' then RESPONSE_PPIF
|
|
599
|
+
when 'response_ppii' then RESPONSE_PPII
|
|
600
|
+
when 'response_ppim' then RESPONSE_PPIM
|
|
601
|
+
when 'response_ppit' then RESPONSE_PPIT
|
|
602
|
+
when 'response_pplr' then RESPONSE_PPLR
|
|
603
|
+
when 'response_ppls' then RESPONSE_PPLS
|
|
604
|
+
when 'response_ppmb' then RESPONSE_PPMB
|
|
605
|
+
when 'response_ppmc' then RESPONSE_PPMC
|
|
606
|
+
when 'response_ppmd' then RESPONSE_PPMD
|
|
607
|
+
when 'response_ppnc' then RESPONSE_PPNC
|
|
608
|
+
when 'response_ppnl' then RESPONSE_PPNL
|
|
609
|
+
when 'response_ppnm' then RESPONSE_PPNM
|
|
610
|
+
when 'response_ppnt' then RESPONSE_PPNT
|
|
611
|
+
when 'response_ppph' then RESPONSE_PPPH
|
|
612
|
+
when 'response_pppi' then RESPONSE_PPPI
|
|
613
|
+
when 'response_pppm' then RESPONSE_PPPM
|
|
614
|
+
when 'response_ppqc' then RESPONSE_PPQC
|
|
615
|
+
when 'response_ppre' then RESPONSE_PPRE
|
|
616
|
+
when 'response_pprf' then RESPONSE_PPRF
|
|
617
|
+
when 'response_pprr' then RESPONSE_PPRR
|
|
618
|
+
when 'response_pps0' then RESPONSE_PPS0
|
|
619
|
+
when 'response_pps1' then RESPONSE_PPS1
|
|
620
|
+
when 'response_pps2' then RESPONSE_PPS2
|
|
621
|
+
when 'response_pps3' then RESPONSE_PPS3
|
|
622
|
+
when 'response_pps4' then RESPONSE_PPS4
|
|
623
|
+
when 'response_pps5' then RESPONSE_PPS5
|
|
624
|
+
when 'response_pps6' then RESPONSE_PPS6
|
|
625
|
+
when 'response_ppsc' then RESPONSE_PPSC
|
|
626
|
+
when 'response_ppsd' then RESPONSE_PPSD
|
|
627
|
+
when 'response_ppse' then RESPONSE_PPSE
|
|
628
|
+
when 'response_ppte' then RESPONSE_PPTE
|
|
629
|
+
when 'response_pptf' then RESPONSE_PPTF
|
|
630
|
+
when 'response_ppti' then RESPONSE_PPTI
|
|
631
|
+
when 'response_pptr' then RESPONSE_PPTR
|
|
632
|
+
when 'response_pptt' then RESPONSE_PPTT
|
|
633
|
+
when 'response_pptv' then RESPONSE_PPTV
|
|
634
|
+
when 'response_ppua' then RESPONSE_PPUA
|
|
635
|
+
when 'response_ppuc' then RESPONSE_PPUC
|
|
636
|
+
when 'response_ppue' then RESPONSE_PPUE
|
|
637
|
+
when 'response_ppui' then RESPONSE_PPUI
|
|
638
|
+
when 'response_ppup' then RESPONSE_PPUP
|
|
639
|
+
when 'response_ppur' then RESPONSE_PPUR
|
|
640
|
+
when 'response_ppvc' then RESPONSE_PPVC
|
|
641
|
+
when 'response_ppve' then RESPONSE_PPVE
|
|
642
|
+
when 'response_ppvt' then RESPONSE_PPVT
|
|
643
|
+
else
|
|
644
|
+
default_value
|
|
645
|
+
end
|
|
646
|
+
end
|
|
482
647
|
end
|
|
483
648
|
end
|