|
3 | 3 | module Lithic |
4 | 4 | module Models |
5 | 5 | # @see Lithic::Resources::Cards#web_provision |
6 | | - class CardWebProvisionResponse < Lithic::Internal::Type::BaseModel |
7 | | - # @!attribute jws |
8 | | - # JWS object required for handoff to Apple's script. |
9 | | - # |
10 | | - # @return [Lithic::Models::CardWebProvisionResponse::Jws, nil] |
11 | | - optional :jws, -> { Lithic::Models::CardWebProvisionResponse::Jws } |
12 | | - |
13 | | - # @!attribute state |
14 | | - # A unique identifier for the JWS object. |
15 | | - # |
16 | | - # @return [String, nil] |
17 | | - optional :state, String |
18 | | - |
19 | | - # @!method initialize(jws: nil, state: nil) |
20 | | - # @param jws [Lithic::Models::CardWebProvisionResponse::Jws] JWS object required for handoff to Apple's script. |
21 | | - # |
22 | | - # @param state [String] A unique identifier for the JWS object. |
23 | | - |
24 | | - # @see Lithic::Models::CardWebProvisionResponse#jws |
25 | | - class Jws < Lithic::Internal::Type::BaseModel |
26 | | - # @!attribute header |
27 | | - # JWS unprotected headers containing header parameters that aren't |
28 | | - # integrity-protected by the JWS signature. |
29 | | - # |
30 | | - # @return [Lithic::Models::CardWebProvisionResponse::Jws::Header, nil] |
31 | | - optional :header, -> { Lithic::Models::CardWebProvisionResponse::Jws::Header } |
| 6 | + module CardWebProvisionResponse |
| 7 | + extend Lithic::Internal::Type::Union |
32 | 8 |
|
33 | | - # @!attribute payload |
34 | | - # Base64url encoded JSON object containing the provisioning payload. |
35 | | - # |
36 | | - # @return [String, nil] |
37 | | - optional :payload, String |
| 9 | + variant -> { Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse } |
38 | 10 |
|
39 | | - # @!attribute protected |
40 | | - # Base64url encoded JWS protected headers containing the header parameters that |
41 | | - # are integrity-protected by the JWS signature. |
| 11 | + variant -> { Lithic::Models::CardWebProvisionResponse::GoogleWebPushProvisioningResponse } |
| 12 | + |
| 13 | + class AppleWebPushProvisioningResponse < Lithic::Internal::Type::BaseModel |
| 14 | + # @!attribute jws |
| 15 | + # JWS object required for handoff to Apple's script. |
42 | 16 | # |
43 | | - # @return [String, nil] |
44 | | - optional :protected, String |
| 17 | + # @return [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws, nil] |
| 18 | + optional :jws, -> { Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws } |
45 | 19 |
|
46 | | - # @!attribute signature |
47 | | - # Base64url encoded signature of the JWS object. |
| 20 | + # @!attribute state |
| 21 | + # A unique identifier for the JWS object. |
48 | 22 | # |
49 | 23 | # @return [String, nil] |
50 | | - optional :signature, String |
| 24 | + optional :state, String |
51 | 25 |
|
52 | | - # @!method initialize(header: nil, payload: nil, protected: nil, signature: nil) |
53 | | - # Some parameter documentations has been truncated, see |
54 | | - # {Lithic::Models::CardWebProvisionResponse::Jws} for more details. |
55 | | - # |
56 | | - # JWS object required for handoff to Apple's script. |
57 | | - # |
58 | | - # @param header [Lithic::Models::CardWebProvisionResponse::Jws::Header] JWS unprotected headers containing header parameters that aren't integrity-prote |
59 | | - # |
60 | | - # @param payload [String] Base64url encoded JSON object containing the provisioning payload. |
| 26 | + # @!method initialize(jws: nil, state: nil) |
| 27 | + # @param jws [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws] JWS object required for handoff to Apple's script. |
61 | 28 | # |
62 | | - # @param protected [String] Base64url encoded JWS protected headers containing the header parameters that ar |
63 | | - # |
64 | | - # @param signature [String] Base64url encoded signature of the JWS object. |
| 29 | + # @param state [String] A unique identifier for the JWS object. |
| 30 | + |
| 31 | + # @see Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse#jws |
| 32 | + class Jws < Lithic::Internal::Type::BaseModel |
| 33 | + # @!attribute header |
| 34 | + # JWS unprotected headers containing header parameters that aren't |
| 35 | + # integrity-protected by the JWS signature. |
| 36 | + # |
| 37 | + # @return [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws::Header, nil] |
| 38 | + optional :header, |
| 39 | + -> { Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws::Header } |
65 | 40 |
|
66 | | - # @see Lithic::Models::CardWebProvisionResponse::Jws#header |
67 | | - class Header < Lithic::Internal::Type::BaseModel |
68 | | - # @!attribute kid |
69 | | - # The ID for the JWS Public Key of the key pair used to generate the signature. |
| 41 | + # @!attribute payload |
| 42 | + # Base64url encoded JSON object containing the provisioning payload. |
70 | 43 | # |
71 | 44 | # @return [String, nil] |
72 | | - optional :kid, String |
| 45 | + optional :payload, String |
73 | 46 |
|
74 | | - # @!method initialize(kid: nil) |
75 | | - # JWS unprotected headers containing header parameters that aren't |
76 | | - # integrity-protected by the JWS signature. |
| 47 | + # @!attribute protected |
| 48 | + # Base64url encoded JWS protected headers containing the header parameters that |
| 49 | + # are integrity-protected by the JWS signature. |
| 50 | + # |
| 51 | + # @return [String, nil] |
| 52 | + optional :protected, String |
| 53 | + |
| 54 | + # @!attribute signature |
| 55 | + # Base64url encoded signature of the JWS object. |
77 | 56 | # |
78 | | - # @param kid [String] The ID for the JWS Public Key of the key pair used to generate the signature. |
| 57 | + # @return [String, nil] |
| 58 | + optional :signature, String |
| 59 | + |
| 60 | + # @!method initialize(header: nil, payload: nil, protected: nil, signature: nil) |
| 61 | + # Some parameter documentations has been truncated, see |
| 62 | + # {Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws} |
| 63 | + # for more details. |
| 64 | + # |
| 65 | + # JWS object required for handoff to Apple's script. |
| 66 | + # |
| 67 | + # @param header [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws::Header] JWS unprotected headers containing header parameters that aren't integrity-prote |
| 68 | + # |
| 69 | + # @param payload [String] Base64url encoded JSON object containing the provisioning payload. |
| 70 | + # |
| 71 | + # @param protected [String] Base64url encoded JWS protected headers containing the header parameters that ar |
| 72 | + # |
| 73 | + # @param signature [String] Base64url encoded signature of the JWS object. |
| 74 | + |
| 75 | + # @see Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws#header |
| 76 | + class Header < Lithic::Internal::Type::BaseModel |
| 77 | + # @!attribute kid |
| 78 | + # The ID for the JWS Public Key of the key pair used to generate the signature. |
| 79 | + # |
| 80 | + # @return [String, nil] |
| 81 | + optional :kid, String |
| 82 | + |
| 83 | + # @!method initialize(kid: nil) |
| 84 | + # JWS unprotected headers containing header parameters that aren't |
| 85 | + # integrity-protected by the JWS signature. |
| 86 | + # |
| 87 | + # @param kid [String] The ID for the JWS Public Key of the key pair used to generate the signature. |
| 88 | + end |
79 | 89 | end |
80 | 90 | end |
| 91 | + |
| 92 | + class GoogleWebPushProvisioningResponse < Lithic::Internal::Type::BaseModel |
| 93 | + # @!attribute google_opc |
| 94 | + # A base64 encoded and encrypted payload representing card data for the Google Pay |
| 95 | + # UWPP FPAN flow. |
| 96 | + # |
| 97 | + # @return [String, nil] |
| 98 | + optional :google_opc, String |
| 99 | + |
| 100 | + # @!attribute tsp_opc |
| 101 | + # A base64 encoded and encrypted payload representing card data for the Google Pay |
| 102 | + # UWPP tokenization flow. |
| 103 | + # |
| 104 | + # @return [String, nil] |
| 105 | + optional :tsp_opc, String |
| 106 | + |
| 107 | + # @!method initialize(google_opc: nil, tsp_opc: nil) |
| 108 | + # Some parameter documentations has been truncated, see |
| 109 | + # {Lithic::Models::CardWebProvisionResponse::GoogleWebPushProvisioningResponse} |
| 110 | + # for more details. |
| 111 | + # |
| 112 | + # @param google_opc [String] A base64 encoded and encrypted payload representing card data for the Google Pay |
| 113 | + # |
| 114 | + # @param tsp_opc [String] A base64 encoded and encrypted payload representing card data for the Google Pay |
| 115 | + end |
| 116 | + |
| 117 | + # @!method self.variants |
| 118 | + # @return [Array(Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse, Lithic::Models::CardWebProvisionResponse::GoogleWebPushProvisioningResponse)] |
81 | 119 | end |
82 | 120 | end |
83 | 121 | end |
0 commit comments