<commit_before>package multisafego

import (
	"errors"
	"strconv"
	"time"
)

// Order is the container for holding all the order parametersa that should be posted
type Order map[string]interface{}

// Payment is the response from PlaceOrder
type Payment struct {
	URL     string `json:"payment_url"`
	OrderID int    `json:"order_id"`
}

// OrderInfo is returned from the GetOrder function and contains the TransactionId which can be
// used to grab the payment status
type OrderInfo struct {
	Amount         int       `json:"amount"`
	AmountRefunded int       `json:"amount_refunded"`
	Created        time.Time `json:"created"`
	Currency       string    `json:"currency"`
	Customer       struct {
		Email  string `json:"email"`
		Locale string `json:"locale"`
	} `json:"customer"`
	Description    string    `json:"description"`
	Modified       time.Time `json:"modified"`
	OrderID        int       `json:"order_id"`
	PaymentDetails struct {
		AccountHolderName     interface{} `json:"account_holder_name"`
		AccountID             interface{} `json:"account_id"`
		ExternalTransactionID string      `json:"external_transaction_id"`
		RecurringID           interface{} `json:"recurring_id"`
		Type                  string      `json:"type"`
	} `json:"payment_details"`
	Status        string `json:"status"`
	TransactionID int    `json:"transaction_id"`
}

// Transaction contains a transaction for an order
type Transaction struct {
	Amount   int    `json:"amount"`
	Created  string `json:"created"`
	Currency string `json:"currency"`
	Customer struct {
		Email string `json:"email"`
	} `json:"customer"`
	Description    string `json:"description"`
	OrderID        int    `json:"order_id"`
	OrderStatus    string `json:"order_status"`
	PaymentDetails struct {
		AccountHolderName     interface{} `json:"account_holder_name"`
		AccountID             interface{} `json:"account_id"`
		ExternalTransactionID string      `json:"external_transaction_id"`
		RecurringID           interface{} `json:"recurring_id"`
		Type                  string      `json:"type"`
	} `json:"payment_details"`<commit_msg>Do not parse times in response. This can become an issue when MultiSafePay returns other time formats<commit_after>package multisafego

import (
	"errors"
	"strconv"
)

// Order is the container for holding all the order parametersa that should be posted
type Order map[string]interface{}

// Payment is the response from PlaceOrder
type Payment struct {
	URL     string `json:"payment_url"`
	OrderID int    `json:"order_id"`
}

// OrderInfo is returned from the GetOrder function and contains the TransactionId which can be
// used to grab the payment status
type OrderInfo struct {
	Amount         int `json:"amount"`
	AmountRefunded int `json:"amount_refunded"`
	//Created        time.Time `json:"created"`
	Currency string `json:"currency"`
	Customer struct {
		Email  string `json:"email"`
		Locale string `json:"locale"`
	} `json:"customer"`
	Description string `json:"description"`
	//Modified       time.Time `json:"modified"`
	OrderID        int `json:"order_id"`
	PaymentDetails struct {
		AccountHolderName     interface{} `json:"account_holder_name"`
		AccountID             interface{} `json:"account_id"`
		ExternalTransactionID string      `json:"external_transaction_id"`
		RecurringID           interface{} `json:"recurring_id"`
		Type                  string      `json:"type"`
	} `json:"payment_details"`
	Status        string `json:"status"`
	TransactionID int    `json:"transaction_id"`
}

// Transaction contains a transaction for an order
type Transaction struct {
	Amount   int    `json:"amount"`
	Created  string `json:"created"`
	Currency string `json:"currency"`
	Customer struct {
		Email string `json:"email"`
	} `json:"customer"`
	Description    string `json:"description"`
	OrderID        int    `json:"order_id"`
	OrderStatus    string `json:"order_status"`
	PaymentDetails struct {
		AccountHolderName     interface{} `json:"account_holder_name"`
		AccountID             interface{} `json:"account_id"`
		ExternalTransactionID string      `json:"external_transaction_id"`
		RecurringID           interface{} `json:"recurring_id"`
		Type                  string      `json:"type"`
	} `json:"payment_details"`
{'fraction_non_alphanumeric': 0.10554899645808737, 'fraction_numerical': 0.0, 'mean_word_length': 3.599348534201954, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6554990', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1156, 'n_words': 348}