Skip to content

Commit

Permalink
Include sub_merchant (#288)
Browse files Browse the repository at this point in the history
* include submerchant

* remove main

* update address_door_number type
  • Loading branch information
danielen-meli authored Jul 3, 2024
1 parent 70c2f21 commit 85ee134
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
52 changes: 52 additions & 0 deletions src/main/java/com/mercadopago/client/common/SubMerchant.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.mercadopago.client.common;

import lombok.Builder;
import lombok.Getter;

@Getter
@Builder
public class SubMerchant {

/** Submerchant code **/
private final String subMerchantId;

/** Submerchant MCC according to Abecs decision and/or primary CNAE **/
private final String mcc;

/** Country where the submerchant is located **/
private final String country;

/** Street number where the submerchant is located **/
private final Integer addressDoorNumber;

/** CEP of the submerchant **/
private final String zip;

/** CPF or CNPJ identification of the submerchant **/
private final String documentNumber;

/** City where the submerchant is located **/
private final String city;

/** Street where the submerchant is located **/
private final String addressStreet;

/** Name of the submerchant **/
private final String legalName;

/** State where the submerchant is located **/
private final String regionCodeIso;

/** Postal code of the submerchant **/
private final String regionCode;

/** CPF or CNPJ number of the submerchant **/
private final String documentType;

/** Phone number of the submerchant **/
private final String phone;

/** Payment Facilitator URL **/
private final String url;

}
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ public class PaymentCreateRequest {
/** Payer information. */
private final PaymentPayerRequest payer;

/** Forward Data information. */
private final PaymentForwardDataRequest forwardData;

/** Payment method chosen to do the payment. */
private final String paymentMethodId;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.mercadopago.client.payment;

import com.mercadopago.client.common.SubMerchant;
import lombok.Builder;
import lombok.Getter;

/** To use the Payment Facilitator integration, it is necessary to update the forward_data.sub_merchant property for sending the fields described below */
@Getter
@Builder
public class PaymentForwardDataRequest {

/** ForwardData for SubMerchant */
private final SubMerchant subMerchant;
}

0 comments on commit 85ee134

Please sign in to comment.