Skip to content

Commit

Permalink
Include sub merchant (#184)
Browse files Browse the repository at this point in the history
* include submerchant

* update address_door_number type

* small fix
  • Loading branch information
danielen-meli authored Jul 3, 2024
1 parent 5256f7b commit ab17fbf
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
79 changes: 79 additions & 0 deletions src/MercadoPago/Client/Common/SubMerchant.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
namespace MercadoPago.Client.Common
{
/// <summary>
/// Address information.
/// </summary>
public class SubMerchant
{
/// <summary>
/// Sub-commercial establishment establishment code
/// </summary>
public string SubMerchantId { get; set; }

/// <summary>
/// Sub-commerce MCC as determined by Abecs and/or primary CNAE
/// </summary>
public string Mcc { get; set; }

/// <summary>
/// Country in which the sub commerce is located
/// </summary>
public string Country { get; set; }

/// <summary>
/// Street name where the sub-commerce is located
/// </summary>
public string AddressStreet { get; set; }

/// <summary>
/// Street number where the sub-commerce is located
/// </summary>
public int AddressDoorNumber { get; set; }

/// <summary>
/// Sub trade name
/// </summary>
public string LegalName { get; set; }

/// <summary>
/// City where is located
/// </summary>
public string City { get; set; }


/// <summary>
/// State where the sub commerce is located
/// </summary>
public string RegionCodeIso { get; set; }

/// <summary>
/// ISO code of the sub-commerce region (“BR”)
/// </summary>
public string RegionCode { get; set; }

/// <summary>
/// Sub-commerce CPF or CNPJ type
/// </summary>
public string DocumentType { get; set; }

/// <summary>
/// Sub-commerce CPF or CNPJ number
/// </summary>
public string DocumentNumber { get; set; }

/// <summary>
/// Sub-commerce telephone number
/// </summary>
public string Phone { get; set; }

/// <summary>
/// Sub-commerce telephone number
/// </summary>
public string Zip { get; set; }

/// <summary>
/// Payment Facilitator URL
/// </summary>
public string Url { get; set; }
}
}
6 changes: 6 additions & 0 deletions src/MercadoPago/Client/Payment/PaymentCreateRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,11 @@ public class PaymentCreateRequest : IdempotentRequest
/// 3DS.
///</summary>
public string ThreeDSecureMode { get; set; }

///<summary>
/// Rules.
///</summary>
public PaymentForwardDataRequest PaymentForwardDataRequest{ get; set; }
}
}

16 changes: 16 additions & 0 deletions src/MercadoPago/Client/Payment/PaymentForwardDataRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using MercadoPago.Client.Common;

namespace MercadoPago.Client.Payment
{
/// <summary>
/// FowardData information
/// </summary>
public class PaymentForwardDataRequest
{
/// <summary>
/// Payer's personal identification.
/// </summary>
public SubMerchant SubMerchant { get; set; }

}
}

0 comments on commit ab17fbf

Please sign in to comment.