Skip to content

Commit

Permalink
Merge pull request #16 from ingrammicro-xvantage/tweak-workflow
Browse files Browse the repository at this point in the history
Modified GitHub workflow to find and replace.
  • Loading branch information
im-deviprakash authored Feb 29, 2024
2 parents 351ee54 + 97a3a2e commit 39a5120
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 50 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/find_replace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
- name: Find and Replace
run: |
find docs/ -type f -name "*.md" -exec sed -i 's/openapiclient "github.com\/GIT_USER_ID\/GIT_REPO_ID"/xi_sdk_resellers "https:\/\/github.com\/ingrammicro-xvantage\/xi-sdk-resellers-go"/g' {} +
find docs/ -type f -name "*.md" -exec sed -i 's/openapiclient\.NewConfiguration()/xi_sdk_resellers.NewConfiguration()/g' {} +
find docs/ -type f -name "*.md" -exec sed -i 's/openapiclient\.NewAPIClient(configuration)/xi_sdk_resellers.NewAPIClient(configuration)/g' {} +
- name: Commit changes
run: |
git config --global user.email "${{ secrets.ADMIN_EMAIL }}"
Expand Down
4 changes: 2 additions & 2 deletions docs/AccesstokenAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ func main() {
clientId := "clientId_example" // string |
clientSecret := "clientSecret_example" // string |

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.AccesstokenAPI.GetAccesstoken(context.Background()).GrantType(grantType).ClientId(clientId).ClientSecret(clientSecret).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccesstokenAPI.GetAccesstoken``: %v\n", err)
Expand Down
8 changes: 4 additions & 4 deletions docs/DealsAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func main() {
iMEnvironment := "prodChicago" // string | Environment name.
dealId := "12345678" // string | Unique deal ID.

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.DealsAPI.GetResellersV6Dealsdetails(context.Background(), dealId).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).IMApplicationId(iMApplicationId).IMEnvironment(iMEnvironment).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DealsAPI.GetResellersV6Dealsdetails``: %v\n", err)
Expand Down Expand Up @@ -118,8 +118,8 @@ func main() {
vendor := "Cisco" // string | The vendor's name. (optional)
dealId := "12345678" // string | Deal/Special bid number. (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.DealsAPI.GetResellersV6Dealssearch(context.Background()).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).IMSenderID(iMSenderID).EndUser(endUser).Vendor(vendor).DealId(dealId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DealsAPI.GetResellersV6Dealssearch``: %v\n", err)
Expand Down
4 changes: 2 additions & 2 deletions docs/FreightEstimateAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ func main() {
iMSenderID := "MyCompany" // string | Unique value used to identify the sender of the transaction. (optional)
freightRequest := *openapiclient.NewFreightRequest() // FreightRequest | (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.FreightEstimateAPI.PostFreightestimate(context.Background()).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).IMCustomerContact(iMCustomerContact).IMSenderID(iMSenderID).FreightRequest(freightRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FreightEstimateAPI.PostFreightestimate``: %v\n", err)
Expand Down
8 changes: 4 additions & 4 deletions docs/InvoicesAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func main() {
customerType := "invoice" // string | it should be invoice or order (optional)
includeSerialNumbers := false // bool | if serial in the response send as true or else false (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.GetInvoicedetailsV61(context.Background(), invoiceNumber).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).IMApplicationID(iMApplicationID).CustomerType(customerType).IncludeSerialNumbers(includeSerialNumbers).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.GetInvoicedetailsV61``: %v\n", err)
Expand Down Expand Up @@ -140,8 +140,8 @@ func main() {
direction := "desc" // string | asc or desc , along with orderby column result set will be sorted. (optional)
serialNumber := "serialNumber_example" // string | Serial number of the product. (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.InvoicesAPI.GetResellersV6Invoicesearch(context.Background()).IMApplicationID(iMApplicationID).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).PaymentTermsNetDate(paymentTermsNetDate).InvoiceDate(invoiceDate).InvoiceDueDate(invoiceDueDate).OrderDate(orderDate).OrderFromDate(orderFromDate).OrderToDate(orderToDate).OrderNumber(orderNumber).DeliveryNumber(deliveryNumber).InvoiceNumber(invoiceNumber).InvoiceStatus(invoiceStatus).InvoiceType(invoiceType).CustomerOrderNumber(customerOrderNumber).EndCustomerOrderNumber(endCustomerOrderNumber).SpecialBidNumber(specialBidNumber).InvoiceFromDueDate(invoiceFromDueDate).InvoiceToDueDate(invoiceToDueDate).InvoiceFromDate(invoiceFromDate).InvoiceToDate(invoiceToDate).PageSize(pageSize).PageNumber(pageNumber).Orderby(orderby).Direction(direction).SerialNumber(serialNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InvoicesAPI.GetResellersV6Invoicesearch``: %v\n", err)
Expand Down
4 changes: 2 additions & 2 deletions docs/OrderStatusAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func main() {
xHubSignature := "3LeaTfLE5FLj1FcYflwdwFosH4ADHmMbds6thtirGC3e9lEkF9/1pt4T2fQQGlxf40EznDBER0b60M75K6ZW0A==" // string | Ingram Micro creates a signature token by use of a secret key + Event ID. The algorithm to generate the secret ley is given at link https://developer.ingrammicro.com/reseller/article/how-use-webhook-secret-key. Use the event Id in the below sample along with your secret key to generate the key. Alternatively, to send try this out, use a random text to see how it works.
orderStatusAsyncNotificationRequest := *openapiclient.NewOrderStatusAsyncNotificationRequest() // OrderStatusAsyncNotificationRequest |

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
r, err := apiClient.OrderStatusAPI.ResellersV1WebhooksOrderstatuseventPost(context.Background()).Targeturl(targeturl).XHubSignature(xHubSignature).OrderStatusAsyncNotificationRequest(orderStatusAsyncNotificationRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrderStatusAPI.ResellersV1WebhooksOrderstatuseventPost``: %v\n", err)
Expand Down
20 changes: 10 additions & 10 deletions docs/OrdersAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func main() {
regionCode := "CS" // string | Region code for sandbox testing - Not for use in production. (optional)
iMSenderID := "MyCompany" // string | Unique value used to identify the sender of the transaction. Example: MyCompany (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
r, err := apiClient.OrdersAPI.DeleteOrdercancel(context.Background(), orderNumber).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).RegionCode(regionCode).IMSenderID(iMSenderID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.DeleteOrdercancel``: %v\n", err)
Expand Down Expand Up @@ -123,8 +123,8 @@ func main() {
isIml := true // bool | True/False only for IML customers. (optional)
regionCode := "regionCode_example" // string | Region code for sandbox testing - Not for use in production. (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.OrdersAPI.GetOrderdetailsV61(context.Background(), ordernumber).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).IMSenderID(iMSenderID).IngramOrderDate(ingramOrderDate).VendorNumber(vendorNumber).SimulateStatus(simulateStatus).IsIml(isIml).RegionCode(regionCode).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.GetOrderdetailsV61``: %v\n", err)
Expand Down Expand Up @@ -223,8 +223,8 @@ func main() {
vendorName := "vendorName_example" // string | Name of the vendor. (optional)
specialBidNumber := "specialBidNumber_example" // string | The bid number provided to the reseller by the vendor for special pricing and discounts. Line-level bid numbers take precedence over header-level bid numbers.*Currently, this feature is not available in Australia (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.OrdersAPI.GetResellersV6Ordersearch(context.Background()).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).IngramOrderNumber(ingramOrderNumber).OrderStatus(orderStatus).OrderStatusIn(orderStatusIn).IngramOrderDate(ingramOrderDate).IngramOrderDateBt(ingramOrderDateBt).IMSenderID(iMSenderID).CustomerOrderNumber(customerOrderNumber).PageSize(pageSize).PageNumber(pageNumber).EndCustomerOrderNumber(endCustomerOrderNumber).InvoiceDateBt(invoiceDateBt).ShipDateBt(shipDateBt).DeliveryDateBt(deliveryDateBt).IngramPartNumber(ingramPartNumber).VendorPartNumber(vendorPartNumber).SerialNumber(serialNumber).TrackingNumber(trackingNumber).VendorName(vendorName).SpecialBidNumber(specialBidNumber).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.GetResellersV6Ordersearch``: %v\n", err)
Expand Down Expand Up @@ -314,8 +314,8 @@ func main() {
orderCreateRequest := *openapiclient.NewOrderCreateRequest("CustomerOrderNumber_example") // OrderCreateRequest |
iMSenderID := "MyCompany" // string | Unique value used to identify the sender of the transaction. Example: MyCompany (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.OrdersAPI.PostCreateorderV6(context.Background()).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).OrderCreateRequest(orderCreateRequest).IMSenderID(iMSenderID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.PostCreateorderV6``: %v\n", err)
Expand Down Expand Up @@ -391,8 +391,8 @@ func main() {
regionCode := "CS" // string | Region code paramter to be used only for order release functionality.Region code is only for sandbox not for production (optional)
iMSenderID := "MyCompany" // string | Unique value used to identify the sender of the transaction. Example: MyCompany (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.OrdersAPI.PutOrdermodify(context.Background(), orderNumber).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).OrderModifyRequest(orderModifyRequest).ActionCode(actionCode).RegionCode(regionCode).IMSenderID(iMSenderID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.PutOrdermodify``: %v\n", err)
Expand Down
12 changes: 6 additions & 6 deletions docs/ProductCatalogAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func main() {
iMCorrelationID := "fbac82ba-cf0a-4bcf-fc03-0c5084" // string | Unique transaction number to identify each transaction accross all the systems
iMSenderID := "MyCompany" // string | Sender Identification text (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.ProductCatalogAPI.GetResellerV6Productdetail(context.Background(), ingramPartNumber).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).IMSenderID(iMSenderID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductCatalogAPI.GetResellerV6Productdetail``: %v\n", err)
Expand Down Expand Up @@ -125,8 +125,8 @@ func main() {
category := "Accessories" // string | The category of the product. Example: Displays. (optional)
skipAuthorisation := "true" // string | This parameter is True when you want Skip the authorization, so template will work like current B2b template. (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.ProductCatalogAPI.GetResellerV6Productsearch(context.Background()).IMCustomerNumber(iMCustomerNumber).IMCorrelationID(iMCorrelationID).IMCountryCode(iMCountryCode).PageNumber(pageNumber).PageSize(pageSize).IMSenderID(iMSenderID).Type_(type_).HasDiscounts(hasDiscounts).Vendor(vendor).VendorPartNumber(vendorPartNumber).AcceptLanguage(acceptLanguage).VendorNumber(vendorNumber).Keyword(keyword).Category(category).SkipAuthorisation(skipAuthorisation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductCatalogAPI.GetResellerV6Productsearch``: %v\n", err)
Expand Down Expand Up @@ -212,8 +212,8 @@ func main() {
includeProductAttributes := true // bool | Pass boolean value as input, if true the response will contain detailed attributes related to the Product, if false or not sent the response will contain very few Product details. (optional)
iMSenderID := "MyCompany" // string | Unique value used to identify the sender of the transaction. Example: MyCompany (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.ProductCatalogAPI.PostPriceandavailability(context.Background()).IncludeAvailability(includeAvailability).IncludePricing(includePricing).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).PriceAndAvailabilityRequest(priceAndAvailabilityRequest).IncludeProductAttributes(includeProductAttributes).IMSenderID(iMSenderID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProductCatalogAPI.PostPriceandavailability``: %v\n", err)
Expand Down
4 changes: 2 additions & 2 deletions docs/QuoteToOrderAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ func main() {
quoteToOrderDetailsDTO := *openapiclient.NewQuoteToOrderDetailsDTO() // QuoteToOrderDetailsDTO |
iMSenderID := "MyCompany" // string | Unique value used to identify the sender of the transaction. (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.QuoteToOrderAPI.PostQuoteToOrderV6(context.Background()).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).QuoteToOrderDetailsDTO(quoteToOrderDetailsDTO).IMSenderID(iMSenderID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `QuoteToOrderAPI.PostQuoteToOrderV6``: %v\n", err)
Expand Down
12 changes: 6 additions & 6 deletions docs/QuotesAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ func main() {
quoteCreateDateBt := "quoteCreateDateBt_example" // string | Search with start and end date(only 2 entries allowed). (optional)
iMSenderID := "MyCompany" // string | Unique value used to identify the sender of the transaction. Example: MyCompany (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.QuotesAPI.GetQuotessearchV6(context.Background()).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCustomerContact(iMCustomerContact).IMCorrelationID(iMCorrelationID).IngramOrderDateBt(ingramOrderDateBt).QuoteNumber(quoteNumber).SpecialBidNumber(specialBidNumber).EndUserContact(endUserContact).SortingOrder(sortingOrder).SortBy(sortBy).PageSize(pageSize).PageNumber(pageNumber).VendorName(vendorName).QuoteName(quoteName).Status(status).QuoteCreateDateBt(quoteCreateDateBt).IMSenderID(iMSenderID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `QuotesAPI.GetQuotessearchV6``: %v\n", err)
Expand Down Expand Up @@ -135,8 +135,8 @@ func main() {
iMCorrelationID := "fbac82ba-cf0a-4bcf-fc03-0c5084" // string | Unique transaction number to identify each transaction accross all the systems.
iMSenderID := "MyCompany" // string | Unique identifier used to identify the third party source accessing the services. (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.QuotesAPI.GetResellerV6ValidateQuote(context.Background()).QuoteNumber(quoteNumber).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).IMSenderID(iMSenderID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `QuotesAPI.GetResellerV6ValidateQuote``: %v\n", err)
Expand Down Expand Up @@ -209,8 +209,8 @@ func main() {
quoteNumber := "QUO-10926-Y8G1B3" // string | Unique identifier generated by Ingram Micro's CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes.
iMSenderID := "MyCompany" // string | Unique identifier used to identify the third party source accessing the services. (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
configuration := xi_sdk_resellers.NewConfiguration()
apiClient := xi_sdk_resellers.NewAPIClient(configuration)
resp, r, err := apiClient.QuotesAPI.GetResellersV6Quotes(context.Background(), quoteNumber).IMCustomerNumber(iMCustomerNumber).IMCountryCode(iMCountryCode).IMCorrelationID(iMCorrelationID).IMSenderID(iMSenderID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `QuotesAPI.GetResellersV6Quotes``: %v\n", err)
Expand Down
Loading

0 comments on commit 39a5120

Please sign in to comment.