github.com/Ingenico-ePayments/connect-sdk-go@v0.0.0-20240318153750-1f8cd329b9c9/merchant/Client.go (about)

     1  // This class was auto-generated from the API references found at
     2  // https://epayments-api.developer-ingenico.com/
     3  
     4  package merchant
     5  
     6  import (
     7  	"github.com/Ingenico-ePayments/connect-sdk-go/internal/apiresource"
     8  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/captures"
     9  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/disputes"
    10  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/files"
    11  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/hostedcheckouts"
    12  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/hostedmandatemanagements"
    13  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/installments"
    14  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/mandates"
    15  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/payments"
    16  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/payouts"
    17  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/productgroups"
    18  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/products"
    19  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/refunds"
    20  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/riskassessments"
    21  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/services"
    22  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/sessions"
    23  	"github.com/Ingenico-ePayments/connect-sdk-go/merchant/tokens"
    24  )
    25  
    26  // Client represents a merchant client. Thread-safe.
    27  type Client struct {
    28  	apiResource *apiresource.APIResource
    29  }
    30  
    31  // Hostedcheckouts represents the resource /{merchantId}/hostedcheckouts
    32  func (c *Client) Hostedcheckouts() *hostedcheckouts.Client {
    33  	return hostedcheckouts.NewClient(c.apiResource, nil)
    34  }
    35  
    36  // Hostedmandatemanagements represents the resource /{merchantId}/hostedmandatemanagements
    37  func (c *Client) Hostedmandatemanagements() *hostedmandatemanagements.Client {
    38  	return hostedmandatemanagements.NewClient(c.apiResource, nil)
    39  }
    40  
    41  // Payments represents the resource /{merchantId}/payments
    42  func (c *Client) Payments() *payments.Client {
    43  	return payments.NewClient(c.apiResource, nil)
    44  }
    45  
    46  // Captures represents the resource /{merchantId}/captures
    47  func (c *Client) Captures() *captures.Client {
    48  	return captures.NewClient(c.apiResource, nil)
    49  }
    50  
    51  // Refunds represents the resource /{merchantId}/refunds
    52  func (c *Client) Refunds() *refunds.Client {
    53  	return refunds.NewClient(c.apiResource, nil)
    54  }
    55  
    56  // Disputes represents the resource /{merchantId}/disputes
    57  func (c *Client) Disputes() *disputes.Client {
    58  	return disputes.NewClient(c.apiResource, nil)
    59  }
    60  
    61  // Payouts represents the resource /{merchantId}/payouts
    62  func (c *Client) Payouts() *payouts.Client {
    63  	return payouts.NewClient(c.apiResource, nil)
    64  }
    65  
    66  // Productgroups represents the resource /{merchantId}/productgroups
    67  func (c *Client) Productgroups() *productgroups.Client {
    68  	return productgroups.NewClient(c.apiResource, nil)
    69  }
    70  
    71  // Products represents the resource /{merchantId}/products
    72  func (c *Client) Products() *products.Client {
    73  	return products.NewClient(c.apiResource, nil)
    74  }
    75  
    76  // Riskassessments represents the resource /{merchantId}/riskassessments
    77  func (c *Client) Riskassessments() *riskassessments.Client {
    78  	return riskassessments.NewClient(c.apiResource, nil)
    79  }
    80  
    81  // Services represents the resource /{merchantId}/services
    82  func (c *Client) Services() *services.Client {
    83  	return services.NewClient(c.apiResource, nil)
    84  }
    85  
    86  // Tokens represents the resource /{merchantId}/tokens
    87  func (c *Client) Tokens() *tokens.Client {
    88  	return tokens.NewClient(c.apiResource, nil)
    89  }
    90  
    91  // Mandates represents the resource /{merchantId}/mandates
    92  func (c *Client) Mandates() *mandates.Client {
    93  	return mandates.NewClient(c.apiResource, nil)
    94  }
    95  
    96  // Sessions represents the resource /{merchantId}/sessions
    97  func (c *Client) Sessions() *sessions.Client {
    98  	return sessions.NewClient(c.apiResource, nil)
    99  }
   100  
   101  // Installments represents the resource /{merchantId}/installments
   102  func (c *Client) Installments() *installments.Client {
   103  	return installments.NewClient(c.apiResource, nil)
   104  }
   105  
   106  // Files represents the resource /{merchantId}/files
   107  func (c *Client) Files() *files.Client {
   108  	return files.NewClient(c.apiResource, nil)
   109  }
   110  
   111  // NewClient constructs a Merchant Client
   112  //
   113  // parent is the *apiresource.APIResource on top of which we want to build the new Merchant Client
   114  func NewClient(parent *apiresource.APIResource, pathContext map[string]string) *Client {
   115  	apiResource := apiresource.NewAPIResourceWithParent(parent, pathContext)
   116  
   117  	return &Client{apiResource}
   118  }