pcp-server-ruby-sdk 1.1.0 → 1.3.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.
@@ -5,7 +5,10 @@ module PCPServerSDK
5
5
  module Models
6
6
  # Object containing data related to recurring.
7
7
  class CardRecurrenceDetails
8
- # * first = This transaction is the first of a series of recurring transactions * recurring = This transaction is a subsequent transaction in a series of recurring transactions Note: For any first of a recurring the system will automatically create a token as you will need to use a token for any subsequent recurring transactions. In case a token already exists this is indicated in the response with a value of False for the isNewToken property in the response.
8
+ # Indicates whether this transaction is the first or a subsequent transaction in a series of recurring transactions.
9
+ # Note: For any first of a recurring the system will automatically create a token as you will need to use a token for any subsequent recurring transactions.
10
+ # In case a token already exists this is indicated in the response with a value of False for the isNewToken property in the response.
11
+ # @return [RecurringPaymentSequenceIndicator]
9
12
  attr_accessor :recurring_payment_sequence_indicator
10
13
 
11
14
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -23,7 +26,7 @@ module PCPServerSDK
23
26
  # Attribute type mapping.
24
27
  def self.openapi_types
25
28
  {
26
- :'recurring_payment_sequence_indicator' => :'String'
29
+ :'recurring_payment_sequence_indicator' => :'RecurringPaymentSequenceIndicator'
27
30
  }
28
31
  end
29
32
 
@@ -17,7 +17,12 @@ module PCPServerSDK
17
17
  # Fiscal registration number of the customer or the tax registration number of the company for a business customer. Please find below specifics per country: * Brazil - Consumer (CPF) with a length of 11 digits * Brazil - Company (CNPJ) with a length of 14 digits * Denmark - Consumer (CPR-nummer or personnummer) with a length of 10 digits * Finland - Consumer (Finnish: henkilötunnus (abbreviated as HETU), Swedish: personbeteckning) with a length of 11 characters * Norway - Consumer (fødselsnummer) with a length of 11 digits * Sweden - Consumer (personnummer) with a length of 10 or 12 digits
18
18
  attr_accessor :fiscal_number
19
19
 
20
- # Business relation to the customer. Possible values: * B2C - Indicates business to consumer * B2B - Indicates business to business Mandatory for the the following payment methods: * 3390 - PAYONE Secured Invoice * 3391 - PAYONE Secured Installment * 3392 - PAYONE Secured Direct Debit
20
+ # Business relation to the customer.
21
+ # Mandatory for the following payment methods:
22
+ # * 3390 - PAYONE Secured Invoice
23
+ # * 3391 - PAYONE Secured Installment
24
+ # * 3392 - PAYONE Secured Direct Debit
25
+ # @return [BusinessRelation]
21
26
  attr_accessor :business_relation
22
27
 
23
28
  # The locale that the customer should be addressed in (for 3rd parties). Note: Only the language code is supported.
@@ -25,6 +30,9 @@ module PCPServerSDK
25
30
 
26
31
  attr_accessor :personal_information
27
32
 
33
+ # Object containing data related to the account the customer has with you.
34
+ attr_accessor :account
35
+
28
36
  # Attribute mapping from ruby-style variable name to JSON key.
29
37
  def self.attribute_map
30
38
  {
@@ -35,7 +43,8 @@ module PCPServerSDK
35
43
  :'fiscal_number' => :'fiscalNumber',
36
44
  :'business_relation' => :'businessRelation',
37
45
  :'locale' => :'locale',
38
- :'personal_information' => :'personalInformation'
46
+ :'personal_information' => :'personalInformation',
47
+ :'account' => :'account'
39
48
  }
40
49
  end
41
50
 
@@ -52,9 +61,10 @@ module PCPServerSDK
52
61
  :'billing_address' => :'Address',
53
62
  :'contact_details' => :'ContactDetails',
54
63
  :'fiscal_number' => :'String',
55
- :'business_relation' => :'String',
64
+ :'business_relation' => :'BusinessRelation',
56
65
  :'locale' => :'String',
57
- :'personal_information' => :'PersonalInformation'
66
+ :'personal_information' => :'PersonalInformation',
67
+ :'account' => :'CustomerAccount'
58
68
  }
59
69
  end
60
70
 
@@ -110,6 +120,10 @@ module PCPServerSDK
110
120
  if attributes.key?(:'personal_information')
111
121
  self.personal_information = attributes[:'personal_information']
112
122
  end
123
+
124
+ if attributes.key?(:'account')
125
+ self.account = attributes[:'account']
126
+ end
113
127
  end
114
128
 
115
129
  # Checks equality by comparing each attribute.
@@ -124,7 +138,8 @@ module PCPServerSDK
124
138
  fiscal_number == o.fiscal_number &&
125
139
  business_relation == o.business_relation &&
126
140
  locale == o.locale &&
127
- personal_information == o.personal_information
141
+ personal_information == o.personal_information &&
142
+ account == o.account
128
143
  end
129
144
 
130
145
  # @see the `==` method
@@ -136,7 +151,7 @@ module PCPServerSDK
136
151
  # Calculates hash code according to all attributes.
137
152
  # @return [Integer] Hash code
138
153
  def hash
139
- [company_information, merchant_customer_id, billing_address, contact_details, fiscal_number, business_relation, locale, personal_information].hash
154
+ [company_information, merchant_customer_id, billing_address, contact_details, fiscal_number, business_relation, locale, personal_information, account].hash
140
155
  end
141
156
 
142
157
  # Builds the object from hash
@@ -0,0 +1,51 @@
1
+ require 'date'
2
+ require 'time'
3
+
4
+ module PCPServerSDK
5
+ module Models
6
+ # Object containing data related to the account the customer has with you.
7
+ class CustomerAccount
8
+ # Creation date and time of the customer account in ISO 8601 format (UTC).
9
+ attr_accessor :create_date
10
+
11
+ # Attribute mapping from ruby-style variable name to JSON key.
12
+ def self.attribute_map
13
+ {
14
+ :'create_date' => :'createDate'
15
+ }
16
+ end
17
+
18
+ # Returns all the JSON keys this model knows about
19
+ def self.acceptable_attributes
20
+ attribute_map.values
21
+ end
22
+
23
+ # Attribute type mapping.
24
+ def self.openapi_types
25
+ {
26
+ :'create_date' => :'Time'
27
+ }
28
+ end
29
+
30
+ # Initializes the object
31
+ # @param [Hash] attributes Model attributes in the form of hash
32
+ def initialize(attributes = {})
33
+ if (!attributes.is_a?(Hash))
34
+ fail ArgumentError, "The input argument (attributes) must be a hash in `CustomerAccount` initialize method"
35
+ end
36
+
37
+ # check to see if the attribute exists and convert string to symbol for hash key
38
+ attributes = attributes.each_with_object({}) { |(k, v), h|
39
+ if (!self.class.attribute_map.key?(k.to_sym))
40
+ fail ArgumentError, "`#{k}` is not a valid attribute in `CustomerAccount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
41
+ end
42
+ h[k.to_sym] = v
43
+ }
44
+
45
+ if attributes.key?(:'create_date')
46
+ self.create_date = attributes[:'create_date']
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -6,7 +6,8 @@ require 'time'
6
6
  module PCPServerSDK
7
7
  module Models
8
8
  class MerchantAction
9
- # Action merchants needs to take in the online payment process. Possible values are: * REDIRECT - The customer needs to be redirected using the details found in redirectData * SHOW_FORM - The customer needs to be shown a form with the fields found in formFields. You can submit the data entered by the user in a Complete payment request. * SHOW_INSTRUCTIONS - The customer needs to be shown payment instruction using the details found in showData. Alternatively the instructions can be rendered by us using the instructionsRenderingData * SHOW_TRANSACTION_RESULTS - The customer needs to be shown the transaction results using the details found in showData. Alternatively the instructions can be rendered by us using the instructionsRenderingData * MOBILE_THREEDS_CHALLENGE - The customer needs to complete a challenge as part of the 3D Secure authentication inside your mobile app. The details contained in mobileThreeDSecureChallengeParameters need to be provided to the EMVco certified Mobile SDK as a challengeParameters object. * CALL_THIRD_PARTY - The merchant needs to call a third party using the data found in thirdPartyData
9
+ # Action merchants needs to take in the online payment process.
10
+ # @return [ActionType]
10
11
  attr_accessor :action_type
11
12
 
12
13
  attr_accessor :redirect_data
@@ -27,7 +28,7 @@ module PCPServerSDK
27
28
  # Attribute type mapping.
28
29
  def self.openapi_types
29
30
  {
30
- :'action_type' => :'String',
31
+ :'action_type' => :'ActionType',
31
32
  :'redirect_data' => :'RedirectData'
32
33
  }
33
34
  end
@@ -19,7 +19,7 @@ module PCPServerSDK
19
19
  # Tax on the line item, with the last two digits implied as decimal places
20
20
  attr_accessor :tax_amount
21
21
 
22
- # If this is set to true, `tax_amount` will be interpreted as the tax amount per unit as opposed to the tax amount per line item.
22
+ # This field indicates if the `taxAmount` is to be interpreted as the tax amount per unit rather than for the entire line item. This field is included in the response only when `taxAmount` is set; otherwise, it will return as `null`.
23
23
  attr_accessor :tax_amount_per_unit
24
24
 
25
25
  # URL of the product in shop. Used for PAYONE Buy Now, Pay Later (BNPL).
@@ -0,0 +1,30 @@
1
+ require 'date'
2
+ require 'time'
3
+
4
+ module PCPServerSDK
5
+ module Models
6
+ class RecurringPaymentSequenceIndicator
7
+ FIRST = "first".freeze # This transaction is the first of a series of recurring transactions
8
+ RECURRING = "recurring".freeze # This transaction is a subsequent transaction in a series of recurring transactions
9
+
10
+ def self.all_vars
11
+ @all_vars ||= [FIRST, RECURRING].freeze
12
+ end
13
+
14
+ # Builds the enum from string
15
+ # @param [String] The enum value in the form of the string
16
+ # @return [String] The enum value
17
+ def self.build_from_hash(value)
18
+ new.build_from_hash(value)
19
+ end
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def build_from_hash(value)
25
+ return value if RecurringPaymentSequenceIndicator.all_vars.include?(value)
26
+ raise "Invalid ENUM value #{value} for class #RecurringPaymentSequenceIndicator"
27
+ end
28
+ end
29
+ end
30
+ end
@@ -9,10 +9,14 @@ module PCPServerSDK
9
9
  # Indicates whether to use PayPal Express Checkout Shortcut. * true = When shortcut is enabled, the consumer can select a shipping address during PayPal checkout. * false = When shortcut is disabled, the consumer cannot change the shipping address. Default value is false. Please note that this field is ignored when order.additionalInput.typeInformation.purchaseType is set to \"digital\"
10
10
  attr_accessor :address_selection_at_pay_pal
11
11
 
12
+ # A unique ID determined by the merchant, to link a Paypal transaction to a FraudNet PayPal risk session. Only applicable to customer-initiated transactions, when the FraudNet SDK is used, and to be passed in the API request the same tracking ID value (FraudNet Session Identifier).
13
+ attr_accessor :fraud_net_id
14
+
12
15
  # Attribute mapping from ruby-style variable name to JSON key.
13
16
  def self.attribute_map
14
17
  {
15
- :'address_selection_at_pay_pal' => :'addressSelectionAtPayPal'
18
+ :'address_selection_at_pay_pal' => :'addressSelectionAtPayPal',
19
+ :'fraud_net_id' => :'fraudNetId'
16
20
  }
17
21
  end
18
22
 
@@ -24,7 +28,8 @@ module PCPServerSDK
24
28
  # Attribute type mapping.
25
29
  def self.openapi_types
26
30
  {
27
- :'address_selection_at_pay_pal' => :'Boolean'
31
+ :'address_selection_at_pay_pal' => :'Boolean',
32
+ :'fraud_net_id' => :'String'
28
33
  }
29
34
  end
30
35
 
@@ -52,6 +57,10 @@ module PCPServerSDK
52
57
  if attributes.key?(:'address_selection_at_pay_pal')
53
58
  self.address_selection_at_pay_pal = attributes[:'address_selection_at_pay_pal']
54
59
  end
60
+
61
+ if attributes.key?(:'fraud_net_id')
62
+ self.fraud_net_id = attributes[:'fraud_net_id']
63
+ end
55
64
  end
56
65
 
57
66
  # Checks equality by comparing each attribute.
@@ -59,7 +68,8 @@ module PCPServerSDK
59
68
  def ==(o)
60
69
  return true if self.equal?(o)
61
70
  self.class == o.class &&
62
- address_selection_at_pay_pal == o.address_selection_at_pay_pal
71
+ address_selection_at_pay_pal == o.address_selection_at_pay_pal &&
72
+ fraud_net_id == o.fraud_net_id
63
73
  end
64
74
 
65
75
  # @see the `==` method
@@ -71,7 +81,7 @@ module PCPServerSDK
71
81
  # Calculates hash code according to all attributes.
72
82
  # @return [Integer] Hash code
73
83
  def hash
74
- [address_selection_at_pay_pal].hash
84
+ [address_selection_at_pay_pal, fraud_net_id].hash
75
85
  end
76
86
 
77
87
  # Builds the object from hash
@@ -1,4 +1,4 @@
1
1
 
2
2
  module PCPServerSDK
3
- VERSION = '1.1.0'
3
+ VERSION = '1.3.0'
4
4
  end
@@ -1,5 +1,6 @@
1
1
  # Api
2
2
  require_relative 'PCP-server-Ruby-SDK/endpoints/base_api_client'
3
+ require_relative 'PCP-server-Ruby-SDK/endpoints/authentication_api_client'
3
4
  require_relative 'PCP-server-Ruby-SDK/endpoints/checkout_api_client'
4
5
  require_relative 'PCP-server-Ruby-SDK/endpoints/commerce_case_api_client'
5
6
  require_relative 'PCP-server-Ruby-SDK/endpoints/order_management_checkout_actions_api_client'
@@ -20,6 +21,7 @@ require_relative 'PCP-server-Ruby-SDK/models/api_error'
20
21
  require_relative 'PCP-server-Ruby-SDK/models/apple_payment_data_token_header_information'
21
22
  require_relative 'PCP-server-Ruby-SDK/models/apple_payment_data_token_information'
22
23
  require_relative 'PCP-server-Ruby-SDK/models/apple_payment_token_version'
24
+ require_relative 'PCP-server-Ruby-SDK/models/authentication_token'
23
25
  require_relative 'PCP-server-Ruby-SDK/models/authorization_mode'
24
26
  require_relative 'PCP-server-Ruby-SDK/models/bank_account_information'
25
27
  require_relative 'PCP-server-Ruby-SDK/models/bank_payout_method_specific_input'