Class: PaypalServerSdk::ApplePayPaymentData

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/paypal_server_sdk/models/apple_pay_payment_data.rb

Overview

Information about the decrypted apple pay payment data for the token like cryptogram, eci indicator.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(cryptogram: SKIP, eci_indicator: SKIP, emv_data: SKIP, pin: SKIP) ⇒ ApplePayPaymentData

Returns a new instance of ApplePayPaymentData.



58
59
60
61
62
63
64
# File 'lib/paypal_server_sdk/models/apple_pay_payment_data.rb', line 58

def initialize(cryptogram: SKIP, eci_indicator: SKIP, emv_data: SKIP,
               pin: SKIP)
  @cryptogram = cryptogram unless cryptogram == SKIP
  @eci_indicator = eci_indicator unless eci_indicator == SKIP
  @emv_data = emv_data unless emv_data == SKIP
  @pin = pin unless pin == SKIP
end

Instance Attribute Details

#cryptogramString

Online payment cryptogram, as defined by 3D Secure. The pattern is defined by an external party and supports Unicode.

Returns:

  • (String)


16
17
18
# File 'lib/paypal_server_sdk/models/apple_pay_payment_data.rb', line 16

def cryptogram
  @cryptogram
end

#eci_indicatorString

ECI indicator, as defined by 3- Secure. The pattern is defined by an external party and supports Unicode.

Returns:

  • (String)


21
22
23
# File 'lib/paypal_server_sdk/models/apple_pay_payment_data.rb', line 21

def eci_indicator
  @eci_indicator
end

#emv_dataString

Encoded Apple Pay EMV Payment Structure used for payments in China. The pattern is defined by an external party and supports Unicode.

Returns:

  • (String)


26
27
28
# File 'lib/paypal_server_sdk/models/apple_pay_payment_data.rb', line 26

def emv_data
  @emv_data
end

#pinString

Bank Key encrypted Apple Pay PIN. The pattern is defined by an external party and supports Unicode.

Returns:

  • (String)


31
32
33
# File 'lib/paypal_server_sdk/models/apple_pay_payment_data.rb', line 31

def pin
  @pin
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/paypal_server_sdk/models/apple_pay_payment_data.rb', line 67

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  cryptogram = hash.key?('cryptogram') ? hash['cryptogram'] : SKIP
  eci_indicator = hash.key?('eci_indicator') ? hash['eci_indicator'] : SKIP
  emv_data = hash.key?('emv_data') ? hash['emv_data'] : SKIP
  pin = hash.key?('pin') ? hash['pin'] : SKIP

  # Create object from extracted values.
  ApplePayPaymentData.new(cryptogram: cryptogram,
                          eci_indicator: eci_indicator,
                          emv_data: emv_data,
                          pin: pin)
end

.namesObject

A mapping from model property names to API property names.



34
35
36
37
38
39
40
41
# File 'lib/paypal_server_sdk/models/apple_pay_payment_data.rb', line 34

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['cryptogram'] = 'cryptogram'
  @_hash['eci_indicator'] = 'eci_indicator'
  @_hash['emv_data'] = 'emv_data'
  @_hash['pin'] = 'pin'
  @_hash
end

.nullablesObject

An array for nullable fields



54
55
56
# File 'lib/paypal_server_sdk/models/apple_pay_payment_data.rb', line 54

def self.nullables
  []
end

.optionalsObject

An array for optional fields



44
45
46
47
48
49
50
51
# File 'lib/paypal_server_sdk/models/apple_pay_payment_data.rb', line 44

def self.optionals
  %w[
    cryptogram
    eci_indicator
    emv_data
    pin
  ]
end