Skip to content

Commit d699caa

Browse files
Automated commit message
1 parent c4d8812 commit d699caa

19 files changed

+464
-70
lines changed

PaypalServerSdk.Standard/Models/PaypalWalletAttributes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public PaypalWalletAttributes(
4040
public Models.PaypalWalletCustomerRequest Customer { get; set; }
4141

4242
/// <summary>
43-
/// Resource consolidating common request and response attributes for vaulting PayPal Wallet.
43+
/// Gets or sets Vault.
4444
/// </summary>
4545
[JsonProperty("vault", NullValueHandling = NullValueHandling.Ignore)]
4646
public Models.PaypalWalletVaultInstruction Vault { get; set; }
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
// <copyright file="PaypalWalletVaultBase.cs" company="APIMatic">
2+
// PaypalServerSdk.Standard
3+
//
4+
// This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5+
// </copyright>
6+
using Newtonsoft.Json;
7+
using System.Collections.Generic;
8+
9+
namespace PaypalServerSdk.Standard.Models
10+
{
11+
/// <summary>
12+
/// PaypalWalletVaultBase.
13+
/// </summary>
14+
public class PaypalWalletVaultBase
15+
{
16+
/// <summary>
17+
/// Initializes a new instance of the <see cref="PaypalWalletVaultBase"/> class.
18+
/// </summary>
19+
public PaypalWalletVaultBase()
20+
{
21+
}
22+
23+
/// <summary>
24+
/// Initializes a new instance of the <see cref="PaypalWalletVaultBase"/> class.
25+
/// </summary>
26+
/// <param name="storeInVault">store_in_vault.</param>
27+
/// <param name="description">description.</param>
28+
/// <param name="usagePattern">usage_pattern.</param>
29+
/// <param name="usageType">usage_type.</param>
30+
/// <param name="customerType">customer_type.</param>
31+
/// <param name="permitMultiplePaymentTokens">permit_multiple_payment_tokens.</param>
32+
public PaypalWalletVaultBase(
33+
Models.StoreInVaultInstruction? storeInVault = null,
34+
string description = null,
35+
Models.UsagePattern? usagePattern = null,
36+
Models.UsageType? usageType = null,
37+
Models.PaypalPaymentTokenCustomerType? customerType = Models.PaypalPaymentTokenCustomerType.Consumer,
38+
bool? permitMultiplePaymentTokens = false)
39+
{
40+
this.StoreInVault = storeInVault;
41+
this.Description = description;
42+
this.UsagePattern = usagePattern;
43+
this.UsageType = usageType;
44+
this.CustomerType = customerType;
45+
this.PermitMultiplePaymentTokens = permitMultiplePaymentTokens;
46+
}
47+
48+
/// <summary>
49+
/// Defines how and when the payment source gets vaulted.
50+
/// </summary>
51+
[JsonProperty("store_in_vault", NullValueHandling = NullValueHandling.Ignore)]
52+
public Models.StoreInVaultInstruction? StoreInVault { get; set; }
53+
54+
/// <summary>
55+
/// The description displayed to PayPal consumer on the approval flow for PayPal, as well as on the PayPal payment token management experience on PayPal.com.
56+
/// </summary>
57+
[JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
58+
public string Description { get; set; }
59+
60+
/// <summary>
61+
/// Expected business/pricing model for the billing agreement.
62+
/// </summary>
63+
[JsonProperty("usage_pattern", NullValueHandling = NullValueHandling.Ignore)]
64+
public Models.UsagePattern? UsagePattern { get; set; }
65+
66+
/// <summary>
67+
/// The usage type associated with the PayPal payment token.
68+
/// </summary>
69+
[JsonProperty("usage_type", NullValueHandling = NullValueHandling.Ignore)]
70+
public Models.UsageType? UsageType { get; set; }
71+
72+
/// <summary>
73+
/// The customer type associated with the PayPal payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
74+
/// </summary>
75+
[JsonProperty("customer_type", NullValueHandling = NullValueHandling.Ignore)]
76+
public Models.PaypalPaymentTokenCustomerType? CustomerType { get; set; }
77+
78+
/// <summary>
79+
/// Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
80+
/// </summary>
81+
[JsonProperty("permit_multiple_payment_tokens", NullValueHandling = NullValueHandling.Ignore)]
82+
public bool? PermitMultiplePaymentTokens { get; set; }
83+
84+
/// <inheritdoc/>
85+
public override string ToString()
86+
{
87+
var toStringOutput = new List<string>();
88+
this.ToString(toStringOutput);
89+
return $"PaypalWalletVaultBase : ({string.Join(", ", toStringOutput)})";
90+
}
91+
92+
/// <inheritdoc/>
93+
public override bool Equals(object obj)
94+
{
95+
if (obj is null) return false;
96+
if (ReferenceEquals(this, obj)) return true;
97+
98+
return obj is PaypalWalletVaultBase other &&
99+
(this.StoreInVault == null && other.StoreInVault == null ||
100+
this.StoreInVault?.Equals(other.StoreInVault) == true) &&
101+
(this.Description == null && other.Description == null ||
102+
this.Description?.Equals(other.Description) == true) &&
103+
(this.UsagePattern == null && other.UsagePattern == null ||
104+
this.UsagePattern?.Equals(other.UsagePattern) == true) &&
105+
(this.UsageType == null && other.UsageType == null ||
106+
this.UsageType?.Equals(other.UsageType) == true) &&
107+
(this.CustomerType == null && other.CustomerType == null ||
108+
this.CustomerType?.Equals(other.CustomerType) == true) &&
109+
(this.PermitMultiplePaymentTokens == null && other.PermitMultiplePaymentTokens == null ||
110+
this.PermitMultiplePaymentTokens?.Equals(other.PermitMultiplePaymentTokens) == true);
111+
}
112+
113+
/// <summary>
114+
/// ToString overload.
115+
/// </summary>
116+
/// <param name="toStringOutput">List of strings.</param>
117+
protected void ToString(List<string> toStringOutput)
118+
{
119+
toStringOutput.Add($"StoreInVault = {(this.StoreInVault == null ? "null" : this.StoreInVault.ToString())}");
120+
toStringOutput.Add($"Description = {this.Description ?? "null"}");
121+
toStringOutput.Add($"UsagePattern = {(this.UsagePattern == null ? "null" : this.UsagePattern.ToString())}");
122+
toStringOutput.Add($"UsageType = {(this.UsageType == null ? "null" : this.UsageType.ToString())}");
123+
toStringOutput.Add($"CustomerType = {(this.CustomerType == null ? "null" : this.CustomerType.ToString())}");
124+
toStringOutput.Add($"PermitMultiplePaymentTokens = {(this.PermitMultiplePaymentTokens == null ? "null" : this.PermitMultiplePaymentTokens.ToString())}");
125+
}
126+
}
127+
}

PaypalServerSdk.Standard/Models/PaypalWalletVaultInstruction.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,33 @@ public PaypalWalletVaultInstruction()
2424
/// Initializes a new instance of the <see cref="PaypalWalletVaultInstruction"/> class.
2525
/// </summary>
2626
/// <param name="usageType">usage_type.</param>
27+
/// <param name="storeInVault">store_in_vault.</param>
2728
/// <param name="description">description.</param>
2829
/// <param name="usagePattern">usage_pattern.</param>
2930
/// <param name="customerType">customer_type.</param>
3031
/// <param name="permitMultiplePaymentTokens">permit_multiple_payment_tokens.</param>
3132
public PaypalWalletVaultInstruction(
3233
Models.PaypalPaymentTokenUsageType usageType,
34+
Models.StoreInVaultInstruction? storeInVault = null,
3335
string description = null,
3436
Models.UsagePattern? usagePattern = null,
3537
Models.PaypalPaymentTokenCustomerType? customerType = Models.PaypalPaymentTokenCustomerType.Consumer,
3638
bool? permitMultiplePaymentTokens = false)
3739
{
40+
this.StoreInVault = storeInVault;
3841
this.Description = description;
3942
this.UsagePattern = usagePattern;
4043
this.UsageType = usageType;
4144
this.CustomerType = customerType;
4245
this.PermitMultiplePaymentTokens = permitMultiplePaymentTokens;
4346
}
4447

48+
/// <summary>
49+
/// Defines how and when the payment source gets vaulted.
50+
/// </summary>
51+
[JsonProperty("store_in_vault", NullValueHandling = NullValueHandling.Ignore)]
52+
public Models.StoreInVaultInstruction? StoreInVault { get; set; }
53+
4554
/// <summary>
4655
/// The description displayed to PayPal consumer on the approval flow for PayPal, as well as on the PayPal payment token management experience on PayPal.com.
4756
/// </summary>
@@ -87,6 +96,8 @@ public override bool Equals(object obj)
8796
if (ReferenceEquals(this, obj)) return true;
8897

8998
return obj is PaypalWalletVaultInstruction other &&
99+
(this.StoreInVault == null && other.StoreInVault == null ||
100+
this.StoreInVault?.Equals(other.StoreInVault) == true) &&
90101
(this.Description == null && other.Description == null ||
91102
this.Description?.Equals(other.Description) == true) &&
92103
(this.UsagePattern == null && other.UsagePattern == null ||
@@ -104,6 +115,7 @@ public override bool Equals(object obj)
104115
/// <param name="toStringOutput">List of strings.</param>
105116
protected void ToString(List<string> toStringOutput)
106117
{
118+
toStringOutput.Add($"StoreInVault = {(this.StoreInVault == null ? "null" : this.StoreInVault.ToString())}");
107119
toStringOutput.Add($"Description = {this.Description ?? "null"}");
108120
toStringOutput.Add($"UsagePattern = {(this.UsagePattern == null ? "null" : this.UsagePattern.ToString())}");
109121
toStringOutput.Add($"UsageType = {this.UsageType}");

PaypalServerSdk.Standard/Models/Subscriber.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,37 @@ public Subscriber()
2323
/// <summary>
2424
/// Initializes a new instance of the <see cref="Subscriber"/> class.
2525
/// </summary>
26+
/// <param name="emailAddress">email_address.</param>
27+
/// <param name="payerId">payer_id.</param>
2628
/// <param name="name">name.</param>
2729
/// <param name="shippingAddress">shipping_address.</param>
2830
/// <param name="paymentSource">payment_source.</param>
2931
public Subscriber(
32+
string emailAddress = null,
33+
string payerId = null,
3034
Models.Name name = null,
3135
Models.ShippingDetails shippingAddress = null,
3236
Models.SubscriptionPaymentSourceResponse paymentSource = null)
3337
{
38+
this.EmailAddress = emailAddress;
39+
this.PayerId = payerId;
3440
this.Name = name;
3541
this.ShippingAddress = shippingAddress;
3642
this.PaymentSource = paymentSource;
3743
}
3844

45+
/// <summary>
46+
/// The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
47+
/// </summary>
48+
[JsonProperty("email_address", NullValueHandling = NullValueHandling.Ignore)]
49+
public string EmailAddress { get; set; }
50+
51+
/// <summary>
52+
/// The account identifier for a PayPal account.
53+
/// </summary>
54+
[JsonProperty("payer_id", NullValueHandling = NullValueHandling.Ignore)]
55+
public string PayerId { get; set; }
56+
3957
/// <summary>
4058
/// The name of the party.
4159
/// </summary>
@@ -69,6 +87,10 @@ public override bool Equals(object obj)
6987
if (ReferenceEquals(this, obj)) return true;
7088

7189
return obj is Subscriber other &&
90+
(this.EmailAddress == null && other.EmailAddress == null ||
91+
this.EmailAddress?.Equals(other.EmailAddress) == true) &&
92+
(this.PayerId == null && other.PayerId == null ||
93+
this.PayerId?.Equals(other.PayerId) == true) &&
7294
(this.Name == null && other.Name == null ||
7395
this.Name?.Equals(other.Name) == true) &&
7496
(this.ShippingAddress == null && other.ShippingAddress == null ||
@@ -83,6 +105,8 @@ public override bool Equals(object obj)
83105
/// <param name="toStringOutput">List of strings.</param>
84106
protected void ToString(List<string> toStringOutput)
85107
{
108+
toStringOutput.Add($"EmailAddress = {this.EmailAddress ?? "null"}");
109+
toStringOutput.Add($"PayerId = {this.PayerId ?? "null"}");
86110
toStringOutput.Add($"Name = {(this.Name == null ? "null" : this.Name.ToString())}");
87111
toStringOutput.Add($"ShippingAddress = {(this.ShippingAddress == null ? "null" : this.ShippingAddress.ToString())}");
88112
toStringOutput.Add($"PaymentSource = {(this.PaymentSource == null ? "null" : this.PaymentSource.ToString())}");

PaypalServerSdk.Standard/Models/SubscriberRequest.cs

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,45 @@ public SubscriberRequest()
2323
/// <summary>
2424
/// Initializes a new instance of the <see cref="SubscriberRequest"/> class.
2525
/// </summary>
26+
/// <param name="emailAddress">email_address.</param>
27+
/// <param name="payerId">payer_id.</param>
2628
/// <param name="name">name.</param>
27-
/// <param name="phone">phone.</param>
2829
/// <param name="shippingAddress">shipping_address.</param>
2930
/// <param name="paymentSource">payment_source.</param>
31+
/// <param name="phone">phone.</param>
3032
public SubscriberRequest(
33+
string emailAddress = null,
34+
string payerId = null,
3135
Models.Name name = null,
32-
Models.PhoneWithType phone = null,
3336
Models.ShippingDetails shippingAddress = null,
34-
Models.SubscriptionPaymentSource paymentSource = null)
37+
Models.SubscriptionPaymentSource paymentSource = null,
38+
Models.PhoneWithType phone = null)
3539
{
40+
this.EmailAddress = emailAddress;
41+
this.PayerId = payerId;
3642
this.Name = name;
37-
this.Phone = phone;
3843
this.ShippingAddress = shippingAddress;
3944
this.PaymentSource = paymentSource;
45+
this.Phone = phone;
4046
}
4147

4248
/// <summary>
43-
/// The name of the party.
49+
/// The internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
4450
/// </summary>
45-
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
46-
public Models.Name Name { get; set; }
51+
[JsonProperty("email_address", NullValueHandling = NullValueHandling.Ignore)]
52+
public string EmailAddress { get; set; }
4753

4854
/// <summary>
49-
/// The phone information.
55+
/// The account identifier for a PayPal account.
5056
/// </summary>
51-
[JsonProperty("phone", NullValueHandling = NullValueHandling.Ignore)]
52-
public Models.PhoneWithType Phone { get; set; }
57+
[JsonProperty("payer_id", NullValueHandling = NullValueHandling.Ignore)]
58+
public string PayerId { get; set; }
59+
60+
/// <summary>
61+
/// The name of the party.
62+
/// </summary>
63+
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
64+
public Models.Name Name { get; set; }
5365

5466
/// <summary>
5567
/// The shipping details.
@@ -63,6 +75,12 @@ public SubscriberRequest(
6375
[JsonProperty("payment_source", NullValueHandling = NullValueHandling.Ignore)]
6476
public Models.SubscriptionPaymentSource PaymentSource { get; set; }
6577

78+
/// <summary>
79+
/// The phone information.
80+
/// </summary>
81+
[JsonProperty("phone", NullValueHandling = NullValueHandling.Ignore)]
82+
public Models.PhoneWithType Phone { get; set; }
83+
6684
/// <inheritdoc/>
6785
public override string ToString()
6886
{
@@ -78,14 +96,18 @@ public override bool Equals(object obj)
7896
if (ReferenceEquals(this, obj)) return true;
7997

8098
return obj is SubscriberRequest other &&
99+
(this.EmailAddress == null && other.EmailAddress == null ||
100+
this.EmailAddress?.Equals(other.EmailAddress) == true) &&
101+
(this.PayerId == null && other.PayerId == null ||
102+
this.PayerId?.Equals(other.PayerId) == true) &&
81103
(this.Name == null && other.Name == null ||
82104
this.Name?.Equals(other.Name) == true) &&
83-
(this.Phone == null && other.Phone == null ||
84-
this.Phone?.Equals(other.Phone) == true) &&
85105
(this.ShippingAddress == null && other.ShippingAddress == null ||
86106
this.ShippingAddress?.Equals(other.ShippingAddress) == true) &&
87107
(this.PaymentSource == null && other.PaymentSource == null ||
88-
this.PaymentSource?.Equals(other.PaymentSource) == true);
108+
this.PaymentSource?.Equals(other.PaymentSource) == true) &&
109+
(this.Phone == null && other.Phone == null ||
110+
this.Phone?.Equals(other.Phone) == true);
89111
}
90112

91113
/// <summary>
@@ -94,10 +116,12 @@ public override bool Equals(object obj)
94116
/// <param name="toStringOutput">List of strings.</param>
95117
protected void ToString(List<string> toStringOutput)
96118
{
119+
toStringOutput.Add($"EmailAddress = {this.EmailAddress ?? "null"}");
120+
toStringOutput.Add($"PayerId = {this.PayerId ?? "null"}");
97121
toStringOutput.Add($"Name = {(this.Name == null ? "null" : this.Name.ToString())}");
98-
toStringOutput.Add($"Phone = {(this.Phone == null ? "null" : this.Phone.ToString())}");
99122
toStringOutput.Add($"ShippingAddress = {(this.ShippingAddress == null ? "null" : this.ShippingAddress.ToString())}");
100123
toStringOutput.Add($"PaymentSource = {(this.PaymentSource == null ? "null" : this.PaymentSource.ToString())}");
124+
toStringOutput.Add($"Phone = {(this.Phone == null ? "null" : this.Phone.ToString())}");
101125
}
102126
}
103127
}

0 commit comments

Comments
 (0)