Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Release 1.24.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingenico ePayments committed Sep 26, 2018
1 parent f4d3b5f commit e5cdb33
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 21 deletions.
2 changes: 1 addition & 1 deletion communicator/MetaDataProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func getPlatformIdentifier() string {
}

const sdkIdentifier = "GoServerSDK/v" + sdkVersion
const sdkVersion = "1.23.0"
const sdkVersion = "1.24.0"
const serverMetaInfoHeader = "X-GCS-ServerMetaInfo"

// NewMetaDataProviderWithBuilder creates a MetaDataProvider with the given MetaDataProviderBuilder
Expand Down
4 changes: 4 additions & 0 deletions domain/definitions/AirlineData.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ type AirlineData struct {
PosCityCode *string `json:"posCityCode,omitempty"`
TicketDeliveryMethod *string `json:"ticketDeliveryMethod,omitempty"`
TicketNumber *string `json:"ticketNumber,omitempty"`
TotalFare *int32 `json:"totalFare,omitempty"`
TotalFee *int32 `json:"totalFee,omitempty"`
TotalTaxes *int32 `json:"totalTaxes,omitempty"`
TravelAgencyName *string `json:"travelAgencyName,omitempty"`
}

// NewAirlineData constructs a new AirlineData
Expand Down
33 changes: 21 additions & 12 deletions domain/definitions/AirlineFlightLeg.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,27 @@ package definitions

// AirlineFlightLeg represents class AirlineFlightLeg
type AirlineFlightLeg struct {
AirlineClass *string `json:"airlineClass,omitempty"`
ArrivalAirport *string `json:"arrivalAirport,omitempty"`
CarrierCode *string `json:"carrierCode,omitempty"`
Date *string `json:"date,omitempty"`
DepartureTime *string `json:"departureTime,omitempty"`
Fare *string `json:"fare,omitempty"`
FareBasis *string `json:"fareBasis,omitempty"`
FlightNumber *string `json:"flightNumber,omitempty"`
Number *int32 `json:"number,omitempty"`
OriginAirport *string `json:"originAirport,omitempty"`
ServiceClass *string `json:"serviceClass,omitempty"`
StopoverCode *string `json:"stopoverCode,omitempty"`
AirlineClass *string `json:"airlineClass,omitempty"`
ArrivalAirport *string `json:"arrivalAirport,omitempty"`
ArrivalTime *string `json:"arrivalTime,omitempty"`
CarrierCode *string `json:"carrierCode,omitempty"`
ConjunctionTicket *string `json:"conjunctionTicket,omitempty"`
CouponNumber *string `json:"couponNumber,omitempty"`
Date *string `json:"date,omitempty"`
DepartureTime *string `json:"departureTime,omitempty"`
EndorsementOrRestriction *string `json:"endorsementOrRestriction,omitempty"`
ExchangeTicket *string `json:"exchangeTicket,omitempty"`
Fare *string `json:"fare,omitempty"`
FareBasis *string `json:"fareBasis,omitempty"`
Fee *int32 `json:"fee,omitempty"`
FlightNumber *string `json:"flightNumber,omitempty"`
Number *int32 `json:"number,omitempty"`
OriginAirport *string `json:"originAirport,omitempty"`
PassengerClass *string `json:"passengerClass,omitempty"`
// Deprecated: Use passengerClass instead
ServiceClass *string `json:"serviceClass,omitempty"`
StopoverCode *string `json:"stopoverCode,omitempty"`
Taxes *int32 `json:"taxes,omitempty"`
}

// NewAirlineFlightLeg constructs a new AirlineFlightLeg
Expand Down
1 change: 1 addition & 0 deletions domain/hostedcheckout/CreateResponse.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type CreateResponse struct {
RETURNMAC *string `json:"RETURNMAC,omitempty"`
HostedCheckoutID *string `json:"hostedCheckoutId,omitempty"`
InvalidTokens *[]string `json:"invalidTokens,omitempty"`
MerchantReference *string `json:"merchantReference,omitempty"`
PartialRedirectURL *string `json:"partialRedirectUrl,omitempty"`
}

Expand Down
1 change: 1 addition & 0 deletions domain/product/PaymentProductFieldDisplayElement.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package product
// PaymentProductFieldDisplayElement represents class PaymentProductFieldDisplayElement
type PaymentProductFieldDisplayElement struct {
ID *string `json:"id,omitempty"`
Label *string `json:"label,omitempty"`
Type *string `json:"type,omitempty"`
Value *string `json:"value,omitempty"`
}
Expand Down
9 changes: 5 additions & 4 deletions domain/product/PaymentProductGroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ package product

// PaymentProductGroup represents class PaymentProductGroup
type PaymentProductGroup struct {
AccountsOnFile *[]AccountOnFile `json:"accountsOnFile,omitempty"`
DisplayHints *PaymentProductDisplayHints `json:"displayHints,omitempty"`
Fields *[]PaymentProductField `json:"fields,omitempty"`
ID *string `json:"id,omitempty"`
AccountsOnFile *[]AccountOnFile `json:"accountsOnFile,omitempty"`
DeviceFingerprintEnabled *bool `json:"deviceFingerprintEnabled,omitempty"`
DisplayHints *PaymentProductDisplayHints `json:"displayHints,omitempty"`
Fields *[]PaymentProductField `json:"fields,omitempty"`
ID *string `json:"id,omitempty"`
}

// NewPaymentProductGroup constructs a new PaymentProductGroup
Expand Down
9 changes: 5 additions & 4 deletions domain/product/PaymentProductGroupResponse.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ package product

// PaymentProductGroupResponse represents class PaymentProductGroupResponse
type PaymentProductGroupResponse struct {
AccountsOnFile *[]AccountOnFile `json:"accountsOnFile,omitempty"`
DisplayHints *PaymentProductDisplayHints `json:"displayHints,omitempty"`
Fields *[]PaymentProductField `json:"fields,omitempty"`
ID *string `json:"id,omitempty"`
AccountsOnFile *[]AccountOnFile `json:"accountsOnFile,omitempty"`
DeviceFingerprintEnabled *bool `json:"deviceFingerprintEnabled,omitempty"`
DisplayHints *PaymentProductDisplayHints `json:"displayHints,omitempty"`
Fields *[]PaymentProductField `json:"fields,omitempty"`
ID *string `json:"id,omitempty"`
}

// NewPaymentProductGroupResponse constructs a new PaymentProductGroupResponse
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// This file was auto-generated from the API references found at
// https://epayments-api.developer-ingenico.com/s2sapi/v1/

package examples

import (
"fmt"

"github.com/Ingenico-ePayments/connect-sdk-go/domain/product"
)

func getDeviceFingerprintForGroupsExample() {
client, clientErr := getClient()
if clientErr != nil {
panic(clientErr)
}
defer client.Close()

var body product.DeviceFingerprintRequest

response, err := client.Merchant("merchantId").Productgroups().DeviceFingerprint("cards", body, nil)

fmt.Println(response, err)
}
54 changes: 54 additions & 0 deletions merchant/productgroups/Client.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,60 @@ func (c *Client) Get(paymentProductGroupID string, query GetParams, context comm
return resultObject, nil
}

// DeviceFingerprint represents the resource /{merchantId}/productgroups/{paymentProductGroupId}/deviceFingerprint
// Get device fingerprint
// Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/productgroups/deviceFingerprint.html
//
// Can return any of the following errors:
// * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400)
// * AuthorizationError if the request was not allowed (HTTP status code 403)
// * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409)
// * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed,
// or there was a conflict (HTTP status code 404, 409 or 410)
// * GlobalCollectError if something went wrong at the Ingenico ePayments platform,
// the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
// * APIError if the Ingenico ePayments platform returned any other error
func (c *Client) DeviceFingerprint(paymentProductGroupID string, body product.DeviceFingerprintRequest, context communication.CallContext) (product.DeviceFingerprintResponse, error) {
var resultObject product.DeviceFingerprintResponse

pathContext := map[string]string{
"paymentProductGroupId": paymentProductGroupID,
}

uri, err := c.apiResource.InstantiateURIWithContext("/{apiVersion}/{merchantId}/productgroups/{paymentProductGroupId}/deviceFingerprint", pathContext)
if err != nil {
return resultObject, err
}

clientHeaders := c.apiResource.ClientHeaders()

postErr := c.apiResource.Communicator().Post(uri, clientHeaders, nil, body, context, &resultObject)
if postErr != nil {
responseError, isResponseError := postErr.(*sdkErrors.ResponseError)
if isResponseError {
var errorObject interface{}

errorObject = &errors.ErrorResponse{}
err = c.apiResource.Communicator().Marshaller().Unmarshal(responseError.Body(), errorObject)
if err != nil {
return resultObject, err
}

err, createErr := sdkErrors.CreateAPIError(responseError.StatusCode(), responseError.Body(), errorObject, context)
if createErr != nil {
return resultObject, createErr
}

return resultObject, err
}

return resultObject, postErr
}

return resultObject, nil
}

// NewClient constructs a Productgroups Client
//
// parent is the *apiresource.APIResource on top of which we want to build the new Productgroups Client
Expand Down

0 comments on commit e5cdb33

Please sign in to comment.