Skip to content

Commit c50f025

Browse files
author
Dan Sharpe
committed
update serialization
1 parent db569a0 commit c50f025

File tree

8 files changed

+32
-32
lines changed

8 files changed

+32
-32
lines changed

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/Address.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,31 @@ public class Address {
3333
/// </summary>
3434
/// <value>Additional address information, if required.</value>
3535
[DataMember(Name="addressLine2", EmitDefaultValue=false)]
36-
[JsonProperty(PropertyName = "addressLine2")]
36+
[JsonProperty(PropertyName = "addressLine2", DefaultValueHandling = DefaultValueHandling.Ignore )]
3737
public string AddressLine2 { get; set; }
3838

3939
/// <summary>
4040
/// Additional address information, if required.
4141
/// </summary>
4242
/// <value>Additional address information, if required.</value>
4343
[DataMember(Name="addressLine3", EmitDefaultValue=false)]
44-
[JsonProperty(PropertyName = "addressLine3")]
44+
[JsonProperty(PropertyName = "addressLine3", DefaultValueHandling = DefaultValueHandling.Ignore)]
4545
public string AddressLine3 { get; set; }
4646

4747
/// <summary>
4848
/// The name of the business or institution associated with the address.
4949
/// </summary>
5050
/// <value>The name of the business or institution associated with the address.</value>
5151
[DataMember(Name="companyName", EmitDefaultValue=false)]
52-
[JsonProperty(PropertyName = "companyName")]
52+
[JsonProperty(PropertyName = "companyName", DefaultValueHandling = DefaultValueHandling.Ignore)]
5353
public string CompanyName { get; set; }
5454

5555
/// <summary>
5656
/// Gets or Sets StateOrRegion
5757
/// </summary>
58-
[DataMember(Name="stateOrRegion", EmitDefaultValue=false)]
58+
[DataMember(Name = "stateOrRegion", EmitDefaultValue = false)]
5959
[JsonProperty(PropertyName = "stateOrRegion")]
60-
public string StateOrRegion { get; set; }
60+
public string StateOrRegion { get; set; } = string.Empty;
6161

6262
/// <summary>
6363
/// Gets or Sets City
@@ -85,15 +85,15 @@ public class Address {
8585
/// </summary>
8686
/// <value>The email address of the contact associated with the address.</value>
8787
[DataMember(Name="email", EmitDefaultValue=false)]
88-
[JsonProperty(PropertyName = "email")]
88+
[JsonProperty(PropertyName = "email", DefaultValueHandling = DefaultValueHandling.Ignore)]
8989
public string Email { get; set; }
9090

9191
/// <summary>
9292
/// The phone number of the person, business or institution located at that address, including the country calling code.
9393
/// </summary>
9494
/// <value>The phone number of the person, business or institution located at that address, including the country calling code.</value>
9595
[DataMember(Name="phoneNumber", EmitDefaultValue=false)]
96-
[JsonProperty(PropertyName = "phoneNumber")]
96+
[JsonProperty(PropertyName = "phoneNumber", DefaultValueHandling = DefaultValueHandling.Ignore)]
9797
public string PhoneNumber { get; set; }
9898

9999

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/ChannelDetails.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ public class ChannelDetails {
2424
/// Gets or Sets AmazonOrderDetails
2525
/// </summary>
2626
[DataMember(Name="amazonOrderDetails", EmitDefaultValue=false)]
27-
[JsonProperty(PropertyName = "amazonOrderDetails")]
27+
[JsonProperty(PropertyName = "amazonOrderDetails", DefaultValueHandling = DefaultValueHandling.Ignore)]
2828
public AmazonOrderDetails AmazonOrderDetails { get; set; }
2929

3030
/// <summary>
3131
/// Gets or Sets AmazonShipmentDetails
3232
/// </summary>
3333
[DataMember(Name="amazonShipmentDetails", EmitDefaultValue=false)]
34-
[JsonProperty(PropertyName = "amazonShipmentDetails")]
34+
[JsonProperty(PropertyName = "amazonShipmentDetails", DefaultValueHandling = DefaultValueHandling.Ignore)]
3535
public AmazonShipmentDetails AmazonShipmentDetails { get; set; }
3636

3737

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/DocumentSize.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ public class DocumentSize {
1717
/// </summary>
1818
/// <value>The width of the document measured in the units specified.</value>
1919
[DataMember(Name="width", EmitDefaultValue=false)]
20-
[JsonProperty(PropertyName = "width")]
20+
[JsonProperty(PropertyName = "width", DefaultValueHandling = DefaultValueHandling.Ignore)]
2121
public decimal? Width { get; set; }
2222

2323
/// <summary>
2424
/// The length of the document measured in the units specified.
2525
/// </summary>
2626
/// <value>The length of the document measured in the units specified.</value>
2727
[DataMember(Name="length", EmitDefaultValue=false)]
28-
[JsonProperty(PropertyName = "length")]
28+
[JsonProperty(PropertyName = "length", DefaultValueHandling = DefaultValueHandling.Ignore)]
2929
public decimal? Length { get; set; }
3030

3131
/// <summary>
3232
/// The unit of measurement.
3333
/// </summary>
3434
/// <value>The unit of measurement.</value>
3535
[DataMember(Name="unit", EmitDefaultValue=false)]
36-
[JsonProperty(PropertyName = "unit")]
36+
[JsonProperty(PropertyName = "unit", DefaultValueHandling = DefaultValueHandling.Ignore)]
3737
public string Unit { get; set; }
3838

3939

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/GetRatesRequest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class GetRatesRequest {
1717
/// </summary>
1818
/// <value>The ship to address.</value>
1919
[DataMember(Name="shipTo", EmitDefaultValue=false)]
20-
[JsonProperty(PropertyName = "shipTo")]
20+
[JsonProperty(PropertyName = "shipTo", DefaultValueHandling = DefaultValueHandling.Ignore)]
2121
public Address ShipTo { get; set; }
2222

2323
/// <summary>
@@ -33,15 +33,15 @@ public class GetRatesRequest {
3333
/// </summary>
3434
/// <value>The return to address.</value>
3535
[DataMember(Name="returnTo", EmitDefaultValue=false)]
36-
[JsonProperty(PropertyName = "returnTo")]
36+
[JsonProperty(PropertyName = "returnTo", DefaultValueHandling = DefaultValueHandling.Ignore)]
3737
public Address ReturnTo { get; set; }
3838

3939
/// <summary>
4040
/// The ship date and time (the requested pickup). This defaults to the current date and time.
4141
/// </summary>
4242
/// <value>The ship date and time (the requested pickup). This defaults to the current date and time.</value>
4343
[DataMember(Name="shipDate", EmitDefaultValue=false)]
44-
[JsonProperty(PropertyName = "shipDate")]
44+
[JsonProperty(PropertyName = "shipDate", DefaultValueHandling = DefaultValueHandling.Ignore)]
4545
public DateTime? ShipDate { get; set; }
4646

4747
/// <summary>
@@ -55,14 +55,14 @@ public class GetRatesRequest {
5555
/// Gets or Sets ValueAddedServices
5656
/// </summary>
5757
[DataMember(Name="valueAddedServices", EmitDefaultValue=false)]
58-
[JsonProperty(PropertyName = "valueAddedServices")]
58+
[JsonProperty(PropertyName = "valueAddedServices", DefaultValueHandling = DefaultValueHandling.Ignore)]
5959
public ValueAddedServiceDetails ValueAddedServices { get; set; }
6060

6161
/// <summary>
6262
/// Gets or Sets TaxDetails
6363
/// </summary>
6464
[DataMember(Name="taxDetails", EmitDefaultValue=false)]
65-
[JsonProperty(PropertyName = "taxDetails")]
65+
[JsonProperty(PropertyName = "taxDetails", DefaultValueHandling = DefaultValueHandling.Ignore)]
6666
public TaxDetailList TaxDetails { get; set; }
6767

6868
/// <summary>

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/Item.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ public class Item {
1616
/// Gets or Sets ItemValue
1717
/// </summary>
1818
[DataMember(Name="itemValue", EmitDefaultValue=false)]
19-
[JsonProperty(PropertyName = "itemValue")]
19+
[JsonProperty(PropertyName = "itemValue", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020
public Currency ItemValue { get; set; }
2121

2222
/// <summary>
2323
/// The product description of the item.
2424
/// </summary>
2525
/// <value>The product description of the item.</value>
2626
[DataMember(Name="description", EmitDefaultValue=false)]
27-
[JsonProperty(PropertyName = "description")]
27+
[JsonProperty(PropertyName = "description", DefaultValueHandling = DefaultValueHandling.Ignore)]
2828
public string Description { get; set; }
2929

3030
/// <summary>
3131
/// A unique identifier for an item provided by the client.
3232
/// </summary>
3333
/// <value>A unique identifier for an item provided by the client.</value>
3434
[DataMember(Name="itemIdentifier", EmitDefaultValue=false)]
35-
[JsonProperty(PropertyName = "itemIdentifier")]
35+
[JsonProperty(PropertyName = "itemIdentifier", DefaultValueHandling = DefaultValueHandling.Ignore)]
3636
public string ItemIdentifier { get; set; }
3737

3838
/// <summary>
@@ -63,29 +63,29 @@ public class Item {
6363
/// </summary>
6464
/// <value>The product type of the item.</value>
6565
[DataMember(Name="productType", EmitDefaultValue=false)]
66-
[JsonProperty(PropertyName = "productType")]
66+
[JsonProperty(PropertyName = "productType", DefaultValueHandling = DefaultValueHandling.Ignore)]
6767
public string ProductType { get; set; }
6868

6969
/// <summary>
7070
/// Gets or Sets InvoiceDetails
7171
/// </summary>
7272
[DataMember(Name="invoiceDetails", EmitDefaultValue=false)]
73-
[JsonProperty(PropertyName = "invoiceDetails")]
73+
[JsonProperty(PropertyName = "invoiceDetails", DefaultValueHandling = DefaultValueHandling.Ignore)]
7474
public InvoiceDetails InvoiceDetails { get; set; }
7575

7676
/// <summary>
7777
/// A list of unique serial numbers in an Amazon package that can be used to guarantee non-fraudulent items. The number of serial numbers in the list must be less than or equal to the quantity of items being shipped. Only applicable when channel source is Amazon.
7878
/// </summary>
7979
/// <value>A list of unique serial numbers in an Amazon package that can be used to guarantee non-fraudulent items. The number of serial numbers in the list must be less than or equal to the quantity of items being shipped. Only applicable when channel source is Amazon.</value>
8080
[DataMember(Name="serialNumbers", EmitDefaultValue=false)]
81-
[JsonProperty(PropertyName = "serialNumbers")]
81+
[JsonProperty(PropertyName = "serialNumbers", DefaultValueHandling = DefaultValueHandling.Ignore)]
8282
public List<string> SerialNumbers { get; set; }
8383

8484
/// <summary>
8585
/// Gets or Sets DirectFulfillmentItemIdentifiers
8686
/// </summary>
8787
[DataMember(Name="directFulfillmentItemIdentifiers", EmitDefaultValue=false)]
88-
[JsonProperty(PropertyName = "directFulfillmentItemIdentifiers")]
88+
[JsonProperty(PropertyName = "directFulfillmentItemIdentifiers", DefaultValueHandling = DefaultValueHandling.Ignore)]
8989
public DirectFulfillmentItemIdentifiers DirectFulfillmentItemIdentifiers { get; set; }
9090

9191

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/Package.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,22 @@ public class Package {
3838
/// </summary>
3939
/// <value>When true, the package contains hazardous materials. Defaults to false.</value>
4040
[DataMember(Name="isHazmat", EmitDefaultValue=false)]
41-
[JsonProperty(PropertyName = "isHazmat")]
41+
[JsonProperty(PropertyName = "isHazmat", DefaultValueHandling = DefaultValueHandling.Ignore)]
4242
public bool? IsHazmat { get; set; }
4343

4444
/// <summary>
4545
/// The seller name displayed on the label.
4646
/// </summary>
4747
/// <value>The seller name displayed on the label.</value>
4848
[DataMember(Name="sellerDisplayName", EmitDefaultValue=false)]
49-
[JsonProperty(PropertyName = "sellerDisplayName")]
49+
[JsonProperty(PropertyName = "sellerDisplayName", DefaultValueHandling = DefaultValueHandling.Ignore)]
5050
public string SellerDisplayName { get; set; }
5151

5252
/// <summary>
5353
/// Gets or Sets Charges
5454
/// </summary>
5555
[DataMember(Name="charges", EmitDefaultValue=false)]
56-
[JsonProperty(PropertyName = "charges")]
56+
[JsonProperty(PropertyName = "charges", DefaultValueHandling = DefaultValueHandling.Ignore)]
5757
public ChargeList Charges { get; set; }
5858

5959
/// <summary>

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/PurchaseShipmentRequest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class PurchaseShipmentRequest
1717
/// Gets or Sets RequestToken
1818
/// </summary>
1919
[DataMember(Name = "requestToken", EmitDefaultValue = false)]
20-
[JsonProperty(PropertyName = "requestToken")]
20+
[JsonProperty(PropertyName = "requestToken", DefaultValueHandling = DefaultValueHandling.Ignore)]
2121
public string RequestToken { get; set; }
2222

2323
/// <summary>
@@ -31,22 +31,22 @@ public class PurchaseShipmentRequest
3131
/// Gets or Sets RequestedDocumentSpecification
3232
/// </summary>
3333
[DataMember(Name = "requestedDocumentSpecification", EmitDefaultValue = false)]
34-
[JsonProperty(PropertyName = "requestedDocumentSpecification")]
34+
[JsonProperty(PropertyName = "requestedDocumentSpecification", DefaultValueHandling = DefaultValueHandling.Ignore)]
3535
public RequestedDocumentSpecification RequestedDocumentSpecification { get; set; }
3636

3737
/// <summary>
3838
/// Gets or Sets RequestedValueAddedServices
3939
/// </summary>
4040
[DataMember(Name = "requestedValueAddedServices", EmitDefaultValue = false)]
41-
[JsonProperty(PropertyName = "requestedValueAddedServices")]
41+
[JsonProperty(PropertyName = "requestedValueAddedServices", DefaultValueHandling = DefaultValueHandling.Ignore)]
4242
public RequestedValueAddedServiceList RequestedValueAddedServices { get; set; }
4343

4444
/// <summary>
4545
/// The additional inputs required to purchase a shipping offering, in JSON format. The JSON provided here must adhere to the JSON schema that is returned in the response to the getAdditionalInputs operation. Additional inputs are only required when indicated by the requiresAdditionalInputs property in the response to the getRates operation.
4646
/// </summary>
4747
/// <value>The additional inputs required to purchase a shipping offering, in JSON format. The JSON provided here must adhere to the JSON schema that is returned in the response to the getAdditionalInputs operation. Additional inputs are only required when indicated by the requiresAdditionalInputs property in the response to the getRates operation.</value>
4848
[DataMember(Name = "additionalInputs", EmitDefaultValue = false)]
49-
[JsonProperty(PropertyName = "additionalInputs")]
49+
[JsonProperty(PropertyName = "additionalInputs", DefaultValueHandling = DefaultValueHandling.Ignore)]
5050
public Dictionary<string, Object> AdditionalInputs { get; set; }
5151

5252

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/RequestedDocumentSpecification.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class RequestedDocumentSpecification
4545
/// </summary>
4646
[DataMember(Name = "needFileJoining", EmitDefaultValue = false)]
4747
[JsonProperty(PropertyName = "needFileJoining")]
48-
public string NeedFileJoining { get; set; }
48+
public bool NeedFileJoining { get; set; }
4949

5050
/// <summary>
5151
/// A list of the document types requested.

0 commit comments

Comments
 (0)