Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include sub_merchant #288

Merged
merged 3 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
Loading